Skip to content
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

Fix bug in mutable_command_full_dispatch #2118

Merged

Conversation

xinjin01
Copy link
Contributor

The test is missing clFinish after clEnqueueSVMUnmap. Add clFinish after clEnqueueSVMUnmap.

The test is missing clFinish after clEnqueueSVMUnmap.
Add clFinish after clEnqueueSVMUnmap.

Signed-off-by: Xin Jin <xin.jin@arm.com>
@CLAassistant
Copy link

CLAassistant commented Oct 16, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@bashbaug bashbaug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Without this PR there is no call to clFinish between the call to clEnqueueSVMUnmap and clSVMFree, and the description of clSVMFree says:

Note that clSVMFree does not wait for previously enqueued commands that may be using svm_pointer to finish before freeing svm_pointer. It is the responsibility of the application to make sure that enqueued commands that use svm_pointer have finished before freeing svm_pointer. This can be done by enqueuing a blocking operation such as clFinish, clWaitForEvents, clEnqueueReadBuffer or by registering a callback with the events associated with enqueued commands and when the last enqueued command has finished freeing svm_pointer.

For the Khronos folks, note that this is exactly the type of error that a "blocking free" aims to solve.

@bashbaug bashbaug merged commit 63ce937 into KhronosGroup:main Oct 17, 2024
7 checks passed
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.

4 participants