adding cuda support for EmptyKernelTest (#913)
This commit is contained in:
@@ -1,8 +1,26 @@
|
||||
|
||||
CXX=/opt/rocm/bin/hipcc
|
||||
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
|
||||
|
||||
EmptyKernelTest: EmptyKernelTest.cpp
|
||||
$(CXX) EmptyKernelTest.cpp -o EmptyKernelTest
|
||||
|
||||
clean:
|
||||
rm -f ./EmptyKernelTest
|
||||
rm -f ./EmptyKernelTest ./EmptyKernelTestCuda
|
||||
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user