- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have encountered a problem with the emulator of the OpenCL SDK for FPGA. The autorun kernels never come back after a few rounds of execution. I have used the following scheme to test:
---------------------------------------------------
__kernel
__attribute__((autorun))
__attribute__((max_global_work_dim(0)))
__attribute__((num_compute_units(4)))
void myKernel()
{
int compute_id = get_compute_id(0);
// as the first statement
printf("kernel-%d started ...\n", compute_id);
/// some other codes for computation
// as the last statement
printf("kernel-%d finished !!!\n", compute_id);
}
-------------------------------------
after automatically restarted for a few times, one of the autorun kernel (surprisingly not all kernels stopped) never come back after printed out the "finishing" statement in software emulation mode.
When running on FPGA, everything is OK.
Is this possibly a bug ? how could find what really happend ?
I was using v18.1.0 and BSP for DE5net v18.0.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I further used gdb to tracy the state of the autorun kernels as the following pic shows. Totally, six threads are running in the same time, one date loader, one consumer, four autorun kernels.
It can been seen that whenever the autorun kernel restarts, a new thread is created, and when it finishes, the corresponding thread will exits (as the blue and green markers shows).
It looks like that in the final round of execution, the red threads (two autorun kernels) successfully exits while the yellow threads restarted but did not exist (because in the last round of execution, they are not needed.)
And when I re-start the data loaders and consumer, only two threads are created for the two autorun kernels that have successfully existed (red ones) in previous computations. Two are already there running (the yellow ones). In this case, the simulation hang up waiting for the yellow ones to execute.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page