-
Notifications
You must be signed in to change notification settings - Fork 795
[Driver][SYCL] Add support for -fsyclbin #17252
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 8 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ca4221b
[Driver][SYCL] Add support for -fsyclbin
mdtoguchi 8d2820d
Merge remote-tracking branch 'intel_llvm/sycl' into fsyclbin-driver
mdtoguchi e6972f7
Allow for -fsyclbin to imply -fsycl enabling behaviors
mdtoguchi e3d48cc
Clang format
mdtoguchi c08b568
Use of -fsycl-device-only will win against -fsyclbin
mdtoguchi 7d66cbe
Merge remote-tracking branch 'intel_llvm/sycl' into fsyclbin-driver
mdtoguchi e58dceb
Merge remote-tracking branch 'intel_llvm/sycl' into fsyclbin-driver
mdtoguchi 6be9a0c
Update simple_kernel test to use -fsyclbin
mdtoguchi ed88324
Update comments
mdtoguchi d27d9c3
Update output file behaviors
mdtoguchi 42754dc
Update tests to be more Linux specific in behavior
mdtoguchi 0d5933e
Merge remote-tracking branch 'intel_llvm/sycl' into fsyclbin-driver
mdtoguchi 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| /// Tests behaviors of -fsyclbin | ||
|
|
||
| /// -fsyclbin is only used with the new offloading model. | ||
| // RUN: %clangxx -fsycl -fsyclbin --no-offload-new-driver %s -### 2>&1 \ | ||
| // RUN: | FileCheck %s --check-prefix=UNUSED | ||
| // UNUSED: warning: argument unused during compilation: '-fsyclbin' | ||
|
|
||
| /// -fsyclbin -fsycl-device-only usage. -fsycl-device-only will 'win' and | ||
| /// -fsyclbin is effectively ignored. | ||
| // RUN: %clangxx -fsycl-device-only -fsyclbin --offload-new-driver %s -### 2>&1 \ | ||
srividya-sundaram marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| // RUN: | FileCheck %s --check-prefix=SYCLBIN_UNUSED | ||
| // RUN: %clang_cl -fsycl-device-only -fsyclbin --offload-new-driver %s -### 2>&1 \ | ||
| // RUN: | FileCheck %s --check-prefix=SYCLBIN_UNUSED | ||
| // SYCLBIN_UNUSED: warning: argument unused during compilation: '-fsyclbin' | ||
|
|
||
| /// Check tool invocation contents. | ||
| // RUN: %clangxx -fsycl -fsyclbin --offload-new-driver %s -### 2>&1 \ | ||
| // RUN: | FileCheck %s --check-prefix=CHECK_TOOLS | ||
| // RUN: %clangxx -fsyclbin --offload-new-driver %s -### 2>&1 \ | ||
| // RUN: | FileCheck %s --check-prefix=CHECK_TOOLS | ||
| // RUN: %clang_cl -fsycl -fsyclbin --offload-new-driver %s -### 2>&1 \ | ||
| // RUN: | FileCheck %s --check-prefix=CHECK_TOOLS | ||
| // CHECK_TOOLS: clang-offload-packager | ||
| // CHECK_TOOLS-SAME: --image=file={{.*}}.bc,triple=spir64-unknown-unknown | ||
| // CHECK_TOOLS-SAME: kind=sycl | ||
| // CHECK_TOOLS: clang-linker-wrapper | ||
| // CHECK_TOOLS-SAME: --syclbin | ||
|
|
||
| /// Check compilation phases, only device compile should be performed | ||
| // RUN: %clangxx --target=x86_64-unknown-linux-gnu -fsycl -fsyclbin \ | ||
| // RUN: --offload-new-driver %s -ccc-print-phases 2>&1 \ | ||
| // RUN: | FileCheck %s --check-prefix=CHECK_PHASES | ||
| // RUN: %clangxx --target=x86_64-unknown-linux-gnu -fsyclbin \ | ||
| // RUN: --offload-new-driver %s -ccc-print-phases 2>&1 \ | ||
| // RUN: | FileCheck %s --check-prefix=CHECK_PHASES | ||
| // CHECK_PHASES: 0: input, "{{.*}}", c++, (device-sycl) | ||
| // CHECK_PHASES: 1: preprocessor, {0}, c++-cpp-output, (device-sycl) | ||
| // CHECK_PHASES: 2: compiler, {1}, ir, (device-sycl) | ||
| // CHECK_PHASES: 3: backend, {2}, ir, (device-sycl) | ||
| // CHECK_PHASES: 4: offload, "device-sycl (spir64-unknown-unknown)" {3}, ir | ||
| // CHECK_PHASES: 5: clang-offload-packager, {4}, image, (device-sycl) | ||
| // CHECK_PHASES: 6: clang-linker-wrapper, {5}, image, (device-sycl) | ||
| // CHECK_PHASES: 7: offload, "device-sycl (x86_64-unknown-linux-gnu)" {6}, none | ||
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
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.