Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[HIP] Fix bug in driver about wavefront size
The static variable causes it only initialized once and take the same value for different GPU archs, whereas they may be different for different GPU archs, e.g. when there are both gfx900 and gfx1010. Removing static fixes that. Differential Revision: https://reviews.llvm.org/D92628
- Loading branch information
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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 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,21 @@ | ||
// REQUIRES: clang-driver,amdgpu-registered-target | ||
|
||
// RUN: %clang -### -target x86_64-linux-gnu \ | ||
// RUN: --cuda-gpu-arch=gfx900 \ | ||
// RUN: --rocm-path=%S/Inputs/rocm --cuda-device-only %s \ | ||
// RUN: 2>&1 | FileCheck %s --check-prefixes=WAVE64 | ||
// WAVE64: "-mlink-builtin-bitcode" "{{.*}}oclc_wavefrontsize64_on.bc"{{.*}} "-target-cpu" "gfx900" | ||
|
||
// RUN: %clang -### -target x86_64-linux-gnu \ | ||
// RUN: --cuda-gpu-arch=gfx1010 \ | ||
// RUN: --rocm-path=%S/Inputs/rocm --cuda-device-only %s \ | ||
// RUN: 2>&1 | FileCheck %s --check-prefixes=WAVE32 | ||
// WAVE32: "-mlink-builtin-bitcode" "{{.*}}oclc_wavefrontsize64_off.bc"{{.*}} "-target-cpu" "gfx1010" | ||
|
||
// RUN: %clang -### -target x86_64-linux-gnu \ | ||
// RUN: --cuda-gpu-arch=gfx1010 \ | ||
// RUN: --cuda-gpu-arch=gfx900 \ | ||
// RUN: --rocm-path=%S/Inputs/rocm --cuda-device-only %s \ | ||
// RUN: 2>&1 | FileCheck %s --check-prefixes=BOTH | ||
// BOTH-DAG: "-mlink-builtin-bitcode" "{{.*}}oclc_wavefrontsize64_on.bc"{{.*}} "-target-cpu" "gfx900" | ||
// BOTH-DAG: "-mlink-builtin-bitcode" "{{.*}}oclc_wavefrontsize64_off.bc"{{.*}} "-target-cpu" "gfx1010" |