Skip to content

Commit 0d20648

Browse files
authored
Merge pull request #870 from danielpeter/devel
code cleaning; updates configuration script (HIP card options)
2 parents dd9b3d7 + 71d01a3 commit 0d20648

21 files changed

+650
-282
lines changed

DATA/IRIS_EMC/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Then, select in the `DATA/Par_file`:
4949
```
5050
MODEL = EMC_model
5151
```
52-
to read in and use the EMC model.
52+
to read in and use the EMC model.
5353

5454
Additionally, for local EMC models the mesher `xmeshfem3D` can use parameters to produce local meshes, with a cut-off depth and local doubling layers.
5555
In `Par_file`, the following settings could be defined, for example in the Alaska model case:
@@ -95,7 +95,7 @@ which can be used as a guideline to select a stable `DT` size.
9595

9696
## Implementation
9797

98-
Currently, we support the above mentioned Alaska and CVM model files only.
98+
Currently, we support the above mentioned Alaska and CVM model files only.
9999
Other models might define different parameters and are likely not compatible at the moment.
100100

101101
More general support will hopefully come in future.

Makefile.in

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,18 +223,23 @@ OCL_LINK = @OCL_LDFLAGS@ @OCL_LIBS@
223223
# Radeon Instinct MI50: --amdgpu-target=gfx906
224224
# Radeon Instinct MI100: --amdgpu-target=gfx908
225225
# Radeon Instinct MI210/250/250X: --amdgpu-target=gfx90a
226+
# Instinct MI300X/300A/325X: --amdgpu-target=gfx942
227+
# Instinct MI350X/355X: --amdgpu-target=gfx950
226228
GENCODE_AMD_MI8 = --amdgpu-target=gfx803
227229
GENCODE_AMD_MI25 = --amdgpu-target=gfx900
228230
GENCODE_AMD_MI50 = --amdgpu-target=gfx906
229231
GENCODE_AMD_MI100 = --amdgpu-target=gfx908
230232
GENCODE_AMD_MI250 = --amdgpu-target=gfx90a
233+
GENCODE_AMD_MI300 = --amdgpu-target=gfx942
234+
GENCODE_AMD_MI325 = --amdgpu-target=gfx942
235+
GENCODE_AMD_MI350 = --amdgpu-target=gfx950
231236

232237
# default targets
233-
# AMD default MI50 & MI100
234-
@COND_HIP_TRUE@@COND_HIP_PLATFORM_AMD_TRUE@GENCODE_HIP = $(GENCODE_AMD_MI50) $(GENCODE_AMD_MI100)
238+
# AMD default MI250 & MI300
239+
@COND_HIP_TRUE@@COND_HIP_PLATFORM_AMD_TRUE@GENCODE_HIP = $(GENCODE_AMD_MI250) $(GENCODE_AMD_MI300)
235240
@COND_HIP_TRUE@@COND_HIP_PLATFORM_AMD_TRUE@HIP_CFLAG_ENDING = -x hip # HIP compilation of src/gpu/*.c files
236-
# NVIDIA default Tesla
237-
@COND_HIP_TRUE@@COND_HIP_PLATFORM_NVIDIA_TRUE@GENCODE_HIP = $(GENCODE_30)
241+
# NVIDIA default Turing
242+
@COND_HIP_TRUE@@COND_HIP_PLATFORM_NVIDIA_TRUE@GENCODE_HIP = $(GENCODE_75)
238243
@COND_HIP_TRUE@@COND_HIP_PLATFORM_NVIDIA_TRUE@HIP_CFLAG_ENDING = -x cu # CUDA compilation or src/gpu/*.c files
239244

240245
# specific targets
@@ -243,6 +248,9 @@ GENCODE_AMD_MI250 = --amdgpu-target=gfx90a
243248
@COND_HIP_TRUE@@COND_HIP_MI50_TRUE@GENCODE_HIP = $(GENCODE_AMD_MI50) $(FC_DEFINE)GPU_DEVICE_MI50 # --with-hip=MI50 ..
244249
@COND_HIP_TRUE@@COND_HIP_MI100_TRUE@GENCODE_HIP = $(GENCODE_AMD_MI100) $(FC_DEFINE)GPU_DEVICE_MI100 # --with-hip=MI100 ..
245250
@COND_HIP_TRUE@@COND_HIP_MI250_TRUE@GENCODE_HIP = $(GENCODE_AMD_MI250) $(FC_DEFINE)GPU_DEVICE_MI250 # --with-hip=MI250 ..
251+
@COND_HIP_TRUE@@COND_HIP_MI300_TRUE@GENCODE_HIP = $(GENCODE_AMD_MI300) $(FC_DEFINE)GPU_DEVICE_MI300 # --with-hip=MI300 ..
252+
@COND_HIP_TRUE@@COND_HIP_MI325_TRUE@GENCODE_HIP = $(GENCODE_AMD_MI325) $(FC_DEFINE)GPU_DEVICE_MI325 # --with-hip=MI325 ..
253+
@COND_HIP_TRUE@@COND_HIP_MI350_TRUE@GENCODE_HIP = $(GENCODE_AMD_MI350) $(FC_DEFINE)GPU_DEVICE_MI350 # --with-hip=MI350 ..
246254

