Skip to content

Commit

Permalink
rocm: user HIP_PATH for hipcc compiler in tests Makefile
Browse files Browse the repository at this point in the history
The rocm tests assume hipcc is located under the same root directory as
the rest of rocm toolkit software. Spack installs rocm dependencies in
separate directories however, which breaks this assumption. This patch
introduces a HIP_PATH variable that, if unset, is set automatically to
PAPI_ROCM_ROOT. Spack can use this variable to let the tests Makefile in
the PAPI rocm component know where the hipcc compiler is located.
  • Loading branch information
gcongiu committed Jul 3, 2023
1 parent 82b43d4 commit 35950c4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/rocm/tests/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
NAME = rocm
include ../../Makefile_comp_tests.target
PAPI_ROCM_ROOT ?= /opt/rocm
HIP_PATH ?= $(PAPI_ROCM_ROOT)/hip

CC = $(PAPI_ROCM_ROOT)/hip/bin/hipcc
CXX = $(PAPI_ROCM_ROOT)/hip/bin/hipcc
CC = $(HIP_PATH)/bin/hipcc
CXX = $(HIP_PATH)/bin/hipcc
CPPFLAGS+= -I$(PAPI_ROCM_ROOT)/include \
-I$(PAPI_ROCM_ROOT)/include/hip \
-I$(PAPI_ROCM_ROOT)/include/hsa \
Expand Down

0 comments on commit 35950c4

Please sign in to comment.