Skip to content

[SYCL] Fix sporadic failure in kernel-and-program.cpp #870

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

asavonic
Copy link
Contributor

clEnqueueWriteBuffer operation with `blocking == CL_TRUE' is not
guaranteed to complete before it returns. It only guarantees that the
host pointer (data) can now be re-used or free'ed: an OpenCL runtime
either already completed the operation, or (the faulty case) an OpenCL
runtime copied data to an internal (temporary) memory and the
operation will be executed later.

We have to explicitly finish the operation in order to avoid a data
race when the faulty case happens.

Signed-off-by: Andrew Savonichev [email protected]

clEnqueueWriteBuffer operation with `blocking == CL_TRUE' is *not*
guaranteed to complete before it returns. It only guarantees that the
host pointer (data) can now be re-used or free'ed: an OpenCL runtime
either already completed the operation, or (the faulty case) an OpenCL
runtime copied data to an internal (temporary) memory and the
operation will be executed later.

We have to explicitly finish the operation in order to avoid a data
race when the faulty case happens.

Signed-off-by: Andrew Savonichev <[email protected]>
@asavonic asavonic assigned asavonic and romanovvlad and unassigned asavonic Nov 25, 2019
@romanovvlad romanovvlad merged commit 0c717f8 into intel:sycl Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants