-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL] Implement get_multi_ptr for accessor and local_accessor #8249
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
mmoadeli
commented
Feb 8, 2023
- Implement get_multi_ptr for accessor and local_accessor
- Add test for get_multi_ptr
- Update the affected default ctor test
Update failing tests due to adding diagnostic for const qualified DataT only allowed for non readonly accessor.
- Use -Xclang -verify for testing
Having it requires handling over 20 expected-erros.
…o inheritance from base class hitting assert.
- Add test for get_multi_ptr - Update the affected defaut ctor test
- Update the affected test.
@@ -0,0 +1,46 @@ | |||
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out |
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.
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out | |
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -fsyntax-only |
See some BKMs on tests: here
Since the test only contains a few static_assert
s which do most of the actual checking, I would also suggest to maybe refactor the test to significantly simplify it. We can turn everything into a single function, which accepts handler
and buffer
, creates accessors and then checks return types of methods.
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.
thanks @AlexeySachkov, done.
// TODO: uncomment check with get_multi_ptr() when SYCL 2020 mupti_ptr feature | ||
// will be merged | ||
// assert(B.get_multi_ptr() == nullptr); | ||
assert(B.get_multi_ptr<sycl::access::decorated::yes>() == nullptr); |
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.
For good measure, could you please add a sycl::access:decorated::no
and sycl::access::decorated::legacy
test case here?
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.
thanks @steffenlarsen , done.
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!