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
반응형
'error모음' 카테고리의 다른 글
ModuleNotFoundError: No module named 'cv2' (0) | 2022.10.24 |
---|---|
fatal error: TH/TH.h: No such file or directory (7) | 2022.10.24 |
CMake error with "CUDA_cublas_device_LIBRARY" (0) | 2022.10.21 |
E: Package 'python-software-properties' has no installation candidate (0) | 2022.10.21 |
E: Package 'git' has no installation candidate (0) | 2022.10.21 |