Skip to content

Commit 332ce8b

Browse files
committed
updates AMD HIP card options
1 parent 2f5a542 commit 332ce8b

3 files changed

Lines changed: 57 additions & 4 deletions

File tree

Makefile.in

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,18 +260,23 @@ GENCODE_90 = -gencode=arch=compute_90,code=\"sm_90,compute_90\"
260260
# Radeon Instinct MI50: --amdgpu-target=gfx906
261261
# Radeon Instinct MI100: --amdgpu-target=gfx908
262262
# Radeon Instinct MI210/250/250X: --amdgpu-target=gfx90a
263+
# Instinct MI300X/300A/325X: --amdgpu-target=gfx942
264+
# Instinct MI350X/355X: --amdgpu-target=gfx950
263265
GENCODE_AMD_MI8 = --amdgpu-target=gfx803
264266
GENCODE_AMD_MI25 = --amdgpu-target=gfx900
265267
GENCODE_AMD_MI50 = --amdgpu-target=gfx906
266268
GENCODE_AMD_MI100 = --amdgpu-target=gfx908
267269
GENCODE_AMD_MI250 = --amdgpu-target=gfx90a
270+
GENCODE_AMD_MI300 = --amdgpu-target=gfx942
271+
GENCODE_AMD_MI325 = --amdgpu-target=gfx942
272+
GENCODE_AMD_MI350 = --amdgpu-target=gfx950
268273

269274
# default targets
270-
# AMD default MI50 & MI100
271-
@COND_HIP_TRUE@@COND_HIP_PLATFORM_AMD_TRUE@GENCODE_HIP = $(GENCODE_AMD_MI50) $(GENCODE_AMD_MI100)
275+
# AMD default MI250 & MI300
276+
@COND_HIP_TRUE@@COND_HIP_PLATFORM_AMD_TRUE@GENCODE_HIP = $(GENCODE_AMD_MI250) $(GENCODE_AMD_MI300)
272277
@COND_HIP_TRUE@@COND_HIP_PLATFORM_AMD_TRUE@HIP_CFLAG_ENDING = -x hip
273-
# NVIDIA default Tesla
274-
@COND_HIP_TRUE@@COND_HIP_PLATFORM_NVIDIA_TRUE@GENCODE_HIP = $(GENCODE_30)
278+
# NVIDIA default Turing
279+
@COND_HIP_TRUE@@COND_HIP_PLATFORM_NVIDIA_TRUE@GENCODE_HIP = $(GENCODE_75)
275280
@COND_HIP_TRUE@@COND_HIP_PLATFORM_NVIDIA_TRUE@HIP_CFLAG_ENDING = # no need for ending
276281
# CPU
277282
@COND_HIP_TRUE@@COND_HIP_PLATFORM_CPU_TRUE@GENCODE_HIP = # no card specifics
@@ -283,6 +288,9 @@ GENCODE_AMD_MI250 = --amdgpu-target=gfx90a
283288
@COND_HIP_TRUE@@COND_HIP_MI50_TRUE@GENCODE_HIP = $(GENCODE_AMD_MI50) # --with-hip=MI50 ..
284289
@COND_HIP_TRUE@@COND_HIP_MI100_TRUE@GENCODE_HIP = $(GENCODE_AMD_MI100) # --with-hip=MI100 ..
285290
@COND_HIP_TRUE@@COND_HIP_MI250_TRUE@GENCODE_HIP = $(GENCODE_AMD_MI250) # --with-hip=MI250 ..
291+
@COND_HIP_TRUE@@COND_HIP_MI300_TRUE@GENCODE_HIP = $(GENCODE_AMD_MI300) # --with-hip=MI300 ..
292+
@COND_HIP_TRUE@@COND_HIP_MI325_TRUE@GENCODE_HIP = $(GENCODE_AMD_MI325) # --with-hip=MI325 ..
293+
@COND_HIP_TRUE@@COND_HIP_MI350_TRUE@GENCODE_HIP = $(GENCODE_AMD_MI350) # --with-hip=MI350 ..
286294

287295
@COND_HIP_TRUE@@COND_HIP_CUDA5_TRUE@GENCODE_HIP = $(GENCODE_35) # --with-hip=cuda5 ..
288296
@COND_HIP_TRUE@@COND_HIP_CUDA6_TRUE@GENCODE_HIP = $(GENCODE_37) # --with-hip=cuda6 ..

