-
Notifications
You must be signed in to change notification settings - Fork 747
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
[SYCL] Change some check_device_code tests to use SYCL_EXTERNAL #13899
Conversation
…of submitting to a queue
@@ -13,12 +13,9 @@ const intel::fpga_datapath<int[10]> empty{}; | |||
// CHECK: %[[datapath:.*]] = type { [10 x i32] } | |||
// CHECK: {{.*}}empty = internal addrspace(1) constant %[[datapath]] zeroinitializer, align 4, !spirv.Decorations ![[empty_md:[0-9]*]] | |||
|
|||
int main() { | |||
queue Q; | |||
SYCL_EXTERNAL void fpga_datapath_global() { |
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.
JFYI: I think f
should have been made an argument for the change to be a no-op (it was previously a kernel argument because of the lambda capture), but it likely doesn't matter here.
|
||
Q.single_task([=]() { volatile int ReadVal = empty[f]; }); | ||
return 0; | ||
volatile int ReadVal = empty[f]; |
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 think the purpose of this volatile int
was to prevent the optimizer from removing everything. In the new approach the idiomatic way would be to just return that int
value, e.g.
SYCL_EXTERNAL auto /* or int, maybe */ fpga_datapath_global(int f) { return emtpy[f]; }
Changed some of the simpler test cases to use SYCL_EXTERNAL functions instead of submitting to a queue.