-
Notifications
You must be signed in to change notification settings - Fork 797
[SYCL] Disable inlining in 'ID queries fit in int' test #3751
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
+7
−13
Merged
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e1ab75d
[SYCL] Disable inlining in 'ID queries fit in int' test
652dc2d
Fix typo
46723d3
Leave -O0
e541be3
Replace -fno-inline-functions with -disable-llvm-passes
b4eccf6
Remove redundant argument
8bdf821
Merge remote-tracking branch 'public/sycl' into fix-test
c44a25c
Make code the device one
6a81ac2
Fix style issue
af1f0ef
Eliminate use of runtime queue and macro to disable parallel for rang…
1b5ca99
Removed main
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,56 @@ | ||
// RUN: %clangxx -fsycl -fsycl-id-queries-fit-in-int -O0 -c -S -emit-llvm -o %t.ll %s | ||
// RUN: %clangxx -D__SYCL_DISABLE_PARALLEL_FOR_RANGE_ROUNDING__ -fsycl-device-only -fsycl-id-queries-fit-in-int -fno-sycl-early-optimizations -S -o %t.ll %s | ||
// RUN: FileCheck %s --input-file %t.ll | ||
|
||
#include <CL/sycl.hpp> | ||
|
||
using namespace sycl; | ||
|
||
// CHECK: define dso_local i32 @main() {{.*}} { | ||
int main() { | ||
item<1, true> TestItem = detail::Builder::createItem<1, true>({3}, {2}, {1}); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int Id = TestItem.get_id(0); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int Range = TestItem.get_range(0); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int LinearId = TestItem.get_linear_id(); | ||
queue Q; | ||
|
||
cl::sycl::nd_item<1> TestNDItem = | ||
detail::Builder::createNDItem<1>(detail::Builder::createItem<1, false>({4}, {2}), | ||
detail::Builder::createItem<1, false>({2}, {0}), | ||
detail::Builder::createGroup<1>({4}, {2}, {1})); | ||
// CHECK: define {{.*}}dso_local spir_kernel void @"{{.*}}Test"() | ||
Q.submit([&](handler &H) { | ||
H.parallel_for<class Test>(range<1>{3}, [=](item<1> TestItem) { | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int Id = TestItem.get_id(0); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int Range = TestItem.get_range(0); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int LinearId = TestItem.get_linear_id(); | ||
}); | ||
}); | ||
|
||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int GlobalId = TestNDItem.get_global_id(0); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int GlobalLinearId = TestNDItem.get_global_linear_id(); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int LocalId = TestNDItem.get_local_id(0); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int LocalLinearId = TestNDItem.get_local_linear_id(); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int GroupRange = TestNDItem.get_group_range(0); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int GroupId = TestNDItem.get_group(0); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int GroupLinearId = TestNDItem.get_group_linear_id(); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int GlobalRange = TestNDItem.get_global_range(0); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int LocalRange = TestNDItem.get_local_range(0); | ||
// CHECK: define {{.*}}dso_local spir_kernel void @"{{.*}}NDTest"() | ||
Q.submit([&](handler &H) { | ||
H.parallel_for<class NDTest>( | ||
nd_range<1>{range<1>{3}, range<1>{1}}, [=](nd_item<1> TestNDItem) { | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int GlobalId = TestNDItem.get_global_id(0); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int GlobalLinearId = TestNDItem.get_global_linear_id(); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int LocalId = TestNDItem.get_local_id(0); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int LocalLinearId = TestNDItem.get_local_linear_id(); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int GroupRange = TestNDItem.get_group_range(0); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int GroupId = TestNDItem.get_group(0); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int GroupLinearId = TestNDItem.get_group_linear_id(); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int GlobalRange = TestNDItem.get_global_range(0); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int LocalRange = TestNDItem.get_local_range(0); | ||
|
||
int GlobalIdConverted = TestNDItem.get_global_id(); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int LocalIdConverted = TestNDItem.get_local_id(); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int OffsetConferted = TestNDItem.get_offset(); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int GlobalIdConverted = TestNDItem.get_global_id(); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int LocalIdConverted = TestNDItem.get_local_id(); | ||
// CHECK: call void @llvm.assume(i1 {{.*}}) | ||
int OffsetConferted = TestNDItem.get_offset(); | ||
}); | ||
}); | ||
|
||
return 0; | ||
} | ||
// CHECK: } |
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.
Uh oh!
There was an error while loading. Please reload this page.