See this tutorial first.
During the installation, two other problems encountered:
luajit: error while loading shared libraries: libreadline.so.7: cannot open shared object file: No such file or directory
- Cause: the newest version of
libreadline
library in Ubuntu 16.04 is6
, so you cannot findlibreadline.so.7
- Solution: directly install bianry package of
libreadline-7
from Ubuntu 18.04
lib/THC/CMakeFiles/THC.dir/build.make:4243: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMathPairwise.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMathPairwise.cu.o] Error 1
/pkgbuild/torch/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
- Solution:
export TORCH_NVCC_FLAGS="-D__CUDA_NO_HALF_OPERATORS__"