-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL] Enable AMD GPU support. #3795
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 all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
3d50c06
enable amd gpu
c6338ab
enable amd gpu
06cc4ce
enable AMD GPU
4edaf91
enable AMD GPU
578d95e
update Comment and some codes
63c9251
Merge branch 'intel:sycl' into amd-gpu
malixian f4bc26f
update GetStartedGuide
1a3558f
Merge branch 'amd-gpu' of https://github.com/malixian/llvm into amd-gpu
ddd7b90
update code and doc
2fdf931
modify code and comment
61d3f98
add necessary comment and format code
69f9d98
clang format code
10ee765
add amdgcn LIT
cdecf1c
Merge branch 'sycl' into amd-gpu
malixian 50d6fe1
fix amdgcn LIT
797a976
Merge branch 'sycl' into amd-gpu
malixian d089464
fix the driver LIT
6c799a5
Merge branch 'amd-gpu' of https://github.com/malixian/llvm into amd-gpu
7e38d88
Fix conflict resolution for clang/lib/Frontend/InitPreprocessor.cpp
cdf4d73
Update clang/test/Driver/sycl-offload-amdgcn.cpp
d3e2775
Update clang/lib/Driver/ToolChains/HIP.h
bader e3ee3c9
Apply suggestions: fix LIT, remove __SYCL_AMDGCN__
d831065
Update spirv_vars.hpp
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/// Tests specific to `-fsycl-targets=amdgcn-amd-amdhsa-sycldevice` | ||
// REQUIRES: clang-driver | ||
|
||
// UNSUPPORTED: system-windows | ||
|
||
/// Check action graph. | ||
// RUN: %clangxx -### -std=c++11 -target x86_64-unknown-linux-gnu -fsycl \ | ||
// RUN: -fsycl-targets=amdgcn-amd-amdhsa-sycldevice -mcpu=gfx906 \ | ||
// RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/libspirv.bc %s 2>&1 \ | ||
AGindinson marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// RUN: | FileCheck -check-prefix=CHK-ACTIONS %s | ||
// CHK-ACTIONS: "-cc1" "-triple" "amdgcn-amd-amdhsa-sycldevice" "-aux-triple" "x86_64-unknown-linux-gnu"{{.*}} "-fsycl-is-device"{{.*}} "-Wno-sycl-strict"{{.*}} "-sycl-std=2020" {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libspirv.bc"{{.*}} "-target-cpu" "gfx906"{{.*}} "-std=c++11"{{.*}} | ||
// CHK-ACTIONS-NOT: "-mllvm -sycl-opt" | ||
// CHK-ACTIONS: clang-offload-wrapper"{{.*}} "-host=x86_64-unknown-linux-gnu" "-target=amdgcn" "-kind=sycl"{{.*}} | ||
|
||
/// Check phases w/out specifying a compute capability. | ||
// RUN: %clangxx -ccc-print-phases -std=c++11 -target x86_64-unknown-linux-gnu -fsycl -fsycl-use-footer \ | ||
// RUN: -fsycl-targets=amdgcn-amd-amdhsa-sycldevice -mcpu=gfx906 %s 2>&1 \ | ||
// RUN: | FileCheck -check-prefix=CHK-PHASES-NO-CC %s | ||
// CHK-PHASES-NO-CC: 0: input, "{{.*}}", c++, (host-sycl) | ||
// CHK-PHASES-NO-CC: 1: preprocessor, {0}, c++-cpp-output, (host-sycl) | ||
// CHK-PHASES-NO-CC: 2: append-footer, {1}, c++, (host-sycl) | ||
// CHK-PHASES-NO-CC: 3: preprocessor, {2}, c++-cpp-output, (host-sycl) | ||
// CHK-PHASES-NO-CC: 4: input, "{{.*}}", c++, (device-sycl) | ||
// CHK-PHASES-NO-CC: 5: preprocessor, {4}, c++-cpp-output, (device-sycl) | ||
// CHK-PHASES-NO-CC: compiler, {5}, ir, (device-sycl) | ||
// CHK-PHASES-NO-CC: offload, "host-sycl (x86_64-unknown-linux-gnu)" {3}, "device-sycl (amdgcn-amd-amdhsa-sycldevice)" {6}, c++-cpp-output | ||
// CHK-PHASES-NO-CC: compiler, {7}, ir, (host-sycl) | ||
// CHK-PHASES-NO-CC: backend, {8}, assembler, (host-sycl) | ||
// CHK-PHASES-NO-CC: assembler, {9}, object, (host-sycl) | ||
// CHK-PHASES-NO-CC: linker, {10}, image, (host-sycl) | ||
// CHK-PHASES-NO-CC: linker, {6}, ir, (device-sycl) | ||
// CHK-PHASES-NO-CC: sycl-post-link, {12}, ir, (device-sycl) | ||
// CHK-PHASES-NO-CC: backend, {13}, assembler, (device-sycl) | ||
// CHK-PHASES-NO-CC: assembler, {14}, object, (device-sycl) | ||
// CHK-PHASES-NO-CC: linker, {15}, image, (device-sycl) | ||
// CHK-PHASES-NO-CC: linker, {16}, hip-fatbin, (device-sycl) | ||
// CHK-PHASES-NO-CC: clang-offload-wrapper, {17}, object, (device-sycl) | ||
// CHK-PHASES-NO-CC: offload, "host-sycl (x86_64-unknown-linux-gnu)" {11}, "device-sycl (amdgcn-amd-amdhsa-sycldevice)" {18}, image |
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.
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.
@malixian, one note.
As of today, we don't have AMD GPU HW in our CI system, so we won't be able to validate that other contributions do not break ROCM support.
I think we should decide ASAP, how ROCM support is going to be verified.
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.
This is indeed a problem.
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.
At least for plugin we can use hip<->cuda source code compatibility