Skip to content

Commit d837543

Browse files
committed
allow setting the AMD GPU architecture from outside the makefile
1 parent 17e12ca commit d837543

File tree

2 files changed

+4
-2
lines changed
  • MG5aMC
  • epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu

2 files changed

+4
-2
lines changed

MG5aMC/mg5amcnlo

epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/cudacpp.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ ifeq ($(BACKEND),cuda)
229229

230230
else ifeq ($(BACKEND),hip)
231231

232+
# example architecture values MI200:gfx90a, MI350X:gfx942
233+
MADGRAPH_HIP_ARCHITECTURE ?= gfx942
232234
# Set GPUCC as $(HIP_HOME)/bin/hipcc (it was already checked above that this exists)
233235
GPUCC = $(HIP_HOME)/bin/hipcc
234236
XCOMPILERFLAG =
@@ -243,7 +245,7 @@ else ifeq ($(BACKEND),hip)
243245
###GPUFLAGS += -ggdb # FOR DEBUGGING ONLY
244246

245247
# AMD HIP architecture flags
246-
GPUARCHFLAGS = --offload-arch=gfx942
248+
GPUARCHFLAGS = --offload-arch=${MADGRAPH_HIP_ARCHITECTURE}
247249
GPUFLAGS += $(GPUARCHFLAGS)
248250

249251
# Other AMD-specific flags

0 commit comments

Comments
 (0)