error모음
CUDA_cublas_device_LIBRARY (ADVANCED) linked by target "THC" in directory /root/torch/extra/cutorch/lib/THC
개발자_WH
2022. 10. 21. 17:40
728x90
반응형
반응형
해결
$ cd ~/torch
$ rm -fr cmake/3.6/Modules/FindCUDA*
torch/extra/cutorch 에서 아래 파일을 수정해줘야함
/lib/THC/THCAtomics.cuh
에디터를 사용해서 해당 코드 추가
@@ -94,6 +94,7 @@ static inline __device__ void atomicAdd(long *address, long val) {
}
#ifdef CUDA_HALF_TENSOR
+#if !(__CUDA_ARCH__ >= 700 || !defined(__CUDA_ARCH__) )
static inline __device__ void atomicAdd(half *address, half val) {
unsigned int * address_as_ui =
(unsigned int *) ((char *)address - ((size_t)address & 2));
@@ -117,6 +118,7 @@ static inline __device__ void atomicAdd(half *address, half val) {
} while (assumed != old);
}
#endif
+#endif
$ cd extra/cutorch
$ cat > atomic.patch
<copy and paste the patch>
$ patch -p1 < atomic.patch
build
$ ./clean.sh
$ export TORCH_NVCC_FLAGS="-D__CUDA_NO_HALF_OPERATORS__"
$ ./install.sh
728x90
반응형