-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL] Add clang implementation for accessor property no_alias #3452
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
Changes from all commits
d7e3e04
0b55f90
c7441a1
5b3446d
57ca989
9bbe8f9
c38d9f4
75b3fb1
d2642be
ca91261
8c94561
7dd04ea
067dae8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s | ||
// check that noalias parameter attribute is emitted when no_alias accessor property is used | ||
// CHECK: define {{.*}}spir_kernel void @_ZTSZ4mainE16kernel_function1({{.*}} noalias {{.*}} %_arg_, {{.*}}) | ||
|
||
schittir marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// check that noalias parameter attribute is NOT emitted when it is not used | ||
// CHECK: define {{.*}}spir_kernel void @_ZTSZ4mainE16kernel_function2{{.*}} !kernel_arg_buffer_location | ||
// CHECK-NOT: define {{.*}}spir_kernel void @_ZTSZ4mainE16kernel_function2({{.*}} noalias {{.*}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lines 6 and 7 here are broken. The first checks to see if that kernel is defined, and the 2nd just checks to see if it is defined AGAIN. This is not correct. Presumably there needs to be a 'CHECK-NOT'/'CHECK-SAME' combo, like in the example here: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PR - #4283 |
||
|
||
schittir marked this conversation as resolved.
Show resolved
Hide resolved
|
||
#include "Inputs/sycl.hpp" | ||
|
||
int main() { | ||
cl::sycl::accessor<int, 1, cl::sycl::access::mode::read_write, | ||
cl::sycl::access::target::global_buffer, | ||
cl::sycl::access::placeholder::false_t, | ||
cl::sycl::ONEAPI::accessor_property_list< | ||
cl::sycl::ONEAPI::property::no_alias::instance<true>>> | ||
accessorA; | ||
|
||
cl::sycl::accessor<int, 1, cl::sycl::access::mode::read_write, | ||
cl::sycl::access::target::global_buffer, | ||
cl::sycl::access::placeholder::false_t, | ||
cl::sycl::ONEAPI::accessor_property_list< | ||
cl::sycl::INTEL::property::buffer_location::instance<1>>> | ||
accessorB; | ||
|
||
cl::sycl::kernel_single_task<class kernel_function1>( | ||
[=]() { | ||
accessorA.use(); | ||
}); | ||
|
||
cl::sycl::kernel_single_task<class kernel_function2>( | ||
[=]() { | ||
accessorB.use(); | ||
}); | ||
return 0; | ||
} |
Uh oh!
There was an error while loading. Please reload this page.