-
Notifications
You must be signed in to change notification settings - Fork 824
[SYCL] Add normalized -fsycl-id-queries-range= option
#21706
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 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f56840c
[SYCL] Add normalized -fsycl-id-queries-range= option
againull 17f799b
Rename -fsycl-id-queries-range=none to size_t
againull 0afd2b0
Fix sycl-macro.cpp test
againull afd2da1
[SYCL][Test] Replace e2e tests with unit tests
againull a68993a
Restructure test and fix according to review
againull 69cabf4
Enable -fms-compatibility test
againull beb24a8
Address review
againull 35e055b
Address review
againull 7a25a31
Address review
againull 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
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
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,16 +1,44 @@ | ||
| // REQUIRES: nvptx-registered-target | ||
|
|
||
| // Test default behavior (no flag specified - should not add NVVM flag) | ||
| // RUN: %clang -### -fno-sycl-libspirv -nocudalib \ | ||
| // RUN: -fsycl -fsycl-targets=nvptx64-nvidia-cuda %s 2>&1 \ | ||
| // RUN: | FileCheck --check-prefix=CHECK-DEFAULT %s | ||
|
|
||
| // Test new normalized option with different values | ||
| // RUN: %clang -### -fno-sycl-libspirv -nocudalib \ | ||
| // RUN: -fsycl -fsycl-targets=nvptx64-nvidia-cuda -fno-sycl-id-queries-fit-in-int %s 2>&1 \ | ||
| // RUN: -fsycl -fsycl-targets=nvptx64-nvidia-cuda -fsycl-id-queries-range=int %s 2>&1 \ | ||
| // RUN: | FileCheck --check-prefix=CHECK-INT %s | ||
|
|
||
| // RUN: %clang -### -fno-sycl-libspirv -nocudalib \ | ||
| // RUN: -fsycl -fsycl-targets=nvptx64-nvidia-cuda -fsycl-id-queries-range=uint %s 2>&1 \ | ||
| // RUN: | FileCheck --check-prefix=CHECK-UINT %s | ||
|
|
||
| // RUN: %clang -### -fno-sycl-libspirv -nocudalib \ | ||
| // RUN: -fsycl -fsycl-targets=nvptx64-nvidia-cuda -fsycl-id-queries-range=size_t %s 2>&1 \ | ||
| // RUN: | FileCheck --check-prefix=CHECK-DEFAULT %s | ||
|
|
||
| // Test legacy compatibility flags | ||
| // RUN: %clang -### -fno-sycl-libspirv -nocudalib \ | ||
| // RUN: -fsycl -fsycl-targets=nvptx64-nvidia-cuda -fsycl-id-queries-fit-in-int %s 2>&1 \ | ||
| // RUN: | FileCheck --check-prefix=CHECK-INT %s | ||
|
|
||
| // RUN: %clang -### -fno-sycl-libspirv -nocudalib \ | ||
| // RUN: -fsycl -fsycl-targets=nvptx64-nvidia-cuda -fno-sycl-id-queries-fit-in-int %s 2>&1 \ | ||
| // RUN: | FileCheck --check-prefix=CHECK-DEFAULT %s | ||
|
|
||
| // Test precedence: last one wins | ||
| // RUN: %clang -### -fno-sycl-libspirv -nocudalib \ | ||
| // RUN: -fsycl -fsycl-targets=nvptx64-nvidia-cuda -fsycl-id-queries-range=uint -fsycl-id-queries-fit-in-int %s 2>&1 \ | ||
| // RUN: | FileCheck --check-prefix=CHECK-INT %s | ||
|
|
||
| // RUN: %clang -### -fno-sycl-libspirv -nocudalib \ | ||
| // RUN: -fsycl -fsycl-targets=nvptx64-nvidia-cuda -fsycl-id-queries-fit-in-int -fsycl-id-queries-range=size_t %s 2>&1 \ | ||
| // RUN: | FileCheck --check-prefix=CHECK-DEFAULT %s | ||
|
|
||
| // CHECK-INT: "-mllvm" "-nvvm-reflect-add=__CUDA_ID_QUERIES_FIT_IN_INT=1" | ||
| // CHECK-INT-NOT: "-nvvm-reflect-add=__CUDA_ID_QUERIES_FIT_IN_UINT=1" | ||
| // CHECK-UINT: "-mllvm" "-nvvm-reflect-add=__CUDA_ID_QUERIES_FIT_IN_UINT=1" | ||
| // CHECK-UINT-NOT: "-nvvm-reflect-add=__CUDA_ID_QUERIES_FIT_IN_INT=1" | ||
| // CHECK-DEFAULT-NOT: "-nvvm-reflect-add=__CUDA_ID_QUERIES_FIT_IN_INT=1" | ||
| // CHECK-DEFAULT-NOT: "-nvvm-reflect-add=__CUDA_ID_QUERIES_FIT_IN_UINT=1" |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.