-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
2503a62
Diagnostic for const qualified DataT with non read-only accessor
mmoadeli 862b688
Merge branch 'sycl' of https://github.com/mmoadeli/llvm into sycl
mmoadeli 1edb94f
Add test for const qualified DataT with non readonly accessor.
mmoadeli 7ba64c6
Assign valid access mode for local accessor, depending on the type of…
mmoadeli ef0038e
Minor test update.
mmoadeli 36971f8
- Rename AccessMode to AccessModeFromConstness
mmoadeli 29e3036
- Revert test to be without -Xclang -verify.
mmoadeli 92debe8
Refactors implementation of diagnostic to avoid compiler errors due t…
mmoadeli 7eac372
Updates the test to use -Xclang -verify
mmoadeli dcac706
Fix style-checl
mmoadeli 9d4b313
Merge branch 'intel:sycl' into sycl
mmoadeli ad92330
Merge branch 'intel:sycl' into sycl
mmoadeli 6b3d33d
- Implement get_multi_ptr for accessor and local_accessor
mmoadeli ff4e3fe
- Remove defaul template parameter for get_multi_ptr
mmoadeli 23e9698
- Remove running the binary in test.
mmoadeli afb5fe6
Simplifies related test.
mmoadeli 74685cf
Improve tets to cover decorated::no, and decorated::legacy.
mmoadeli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -fsyntax-only | ||
|
||
#include <cassert> | ||
#include <sycl/sycl.hpp> | ||
#include <type_traits> | ||
|
||
using namespace sycl; | ||
|
||
constexpr static int size = 1; | ||
|
||
void test_get_multi_ptr(handler &cgh, buffer<int, size> &buffer) { | ||
using accessor_t = | ||
accessor<int, size, access::mode::read_write, access::target::device, | ||
access::placeholder::true_t>; | ||
using local_accessor_t = local_accessor<int, size>; | ||
|
||
auto ptr = buffer.get_access<access_mode::read_write, target::device>(cgh); | ||
auto local_ptr = local_accessor<int, size>({size}, cgh); | ||
auto acc_multi_ptr = ptr.get_multi_ptr<access::decorated::yes>(); | ||
auto local_acc_multi_ptr = local_ptr.get_multi_ptr<access::decorated::yes>(); | ||
static_assert( | ||
std::is_same_v< | ||
decltype(acc_multi_ptr), | ||
typename accessor_t::template accessor_ptr<access::decorated::yes>>); | ||
static_assert(std::is_same_v<decltype(local_acc_multi_ptr), | ||
typename local_accessor_t::template accessor_ptr< | ||
access::decorated::yes>>); | ||
} |
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
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.
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
andsycl::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.