Skip to content

Commit 4d1d127

Browse files
authored
[HIP] Make the HIP default architecture use the enum value (llvm#84400)
Summary: This default enum is used in other places, we should keep it consistent.
1 parent 1ca8092 commit 4d1d127

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang/include/clang/Basic/Cuda.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ enum class CudaArch {
123123
LAST,
124124

125125
CudaDefault = CudaArch::SM_52,
126-
HIPDefault = CudaArch::GFX803,
126+
HIPDefault = CudaArch::GFX906,
127127
};
128128

129129
static inline bool IsNVIDIAGpuArch(CudaArch A) {

clang/lib/Driver/Driver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3373,7 +3373,7 @@ class OffloadingActionBuilder final {
33733373
const Driver::InputList &Inputs)
33743374
: CudaActionBuilderBase(C, Args, Inputs, Action::OFK_HIP) {
33753375

3376-
DefaultCudaArch = CudaArch::GFX906;
3376+
DefaultCudaArch = CudaArch::HIPDefault;
33773377

33783378
if (Args.hasArg(options::OPT_fhip_emit_relocatable,
33793379
options::OPT_fno_hip_emit_relocatable)) {

0 commit comments

Comments
 (0)