OpenCL-CTS
OpenCL-CTS copied to clipboard
enqueue an unmap command but not call anly blocking API may cause define behavior
https://github.com/KhronosGroup/OpenCL-CTS/blob/bb604702a5c34e71697f306b693e812b288828c6/test_conformance/math_brute_force/unary_double.cpp#L307
After clFlush, the memory object processed by unmap(host command) may be released prematurely.
Hi, can you please describe the problem in more detail? Which memory object may be released prematurely? Thanks!
Hi,We found that this case has a very low probability of Crashing. May be related to the following use case behavior
cl_int Test()
{
...
clEnqueueMapBuffer(A); // Map buffer A,Blocking
// Verify data
clEnqueueUnmapBuffer(A); // Unmap buffer A,Non Blocking
clFlush(); // flush unmap operation,but not wait it
return CL_SUCCESS;
// buffer A can released after Test() return,but unmap may be not completed.
}