Files
2023-10-11 14:11:12 -05:00

27 строки
536 B
Makefile

ROCM_PATH ?= /opt/rocm
CUDA_PATH ?= /usr/local/cuda
HIPCC=$(ROCM_PATH)/bin/hipcc
NVCC=$(CUDA_PATH)/bin/nvcc
# Compile TransferBenchCuda if nvcc detected
ifeq ("$(shell test -e $(NVCC) && echo found)", "found")
EXE=./EmptyKernelTestCuda
else
EXE=./EmptyKernelTest
endif
all: $(EXE)
./EmptyKernelTest: EmptyKernelTest.cpp
$(HIPCC) EmptyKernelTest.cpp -o EmptyKernelTest
./EmptyKernelTestCuda: EmptyKernelTest.cpp
$(NVCC) EmptyKernelTest.cpp -x cu -o EmptyKernelTestCuda
clean:
rm -f ./EmptyKernelTest ./EmptyKernelTestCuda