-
Notifications
You must be signed in to change notification settings - Fork 788
[SYCL][Driver] Update -fsycl-dump-device-code option name. #18908
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
uditagarwal97
merged 6 commits into
intel:sycl
from
srividya-sundaram:save-offload-code
Jun 18, 2025
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
786db22
[SYCL][Driver] Update -fsycl-dump-devce-code option name.
srividya-sundaram d2832b8
Address review comments.
srividya-sundaram d1c4393
Add doc for save-offload-code
srividya-sundaram f1f389b
Update usage.
srividya-sundaram 157b80a
Update UsersManual per review feedback.
srividya-sundaram 2796ad9
Fix formatting.
bader 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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,35 @@ | ||
// SYCL offloading tests using -save-offload-code | ||
|
||
// Verify that -save-offload-code puts the device code (.spv files) | ||
// in the user provided directory. | ||
|
||
// Linux | ||
// clang -fsycl --no-offload-new-driver -target x86_64-unknown-linux-gnu | ||
// RUN: %clang -fsycl --no-offload-new-driver -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -target x86_64-unknown-linux-gnu -save-offload-code=/user/input/path %s -### 2>&1 \ | ||
// RUN: | FileCheck %s --check-prefixes=CHK-save-offload-code | ||
|
||
// clang -fsycl --no-offload-new-driver -fsycl-targets=spir64-unknown-unknown | ||
// RUN: %clang -fsycl --no-offload-new-driver -fsycl-targets=spir64-unknown-unknown -target x86_64-unknown-linux-gnu -save-offload-code=/user/input/path %s -### 2>&1 \ | ||
// RUN: | FileCheck %s --check-prefixes=CHK-save-offload-code | ||
|
||
// clang --driver-mode=g++ | ||
// RUN: %clangxx -fsycl --no-offload-new-driver -fsycl-targets=spir64-unknown-unknown -target x86_64-unknown-linux-gnu -save-offload-code=/user/input/path %s -### 2>&1 \ | ||
// RUN: | FileCheck %s --check-prefixes=CHK-save-offload-code | ||
|
||
// Windows | ||
// RUN: %clang_cl -fsycl --no-offload-new-driver -Qsave-offload-code=/user/input/path %s -### 2>&1 \ | ||
// RUN: | FileCheck %s --check-prefixes=CHK-save-offload-code-WIN | ||
|
||
// CHK-save-offload-code: llvm-foreach{{.*}} "--out-dir=/user/input/path{{(/|\\\\)}}" "--" "{{.*}}llvm-spirv" | ||
// CHK-save-offload-code-WIN: llvm-foreach{{.*}} "--out-dir=/user/input/path{{(/|\\\\)}}" "--" "{{.*}}llvm-spirv" | ||
|
||
// Linux | ||
// RUN: %clang -fsycl --no-offload-new-driver -fsycl-targets=spir64-unknown-unknown -target x86_64-unknown-linux-gnu -save-offload-code= %s -### 2>&1 \ | ||
// RUN: | FileCheck %s --check-prefixes=CHK-save-offload-code-CWD | ||
|
||
// Windows | ||
// RUN: %clang_cl -fsycl --no-offload-new-driver -Qsave-offload-code= %s -### 2>&1 \ | ||
// RUN: | FileCheck %s --check-prefixes=CHK-save-offload-code-WIN-CWD | ||
|
||
// CHK-save-offload-code-CWD: llvm-foreach{{.*}} "--out-dir=.{{(/|\\\\)}}" "--" "{{.*}}llvm-spirv" | ||
// CHK-save-offload-code-WIN-CWD: llvm-foreach{{.*}} "--out-dir=.{{(/|\\\\)}}" "--" "{{.*}}llvm-spirv" |
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,34 @@ | ||
// SYCL offloading tests using -save-offload-code | ||
|
||
// Verify that -save-offload-code passes the option to | ||
// clang-linker-wrapper in the new offload model. | ||
|
||
// clang -fsycl --offload-new-driver -target x86_64-unknown-linux-gnu | ||
// RUN: %clang -fsycl --offload-new-driver -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -target x86_64-unknown-linux-gnu -save-offload-code=/user/input/path %s -### 2>&1 \ | ||
// RUN: | FileCheck %s --check-prefixes=CHK-save-offload-code-NEW-OFFLOAD | ||
|
||
// clang -fsycl --offload-new-driver -fsycl-targets=spir64-unknown-unknown | ||
// RUN: %clang -fsycl --offload-new-driver -fsycl-targets=spir64-unknown-unknown -target x86_64-unknown-linux-gnu -save-offload-code=/user/input/path %s -### 2>&1 \ | ||
// RUN: | FileCheck %s --check-prefixes=CHK-save-offload-code-NEW-OFFLOAD | ||
|
||
// clang --driver-mode=g++ | ||
// RUN: %clangxx -fsycl --offload-new-driver -fsycl-targets=spir64-unknown-unknown -target x86_64-unknown-linux-gnu -save-offload-code=/user/input/path %s -### 2>&1 \ | ||
// RUN: | FileCheck %s --check-prefixes=CHK-save-offload-code-NEW-OFFLOAD | ||
|
||
// Windows | ||
// RUN: %clang_cl -fsycl --offload-new-driver -Qsave-offload-code=/user/input/path %s -### 2>&1 \ | ||
// RUN: | FileCheck %s --check-prefixes=CHK-save-offload-code-WIN-NEW-OFFLOAD | ||
|
||
// CHK-save-offload-code-NEW-OFFLOAD: clang-linker-wrapper{{.*}} "-sycl-dump-device-code=/user/input/path" | ||
// CHK-save-offload-code-WIN-NEW-OFFLOAD: clang-linker-wrapper{{.*}} "-sycl-dump-device-code=/user/input/path" | ||
|
||
// Linux | ||
// RUN: %clang -fsycl --offload-new-driver -fsycl-targets=spir64-unknown-unknown -target x86_64-unknown-linux-gnu -save-offload-code= %s -### 2>&1 \ | ||
// RUN: | FileCheck %s --check-prefixes=CHK-save-offload-code-CWD-NEW-OFFLOAD | ||
|
||
// Windows | ||
// RUN: %clang_cl -fsycl --offload-new-driver -Qsave-offload-code= %s -### 2>&1 \ | ||
// RUN: | FileCheck %s --check-prefixes=CHK-save-offload-code-WIN-CWD-NEW-OFFLOAD | ||
|
||
// CHK-save-offload-code-CWD-NEW-OFFLOAD: clang-linker-wrapper{{.*}} "-sycl-dump-device-code=" | ||
// CHK-save-offload-code-WIN-CWD-NEW-OFFLOAD: clang-linker-wrapper{{.*}} "-sycl-dump-device-code=" |
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.