Added tests validating clEnqueueSVMMemcpy when source and destination SVM ranges overlap#2593
Open
shajder wants to merge 2 commits intoKhronosGroup:mainfrom
Open
Added tests validating clEnqueueSVMMemcpy when source and destination SVM ranges overlap#2593shajder wants to merge 2 commits intoKhronosGroup:mainfrom
shajder wants to merge 2 commits intoKhronosGroup:mainfrom
Conversation
…ERLAP when source and destination SVM ranges overlap
bashbaug
reviewed
Dec 11, 2025
Contributor
bashbaug
left a comment
There was a problem hiding this comment.
Have you considered testing all three scenarios in one test instead?
This would let us reuse the same context / command queue / etc, even the same SVM allocation if we choose, which means the tests will run faster and the code will be shorter.
Comment on lines
+45
to
+46
| char *data_buf = | ||
| (char *)clSVMAlloc(contextWrapper, CL_MEM_READ_WRITE, dataSize * 2, 0); |
Contributor
There was a problem hiding this comment.
Recommend using the clSVMWrapper here instead, which automatically handles freeing the SVM allocation.
Comment on lines
+47
to
+52
| if (!data_buf) | ||
| { | ||
| log_error( | ||
| "svm_negative_dst_overlap_src: invalid result for clSVMAlloc\n"); | ||
| return TEST_FAIL; | ||
| } |
Contributor
There was a problem hiding this comment.
Consider:
Suggested change
| if (!data_buf) | |
| { | |
| log_error( | |
| "svm_negative_dst_overlap_src: invalid result for clSVMAlloc\n"); | |
| return TEST_FAIL; | |
| } | |
| test_assert_error(data_buf != nullptr, "clSVMAlloc failed"); |
Contributor
Author
Corrected |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2372 according to issue description