https://github.com/torch/torch7/issues/1086
sudo su export TORCH_NVCC_FLAGS="-D__CUDA_NO_HALF_OPERATORS__" bash install-deps yes | bash ./install.sh
There will be a problem according to the official website of the installation method, similar to what can not be compiled
上面的安装方法work,但要注意“Be careful with the solution that @adam-dziedzic provided because installing torch under sudo su changes the installation path of torch which may break your luarocks package manager.”