Open
Description
I have CUDA 9.0 + cudnn 7.0 on my computer and my OS is Ubuntu 16.04.3.
When I run the code ./install.sh
, which is the third line in this official installation guide: http://torch.ch/docs/getting-started.html#installing-torch
And then it threw an error and terminated the compilation.
Here is the error message:
Building on 4 cores
-- Found Torch7 in /home/leonardo/torch/install
-- Removing -DNDEBUG from compile flags
-- TH_LIBRARIES: TH
-- MAGMA not found. Compiling without MAGMA support
-- Autodetected CUDA architecture(s): 5.0
-- got cuda version 9.0
-- Found CUDA with FP16 support, compiling with torch.CudaHalfTensor
-- CUDA_NVCC_FLAGS: -gencode;arch=compute_50,code=sm_50;-DCUDA_HAS_FP16=1
-- THC_SO_VERSION: 0
-- Configuring done
-- Generating done
-- Build files have been written to: /home/leonardo/torch/extra/cutorch/build
[ 1%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMath.cu.o
[ 2%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMathPairwise.cu.o
[ 4%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathPointwiseShort.cu.o
[ 4%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathCompareShort.cu.o
[ 5%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathReduceShort.cu.o
/home/leonardo/torch/extra/cutorch/lib/THC/generic/THCTensorMath.cu(393): error: more than one operator "==" matches these operands:
function "operator==(const __half &, const __half &)"
function "operator==(half, half)"
operand types are: half == half
/home/leonardo/torch/extra/cutorch/lib/THC/generic/THCTensorMath.cu(414): error: more than one operator "==" matches these operands:
function "operator==(const __half &, const __half &)"
function "operator==(half, half)"
operand types are: half == half
2 errors detected in the compilation of "/tmp/tmpxft_000064e3_00000000-4_THCTensorMath.cpp4.ii".
CMake Error at THC_generated_THCTensorMath.cu.o.cmake:267 (message):
Error generating file
/home/leonardo/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorMath.cu.o
lib/THC/CMakeFiles/THC.dir/build.make:2735: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMath.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMath.cu.o] Error 1
It seems that there is something wrong and the compilation is failed. I cannot use 'th' to start an interactive session.
And I found some answers through the Internet, which suggested to add an environment variable
export TORCH_NVCC_FLAGS="-D__CUDA_NO_HALF_OPERATORS__"
I have tried but there is no use.
What should I do to complete the installation?
Metadata
Metadata
Assignees
Labels
No labels