Skip to content

Commit

Permalink
DPCPP: GNU Make USE_GPU variable (AMReX-Codes#1689)
Browse files Browse the repository at this point in the history
Set USE_GPU=TRUE for dpcpp in Make.defs just like cuda and hip.
  • Loading branch information
WeiqunZhang authored Dec 28, 2020
1 parent 6309a8b commit 63a567f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Tools/GNUMake/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ endif

include $(AMREX_HOME)/Tools/GNUMake/Make.machines

ifdef USE_GPU
USE_GPU := $(strip $(USE_GPU))
else
USE_GPU := FALSE
endif

ifdef USE_DPCPP
USE_DPCPP := $(strip $(USE_DPCPP))
else
Expand All @@ -30,7 +36,8 @@ endif

ifeq ($(USE_DPCPP),TRUE)
override COMP = dpcpp
DEFINES += -DAMREX_USE_DPCPP -DAMREX_USE_GPU
DEFINES += -DAMREX_USE_DPCPP
USE_GPU := TRUE
USE_CUDA := FALSE
USE_HIP := FALSE
# disable ccache for now
Expand Down Expand Up @@ -620,8 +627,6 @@ ifeq ($(USE_FORCE_INLINE),TRUE)
CPPFLAGS += -DAMREX_USE_FORCE_INLINE
endif

USE_GPU := FALSE

ifeq ($(USE_ACC),TRUE)

USE_GPU := TRUE
Expand Down

0 comments on commit 63a567f

Please sign in to comment.