Skip to content

Commit 0677cef

Browse files
committed
Add new recipe to cudacpp.mk makefile to write the cppauto resolved backend to a file
1 parent 1cce307 commit 0677cef

File tree

1 file changed

+11
-0
lines changed
  • epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu

1 file changed

+11
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ endif
5757
#=== Redefine BACKEND if the current value is 'cppauto'
5858

5959
# Set the default BACKEND choice corresponding to 'cppauto' (the 'best' C++ vectorization available: eventually use native instead?)
60+
BACKEND_ORIG := $(BACKEND)
6061
ifeq ($(BACKEND),cppauto)
6162
ifeq ($(UNAME_P),ppc64le)
6263
override BACKEND = cppsse4
@@ -80,6 +81,11 @@ else
8081
$(info BACKEND='$(BACKEND)')
8182
endif
8283

84+
# Create file with the resolved backend in case user chooses 'cppauto'
85+
BACKEND_LOG ?= .resolved-backend
86+
ifneq ($(BACKEND_ORIG),$(BACKEND))
87+
$(file >$(BACKEND_LOG),$(BACKEND))
88+
endif
8389
#-------------------------------------------------------------------------------
8490

8591
#=== Configure the C++ compiler
@@ -1235,4 +1241,9 @@ endif
12351241
cuda-memcheck: all.$(TAG)
12361242
$(RUNTIME) $(CUDA_HOME)/bin/cuda-memcheck --check-api-memory-access yes --check-deprecated-instr yes --check-device-heap yes --demangle full --language c --leak-check full --racecheck-report all --report-api-errors all --show-backtrace yes --tool memcheck --track-unused-memory yes $(BUILDDIR)/check_$(GPUSUFFIX).exe -p 2 32 2
12371243

1244+
# Detect backend (to be used in case of 'cppauto' to give info to the user)
1245+
.PHONY: detect-backend
1246+
detect-backend:
1247+
@echo "Resolved backend has already been written to $(BACKEND_LOG) at parse time."
1248+
12381249
#-------------------------------------------------------------------------------

0 commit comments

Comments
 (0)