Skip to content

Commit 5e86a41

Browse files
authored
[SYCL][HIP] Support amd-gpu-gfx1034 as an acceptable value for -fsycl-targets (#8106)
* AMD GFX1034 is ROCm supported architecture and as such amd-gpu-gfx1034 is added as an acceptable value for -fsycl-targets. * Remove `Added in version` for supported architectures.
1 parent 3df87e2 commit 5e86a41

File tree

7 files changed

+96
-80
lines changed

7 files changed

+96
-80
lines changed

clang/lib/Driver/ToolChains/SYCL.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,7 @@ StringRef SYCL::gen::resolveGenDevice(StringRef DeviceName) {
693693
.Case("amd_gpu_gfx1030", "gfx1030")
694694
.Case("amd_gpu_gfx1031", "gfx1031")
695695
.Case("amd_gpu_gfx1032", "gfx1032")
696+
.Case("amd_gpu_gfx1034", "gfx1034")
696697
.Default("");
697698
return Device;
698699
}
@@ -757,6 +758,7 @@ SmallString<64> SYCL::gen::getGenDeviceMacro(StringRef DeviceName) {
757758
.Case("gfx1030", "AMD_GPU_GFX1030")
758759
.Case("gfx1031", "AMD_GPU_GFX1031")
759760
.Case("gfx1032", "AMD_GPU_GFX1032")
761+
.Case("gfx1034", "AMD_GPU_GFX1034")
760762
.Default("");
761763
if (!Ext.empty()) {
762764
Macro = "__SYCL_TARGET_";

clang/test/Driver/sycl-oneapi-gpu.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,13 @@
166166
// RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx1031 -DMAC_STR=GFX1031
167167
// RUN: %clangxx -fsycl -fsycl-targets=amd_gpu_gfx1032 -### %s 2>&1 | \
168168
// RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx1032 -DMAC_STR=GFX1032
169+
// RUN: %clangxx -fsycl -fsycl-targets=amd_gpu_gfx1034 -### %s 2>&1 | \
170+
// RUN: FileCheck %s --check-prefixes=DEVICE_AMD,MACRO_AMD -DDEV_STR=gfx1034 -DMAC_STR=GFX1034
169171
// MACRO_AMD: clang{{.*}} "-triple" "amdgcn-amd-amdhsa"
170172
// MACRO_AMD: "-D__SYCL_TARGET_AMD_GPU_[[MAC_STR]]__"
171173
// DEVICE_AMD: clang-offload-wrapper{{.*}} "-compile-opts=--offload-arch=[[DEV_STR]]{{.*}}"
172174
// MACRO_AMD: clang{{.*}} "-fsycl-is-host"
173175
// MACRO_AMD: "-D__SYCL_TARGET_AMD_GPU_[[MAC_STR]]__"
174-
175176
/// -fsycl-targets=spir64_x86_64 should set a specific macro
176177
// RUN: %clangxx -c -fsycl -fsycl-targets=spir64_x86_64 -### %s 2>&1 | \
177178
// RUN: FileCheck %s --check-prefix=MACRO_X86_64

sycl/doc/UsersManual.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ and not recommended to use in production environment.
9292
* amd_gpu_gfx1030 - AMD GCN GFX10.3 (RDNA 2) architecture
9393
* amd_gpu_gfx1031 - GCN GFX10.3 (RDNA 2) architecture
9494
* amd_gpu_gfx1032 - GCN GFX10.3 (RDNA 2) architecture
95+
* amd_gpu_gfx1034 - GCN GFX10.3 (RDNA 2) architecture
9596

9697
## Language options
9798

sycl/doc/design/DeviceIf.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ recognizes:
108108
* `amd_gpu_gfx1030`
109109
* `amd_gpu_gfx1031`
110110
* `amd_gpu_gfx1032`
111+
* `amd_gpu_gfx1034`
111112

112113
The above listed device names may not be mixed with the existing target name
113114
`spir64_gen` on the same command line. In addition, the user must not pass the
@@ -190,6 +191,7 @@ one of the following corresponding C++ macro names:
190191
* `__SYCL_TARGET_AMD_GPU_GFX1030__`
191192
* `__SYCL_TARGET_AMD_GPU_GFX1031__`
192193
* `__SYCL_TARGET_AMD_GPU_GFX1032__`
194+
* `__SYCL_TARGET_AMD_GPU_GFX1034__`
193195

194196
If the user invokes the compiler driver with `-fsycl-targets=spir64_x86_64`,
195197
the compiler driver must predefine the following C++ macro name:

0 commit comments

Comments
 (0)