Skip to content

Commit

Permalink
GNUMake: remove unused define for HIP compilation (AMReX-Codes#1372)
Browse files Browse the repository at this point in the history
* GNUMake: remove unused AMREX_HIP_PLATFORM define

* GNUMake: rename HIP_PLATFORM to HIP_COMPILER for consistency
  • Loading branch information
mic84 authored Sep 17, 2020
1 parent 5903616 commit 5a2d460
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions Tools/GNUMake/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ ifeq ($(USE_HIP),TRUE)
DEBUG := FALSE # Currently there is a compiler bug for DEBUG=TRUE.
USE_CUDA := FALSE
COMP := hip
HIP_PLATFORM = $(shell hipconfig --compiler)
ifeq ($(HIP_PLATFORM),nvcc)
$(error HIP_PLATFORM nvcc is not supported at this time. Use USE_CUDA to compile for NVIDIA platforms)
else ifeq ($(HIP_PLATFORM),hcc)
$(error HIP_PLATFORM=hcc is no longer supported)
else ifeq ($(HIP_PLATFORM),clang)
HIP_COMPILER = $(shell hipconfig --compiler)
ifeq ($(HIP_COMPILER),nvcc)
$(error HIP_COMPILER=nvcc is not supported at this time. Use USE_CUDA to compile for NVIDIA platforms)
else ifeq ($(HIP_COMPILER),hcc)
$(error HIP_COMPILER=hcc is no longer supported)
else ifeq ($(HIP_COMPILER),clang)
else
$(error Unknown HIP_PLATFORM=$(HIP_PLATFORM))
$(error Unknown HIP_COMPILER=$(HIP_COMPILER))
endif
endif

Expand Down Expand Up @@ -639,7 +639,7 @@ ifeq ($(USE_HIP),TRUE)

USE_GPU := TRUE

DEFINES += -DAMREX_USE_HIP -DAMREX_HIP_PLATFORM=$(HIP_PLATFORM)
DEFINES += -DAMREX_USE_HIP

GPUSuffix := .HIP

Expand Down
6 changes: 3 additions & 3 deletions Tools/GNUMake/comps/hip.mak
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ endif # BL_NO_FORT

# =============================================================================================

ifeq ($(HIP_PLATFORM),clang)
ifeq ($(HIP_COMPILER),clang)

ifeq ($(DEBUG),TRUE)
CXXFLAGS += -g -O0 -ftrapv
Expand Down Expand Up @@ -106,8 +106,8 @@ ifeq ($(HIP_PLATFORM),clang)

# =============================================================================================

else ifeq ($(HIP_PLATFORM),nvcc)
$(error HIP_PLATFORM nvcc is not supported at this time. Use USE_CUDA to compile for NVIDIA platforms.)
else ifeq ($(HIP_COMPILER),nvcc)
$(error HIP_COMPILER nvcc is not supported at this time. Use USE_CUDA to compile for NVIDIA platforms.)
endif

# =============================================================================================

0 comments on commit 5a2d460

Please sign in to comment.