e9f4f40a45
Change-Id: Id0033678834288c4eaa56b12e7d447119be99deb
[ROCm/hip commit: e08f4513c1]
37 righe
696 B
Makefile
37 righe
696 B
Makefile
HIP_PATH?= $(wildcard /opt/rocm/hip)
|
|
ifeq (,$(HIP_PATH))
|
|
HIP_PATH=../../..
|
|
endif
|
|
HIPCC=$(HIP_PATH)/bin/hipcc
|
|
OPT=
|
|
HIP_PLATFORM=$(shell $(HIP_PATH)/bin/hipconfig --compiler)
|
|
|
|
ifeq (${HIP_PLATFORM}, hcc)
|
|
GENCODEOBJECT_FLAGS=--target-isa=fiji
|
|
|
|
all: runKernel.hip.out
|
|
|
|
vcpy_kernel.compile: vcpy_kernel.cpp
|
|
$(HIPCC) --genco $(GENCODEOBJECT_FLAGS) vcpy_kernel.cpp -o vcpy_kernel.co
|
|
|
|
clean:
|
|
rm -f *.co *.out
|
|
|
|
endif
|
|
|
|
ifeq (${HIP_PLATFORM}, nvcc)
|
|
|
|
vcpy_kernel.compile: vcpy_kernel.cu
|
|
$(HIPCC) --genco vcpy_kernel.cu -o vcpy_kernel.ptx
|
|
|
|
clean:
|
|
rm -f *.ptx *.out
|
|
|
|
endif
|
|
|
|
all: vcpy_kernel.compile runKernel.hip.out
|
|
|
|
runKernel.hip.out: runKernel.cpp
|
|
$(HIPCC) $(OPT) runKernel.cpp -o runKernel.hip.out
|
|
|