configure

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,12 @@ COND_HIP_CUDA6_FALSE
764764
COND_HIP_CUDA6_TRUE
765765
COND_HIP_CUDA5_FALSE
766766
COND_HIP_CUDA5_TRUE
767+
COND_HIP_MI350_FALSE
768+
COND_HIP_MI350_TRUE
769+
COND_HIP_MI325_FALSE
770+
COND_HIP_MI325_TRUE
771+
COND_HIP_MI300_FALSE
772+
COND_HIP_MI300_TRUE
767773
COND_HIP_MI250_FALSE
768774
COND_HIP_MI250_TRUE
769775
COND_HIP_MI100_FALSE
@@ -3599,6 +3605,30 @@ else
35993605
COND_HIP_MI250_FALSE=
36003606
fi
36013607

3608+
if test x"$want_hip" = xMI300; then
3609+
COND_HIP_MI300_TRUE=
3610+
COND_HIP_MI300_FALSE='#'
3611+
else
3612+
COND_HIP_MI300_TRUE='#'
3613+
COND_HIP_MI300_FALSE=
3614+
fi
3615+
3616+
if test x"$want_hip" = xMI325; then
3617+
COND_HIP_MI325_TRUE=
3618+
COND_HIP_MI325_FALSE='#'
3619+
else
3620+
COND_HIP_MI325_TRUE='#'
3621+
COND_HIP_MI325_FALSE=
3622+
fi
3623+
3624+
if test x"$want_hip" = xMI350; then
3625+
COND_HIP_MI350_TRUE=
3626+
COND_HIP_MI350_FALSE='#'
3627+
else
3628+
COND_HIP_MI350_TRUE='#'
3629+
COND_HIP_MI350_FALSE=
3630+
fi
3631+
36023632

36033633
if test x"$want_hip" = xcuda5; then
36043634
COND_HIP_CUDA5_TRUE=
@@ -12374,6 +12404,18 @@ if test -z "${COND_HIP_MI250_TRUE}" && test -z "${COND_HIP_MI250_FALSE}"; then
1237412404
as_fn_error $? "conditional \"COND_HIP_MI250\" was never defined.
1237512405
Usually this means the macro was only invoked conditionally." "$LINENO" 5
1237612406
fi
12407+
if test -z "${COND_HIP_MI300_TRUE}" && test -z "${COND_HIP_MI300_FALSE}"; then
12408+
as_fn_error $? "conditional \"COND_HIP_MI300\" was never defined.
12409+
Usually this means the macro was only invoked conditionally." "$LINENO" 5
12410+
fi
12411+
if test -z "${COND_HIP_MI325_TRUE}" && test -z "${COND_HIP_MI325_FALSE}"; then
12412+
as_fn_error $? "conditional \"COND_HIP_MI325\" was never defined.
12413+
Usually this means the macro was only invoked conditionally." "$LINENO" 5
12414+
fi
12415+
if test -z "${COND_HIP_MI350_TRUE}" && test -z "${COND_HIP_MI350_FALSE}"; then
12416+
as_fn_error $? "conditional \"COND_HIP_MI350\" was never defined.
12417+
Usually this means the macro was only invoked conditionally." "$LINENO" 5
12418+
fi
1237712419
if test -z "${COND_HIP_CUDA5_TRUE}" && test -z "${COND_HIP_CUDA5_FALSE}"; then
1237812420
as_fn_error $? "conditional \"COND_HIP_CUDA5\" was never defined.
1237912421
Usually this means the macro was only invoked conditionally." "$LINENO" 5

configure.ac

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ AM_CONDITIONAL([COND_HIP_MI25], [test x"$want_hip" = xMI25])
144144
AM_CONDITIONAL([COND_HIP_MI50], [test x"$want_hip" = xMI50])
145145
AM_CONDITIONAL([COND_HIP_MI100], [test x"$want_hip" = xMI100])
146146
AM_CONDITIONAL([COND_HIP_MI250], [test x"$want_hip" = xMI250])
147+
AM_CONDITIONAL([COND_HIP_MI300], [test x"$want_hip" = xMI300])
148+
AM_CONDITIONAL([COND_HIP_MI325], [test x"$want_hip" = xMI325])
149+
AM_CONDITIONAL([COND_HIP_MI350], [test x"$want_hip" = xMI350])
147150

148151
AM_CONDITIONAL([COND_HIP_CUDA5], [test x"$want_hip" = xcuda5])
149152
AM_CONDITIONAL([COND_HIP_CUDA6], [test x"$want_hip" = xcuda6])

0 commit comments

Comments
 (0)