-
Notifications
You must be signed in to change notification settings - Fork 788
[SYCL] accessor::get_pointer() should always return base pointer, even for offset accessors #4687
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: Chris Perkins <[email protected]>
Signed-off-by: Chris Perkins <[email protected]>
Signed-off-by: Chris Perkins <[email protected]>
Signed-off-by: Chris Perkins <[email protected]>
Signed-off-by: Chris Perkins <[email protected]>
Couldn't it break some users that already rely on "incorrect" behavior? If so, probably we cannot just change it now, we need to go through deprecation process. |
/summary:run |
yes
What do you suggest? We can't deprecate the function because the function was there and is there. It just has the wrong behavior. I suggest that we need some other solution (e.g. clang-tidy). |
Signed-off-by: Chris Perkins <[email protected]>
/summary:run |
@intel/llvm-reviewers-runtime, ping. |
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.
LGTM
/summary:run |
@againull, ping. |
@@ -86,7 +86,7 @@ void stream_impl::flush() { | |||
.get_access<access::mode::read_write, access::target::host_buffer>( | |||
cgh); | |||
cgh.host_task([=] { | |||
printf("%s", BufHostAcc.get_pointer()); | |||
printf("%s", &(BufHostAcc[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.
@againull, I'm going to merge this PR. Feel free to review anyway.
According to the SYCL 2020 spec get_pointer() returns a pointer to the beginning of the underlying buffer, even if it is offset. Presently our get_pointer() implementation returns an offset pointer when using an offset accessor. This PR fixes this.
The Jenkins Summary is failing because the CTS tests have not been updated for this requirement. I have a PR introducing this update on the CTS used by the CI system.