OChen25
New Contributor
6 years agoHow to debug why OpenCL command queue stalled on Cyclone V SoC?
On Terasic DE10-Nano I've created an OpenCL BSP based on one originally modified from de10_nano_sharedonly. It works fine for programs like hello_world, 'aocl diagnose'. However, for vector_add, it runs successfully for only ONCE. The 2nd call to vector_add will hang on clWaitForEvents().
Using clGetEventInfo() I found that the status of a command sent to command queue by clEnqueueReadBuffer() freezes on CL_QUEUED and never changes. On contract, in the first call to vector_add, that status will become CL_COMPLETE immediately.
I'm wondering if there is any way I can debug why this command queue is stalled? For example, maybe I can probe some signal/bus inside the circuit, or call some API to know the status of the command queue?