-
Notifications
You must be signed in to change notification settings - Fork 770
[SYCL][CUDA] Eliminate incorrect assertions and enable cuda usm tests #2557
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
Signed-off-by: James Brodman <james.brodman@intel.com>
Signed-off-by: James Brodman <james.brodman@intel.com>
Signed-off-by: James Brodman <james.brodman@intel.com>
SYCL :: basic_tests/queue/queue_parallel_for_generic.cpp now works as well. |
Signed-off-by: James Brodman <james.brodman@intel.com>
Anyone know what these new XPASSes are about? |
Looks like you are right and the issue is gone with the new GPU driver. I've created a PR with removing XFAILs to check this #2564 |
@@ -4133,7 +4133,7 @@ pi_result cuda_piextUSMHostAlloc(void **result_ptr, pi_context context, | |||
} catch (pi_result error) { | |||
result = error; | |||
} | |||
assert(reinterpret_cast<std::uintptr_t>(*result_ptr) % alignment == 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the issue when alignment == 0
- but removing it there are no checks that the allocation respects the alignment ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fwyzard, do you suggest adding something like:
assert(alignment && (reinterpret_cast<std::uintptr_t>(*result_ptr) % alignment == 0));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was actually thinking
assert(alignment == 0 || reinterpret_cast<std::uintptr_t>(*result_ptr) % alignment == 0);
since alignment == 0
means no alignment requirements IIRC ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. This seems to be an easy change: the tests are already enabled, so it should be just three new lines of code in pi_cuda.cpp
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#2831 recovers assertions.
Cuda plugin basically had divide by 0 assertions that weren't necessary.
Signed-off-by: James Brodman james.brodman@intel.com