Open kayaercument opened 2 years ago
Dear all,
I'm trying to compile CUDA versions completely using clang and I'm facing some issues.
For example, original compilation sequence of level0 is below: `clang++ -DHAVE_CONFIG_H -I. -I../../../config -I/usr/include -I../../../src/cuda/common -I../../../src/common -I../../../config -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o ./../common/main.cpp
mv -f .deps/main.Tpo .deps/main.Po /usr/bin/nvcc -gencode=arch=compute_61,code=sm_61 -I../../../src/cuda/common -I../../../src/common -I../../../config -c BusSpeedDownload.cu clang++ -L../../../src/cuda/common -L../../../src/common -o BusSpeedDownload main.o BusSpeedDownload.o -lSHOCCommon -std=c++14 -L/usr/lib/x86_64-linux-gnu/stubs -lcudadevrt -lcudart_static -lrt -lpthread -ldl -lrt -lrt
/usr/bin/nvcc -gencode=arch=compute_61,code=sm_61 -I../../../src/cuda/common -I../../../src/common -I../../../config -c BusSpeedReadback.cu clang++ -L../../../src/cuda/common -L../../../src/common -o BusSpeedReadback main.o BusSpeedReadback.o -lSHOCCommon -std=c++14 -L/usr/lib/x86_64-linux-gnu/stubs -lcudadevrt -lcudart_static -lrt -lpthread -ldl -lrt -lrt
/usr/bin/nvcc -gencode=arch=compute_61,code=sm_61 -I../../../src/cuda/common -I../../../src/common -I../../../config -c DeviceMemory.cu clang++ -L../../../src/cuda/common -L../../../src/common -o DeviceMemory main.o DeviceMemory.o -lSHOCCommon -std=c++14 -L/usr/lib/x86_64-linux-gnu/stubs -lcudadevrt -lcudart_static -lrt -lpthread -ldl -lrt -lrt
/usr/bin/nvcc -gencode=arch=compute_61,code=sm_61 -I../../../src/cuda/common -I../../../src/common -I../../../config -c MaxFlops.cu clang++ -L../../../src/cuda/common -L../../../src/common -o MaxFlops main.o MaxFlops.o -lSHOCCommon -std=c++14 -L/usr/lib/x86_64-linux-gnu/stubs -lcudadevrt -lcudart_static -lrt -lpthread -ldl -lrt -lrt`
And my attempt to compile it using clang is like this:
`clang++ MaxFlops.cu -I../../../src/cuda/common -I../../../src/common -I../../../config -L/usr/local/cuda-10.0/lib64 --cuda-gpu-arch=sm_61 --cuda-path=/usr/local/cuda-10.0 -lcudart_static -ldl -lrt -pthread -c
clang++ -L../../../src/cuda/common -L../../../src/common -o MaxFlops main.o MaxFlops.o -lSHOCCommon -std=c++14 -L/usr/lib/x86_64-linux-gnu/stubs -lcudadevrt -lcudart_static -lrt -lpthread -ldl -lrt -lrt `
I got error as: "undefined reference to `__cudaPushCallConfiguration'"
Is there any way to fix it?
Thank you for your time.
Dear all,
I'm trying to compile CUDA versions completely using clang and I'm facing some issues.
For example, original compilation sequence of level0 is below: `clang++ -DHAVE_CONFIG_H -I. -I../../../config -I/usr/include -I../../../src/cuda/common -I../../../src/common -I../../../config -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o ./../common/main.cpp
mv -f .deps/main.Tpo .deps/main.Po /usr/bin/nvcc -gencode=arch=compute_61,code=sm_61 -I../../../src/cuda/common -I../../../src/common -I../../../config -c BusSpeedDownload.cu clang++ -L../../../src/cuda/common -L../../../src/common -o BusSpeedDownload main.o BusSpeedDownload.o -lSHOCCommon -std=c++14 -L/usr/lib/x86_64-linux-gnu/stubs -lcudadevrt -lcudart_static -lrt -lpthread -ldl -lrt -lrt
/usr/bin/nvcc -gencode=arch=compute_61,code=sm_61 -I../../../src/cuda/common -I../../../src/common -I../../../config -c BusSpeedReadback.cu clang++ -L../../../src/cuda/common -L../../../src/common -o BusSpeedReadback main.o BusSpeedReadback.o -lSHOCCommon -std=c++14 -L/usr/lib/x86_64-linux-gnu/stubs -lcudadevrt -lcudart_static -lrt -lpthread -ldl -lrt -lrt
/usr/bin/nvcc -gencode=arch=compute_61,code=sm_61 -I../../../src/cuda/common -I../../../src/common -I../../../config -c DeviceMemory.cu clang++ -L../../../src/cuda/common -L../../../src/common -o DeviceMemory main.o DeviceMemory.o -lSHOCCommon -std=c++14 -L/usr/lib/x86_64-linux-gnu/stubs -lcudadevrt -lcudart_static -lrt -lpthread -ldl -lrt -lrt
/usr/bin/nvcc -gencode=arch=compute_61,code=sm_61 -I../../../src/cuda/common -I../../../src/common -I../../../config -c MaxFlops.cu clang++ -L../../../src/cuda/common -L../../../src/common -o MaxFlops main.o MaxFlops.o -lSHOCCommon -std=c++14 -L/usr/lib/x86_64-linux-gnu/stubs -lcudadevrt -lcudart_static -lrt -lpthread -ldl -lrt -lrt`
And my attempt to compile it using clang is like this:
`clang++ MaxFlops.cu -I../../../src/cuda/common -I../../../src/common -I../../../config -L/usr/local/cuda-10.0/lib64 --cuda-gpu-arch=sm_61 --cuda-path=/usr/local/cuda-10.0 -lcudart_static -ldl -lrt -pthread -c
clang++ -L../../../src/cuda/common -L../../../src/common -o MaxFlops main.o MaxFlops.o -lSHOCCommon -std=c++14 -L/usr/lib/x86_64-linux-gnu/stubs -lcudadevrt -lcudart_static -lrt -lpthread -ldl -lrt -lrt `
I got error as: "undefined reference to `__cudaPushCallConfiguration'"
Is there any way to fix it?
Thank you for your time.