AnsweredAssumed Answered

How to abort clEnqueueWaitSignalAmd?

Question asked by andyste1 on Jul 9, 2019
Latest reply on Jul 17, 2019 by dipak

We're developing software that uses a PCI data acquisition card to read blocks of data (records) from an external instrument. These records are transferred to a Radeon Pro WX7100 using "DirectGma", where a kernel processes the data. The results are then transferred to RAM for the client software to deal with.


The external instrument generates a fixed number of records, but it's possible that some can go missing for various reasons, so the actual number of records that get transferred to the Radeon Pro can be less than what our program is expecting.


The code has a "processing loop" that iterates "num_records_to_acquire" times; in this loop we call  clEnqueueWaitSignalAmd, execute the kernel, then read the buffer back to RAM. The problem is that when records go missing, it will hang on the call to clEnqueueWaitSignalAmd. Other than killing the thread that the loop is running in, are there any other ways to handle this scenario?