adding cuda support for EmptyKernelTest (#913)

这个提交包含在:
mberenjk 编写, GitHub 于 2023-10-11 14:11:12 -05:00 提交
1 父节点 01d9da8046
当前提交 7e2d905376
2 个文件已更改
+78 -5

没有与搜索条件相匹配的文件

+22 -4
查看文件
@@ -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