OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1686 Discussions

Miscompiled control flow

Kloeckner__Andreas
166 Views

Hi there,

I've attached a test case (a gutted version of a segmented scan) that gets miscompiled by intel_sdk_for_ocl_applications_2013_xe_runtime_3.0.67279_x64, at least when running on my i7-2620M.

Specifically, when running this self-contained test code using PyOpenCL, I get the line

gid:0 fsii:0

printed 16 times for each of the two work groups. If you look at the kernel, that means that the printf() in the trailing snippet:

    if (get_local_id(0) == 0)
    {  
      printf("gid:%d fsii:%d\n", psc_GID_0, psc_first_segment_start_in_interval);
    }

got executed 16 times for group id 0. In my book, it should be executed exactly once. (Confirmed by running against other implementations. Intel OpenCL 2012 also gets this right.)

Thanks,

Andreas

0 Kudos
4 Replies
Raghupathi_M_Intel
166 Views

Sorry for late response. Thanks for the code. We'll take a look and get back to you.

Yuri_K_Intel
Employee
166 Views
Hi Andreas, I was able to reproduce the issue on the release version (67279), but I don't see it on our latest development versions, the output I get is: gid:0 fsii:0 gid:1 fsii:0 So obviously it has been fixed since that. Thanks, Yuri
Kloeckner__Andreas
166 Views

Sounds good, thanks for the heads-up. How soon do you think your dev version will turn into a release?

Thanks, Andreas

JLuna5
New Contributor I
166 Views

Hi, the control flow you have established on the estructure

Reply