247255
@COND_HIP_TRUE@@COND_HIP_CUDA5_TRUE@GENCODE_HIP = $(GENCODE_35) # --with-hip=cuda5 ..
248256
@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
@@ -787,6 +787,12 @@ COND_HIP_CUDA6_FALSE
787787
COND_HIP_CUDA6_TRUE
788788
COND_HIP_CUDA5_FALSE
789789
COND_HIP_CUDA5_TRUE
790+
COND_HIP_MI350_FALSE
791+
COND_HIP_MI350_TRUE
792+
COND_HIP_MI325_FALSE
793+
COND_HIP_MI325_TRUE
794+
COND_HIP_MI300_FALSE
795+
COND_HIP_MI300_TRUE
790796
COND_HIP_MI250_FALSE
791797
COND_HIP_MI250_TRUE
792798
COND_HIP_MI100_FALSE
@@ -3721,6 +3727,30 @@ else
37213727
COND_HIP_MI250_FALSE=
37223728
fi
37233729

3730+
if test x"$want_hip" = xMI300; then
3731+
COND_HIP_MI300_TRUE=
3732+
COND_HIP_MI300_FALSE='#'
3733+
else
3734+
COND_HIP_MI300_TRUE='#'
3735+
COND_HIP_MI300_FALSE=
3736+
fi
3737+
3738+
if test x"$want_hip" = xMI325; then
3739+
COND_HIP_MI325_TRUE=
3740+
COND_HIP_MI325_FALSE='#'
3741+
else
3742+
COND_HIP_MI325_TRUE='#'
3743+
COND_HIP_MI325_FALSE=
3744+
fi
3745+
3746+
if test x"$want_hip" = xMI350; then
3747+
COND_HIP_MI350_TRUE=
3748+
COND_HIP_MI350_FALSE='#'
3749+
else
3750+
COND_HIP_MI350_TRUE='#'
3751+
COND_HIP_MI350_FALSE=
3752+
fi
3753+
37243754

37253755
if test x"$want_hip" = xcuda5; then
37263756
COND_HIP_CUDA5_TRUE=
@@ -12319,6 +12349,18 @@ if test -z "${COND_HIP_MI250_TRUE}" && test -z "${COND_HIP_MI250_FALSE}"; then
1231912349
as_fn_error $? "conditional \"COND_HIP_MI250\" was never defined.
1232012350
Usually this means the macro was only invoked conditionally." "$LINENO" 5
1232112351
fi
12352+
if test -z "${COND_HIP_MI300_TRUE}" && test -z "${COND_HIP_MI300_FALSE}"; then
12353+
as_fn_error $? "conditional \"COND_HIP_MI300\" was never defined.
12354+
Usually this means the macro was only invoked conditionally." "$LINENO" 5
12355+
fi
12356+
if test -z "${COND_HIP_MI325_TRUE}" && test -z "${COND_HIP_MI325_FALSE}"; then
12357+
as_fn_error $? "conditional \"COND_HIP_MI325\" was never defined.
12358+
Usually this means the macro was only invoked conditionally." "$LINENO" 5
12359+
fi
12360+
if test -z "${COND_HIP_MI350_TRUE}" && test -z "${COND_HIP_MI350_FALSE}"; then
12361+
as_fn_error $? "conditional \"COND_HIP_MI350\" was never defined.
12362+
Usually this means the macro was only invoked conditionally." "$LINENO" 5
12363+
fi
1232212364
if test -z "${COND_HIP_CUDA5_TRUE}" && test -z "${COND_HIP_CUDA5_FALSE}"; then
1232312365
as_fn_error $? "conditional \"COND_HIP_CUDA5\" was never defined.
1232412366
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
@@ -160,6 +160,9 @@ AM_CONDITIONAL([COND_HIP_MI25], [test x"$want_hip" = xMI25])
160160
AM_CONDITIONAL([COND_HIP_MI50], [test x"$want_hip" = xMI50])
161161
AM_CONDITIONAL([COND_HIP_MI100], [test x"$want_hip" = xMI100])
162162
AM_CONDITIONAL([COND_HIP_MI250], [test x"$want_hip" = xMI250])
163+
AM_CONDITIONAL([COND_HIP_MI300], [test x"$want_hip" = xMI300])
164+
AM_CONDITIONAL([COND_HIP_MI325], [test x"$want_hip" = xMI325])
165+
AM_CONDITIONAL([COND_HIP_MI350], [test x"$want_hip" = xMI350])
163166

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

src/gpu/mesh_constants_hip.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050
//#define LAUNCH_MIN_BLOCKS 7
5151
#endif
5252

53+
// AMD MI350X
54+
#ifdef GPU_DEVICE_MI350
55+
#undef USE_LAUNCH_BOUNDS
56+
#endif
57+
5358
/*----------------------------------------------------------------------------------------------- */
5459

5560
// definitions

0 commit comments

Comments
 (0)