-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails to build against CUDA 10 #834
Comments
I have exactly the same issue. |
EDIT: I have merged these changes to my distro repo. https://github.com/nagadomi/distro Building Torch with CUDA10 has two problems.
How to build Torch with CUDA10
$ sudo apt-get purge cmake
$ git clone https://github.com/Kitware/CMake.git
$ cd CMake
$ ./bootstrap; make; sudo make install
$ cd ~/torch
$ rm -fr cmake/3.6/Modules/FindCUDA*
diff --git a/lib/THC/THCAtomics.cuh b/lib/THC/THCAtomics.cuh
index 400875c..ccb7a1c 100644
--- a/lib/THC/THCAtomics.cuh
+++ b/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
$ ./clean.sh
$ export TORCH_NVCC_FLAGS="-D__CUDA_NO_HALF_OPERATORS__"
$ ./install.sh I was successfully build Torch with CUDA10 with the above steps. |
@nagadomi Yeah, it really works! Thanks a lot. I learnt elsewhere that a newer version of cmake is needed so I installed one. However I didn't remove the FindCUDA.cmake the torch package contained. Now it works well, after I finished the steps you recommended. |
Thanks |
@nagadomi It works following your steps. Thank you |
@nagadomi Thanks a lot that helped with my issue. It seems though, that removing FindCUDA will cause problems when trying to install cuDDN. |
@PhilipDro $ git clone https://github.com/soumith/cudnn.torch.git -b R7
$ cd cudnn.torch
$ luarocks make cudnn-scm-1.rockspec |
@nagadomi Thank you for your response. `CMake Error at /home/philip/torch/install/share/cmake/torch/FindCUDA.cmake:617 (message): -- Configuring incomplete, errors occurred! Error: Build error: Failed building. |
Try changing the gcc version to gcc-6. Worked for me! |
I also could not make it work until I did not kick out these lines: diff --git a/install.sh b/install.sh
index ad65434..65a0163 100755
--- a/install.sh
+++ b/install.sh
@@ -99,9 +99,6 @@ fi
if [ -x "$path_to_nvcc" ] || [ -x "$path_to_nvidiasmi" ]
then
echo "Found CUDA on your machine. Installing CMake 3.6 modules to get up-to-date FindCUDA"
- cd ${THIS_DIR}/cmake/3.6 && \
-(cmake -E make_directory build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX="${PREFIX}" \
- && make install) && echo "FindCuda bits of CMake 3.6 installed" || exit 1
fi After this it just used the newest cmake (3.13 for me) and did not complain any more. |
Thank you @nagadomi ! Your instructions above were very helpful in getting Torch7 installed and running with CUDA 10 & cuDNN 7.3 on Ubuntu 18.04 LTS |
@nagadomi I'm trying to install it via
Using the newer CMake with the applied patch
|
have the same issue with you |
$ luarocks make rocks/cutorch-scm-1.rockspec |
Great! It works. Thank you so much |
@nagadomi I'm still having this issue. ;-; |
@doneforaiur
|
@nagadomi Thank you! This just saved my day! Was just about to return my RTX2070 |
Thanks to @nagadomi for the help, I could successfully build luatorch against cuda 10 and cudnn7 on Ubuntu 16.04, RTX2080. I canonly add that it is not necessary to unistall the system-wide cmake, it is sufficient to build it from the sources on some user directory such as /home/user/myrepos/and then do |
@fiandro Related to nagadomi/waifu2x#253 (comment) |
Does it work with gcc-8? |
Compilation fails with the following errors: luarocks make rocks/cutorch-scm-1.rockspec Warning: unmatched variable LUALIB jopts=$(getconf _NPROCESSORS_CONF) echo "Building on $jopts cores" cmake -E make_directory build && cd build && cmake .. -DLUALIB= -DLUA_INCDIR=/home/alekz/torch/install/include -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/alekz/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/alekz/torch/install/lib/luarocks/rocks/cutorch/scm-1" && make -j$jopts install Building on 8 cores -- The C compiler identification is GNU 8.2.0 -- The CXX compiler identification is GNU 8.2.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found Torch7 in /home/alekz/torch/install -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_kill -- Looking for pthread_kill - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found CUDA: /usr/local/cuda (found suitable version "10.0", minimum required is "6.5") -- Removing -DNDEBUG from compile flags -- TH_LIBRARIES: TH -- MAGMA not found. Compiling without MAGMA support -- Autodetected CUDA architecture(s): 5.2 -- got cuda version 10.0 -- Found CUDA with FP16 support, compiling with torch.CudaHalfTensor -- CUDA_NVCC_FLAGS: -D__CUDA_NO_HALF_OPERATORS__;-gencode;arch=compute_52,code=sm_52;-DCUDA_HAS_FP16=1 -- THC_SO_VERSION: 0 -- Performing Test HAS_LUAL_SETFUNCS -- Performing Test HAS_LUAL_SETFUNCS - Failed -- Configuring done -- Generating done -- Build files have been written to: /var/tmp/cutorch/build [ 2%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorage.cu.o [ 2%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o [ 3%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o [ 4%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o [ 5%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorCopy.cu.o [ 6%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensor.cu.o [ 8%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCSleep.cu.o [ 8%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorageCopy.cu.o /usr/include/c++/8/type_traits(1049): error: type name is not allowed /usr/include/c++/8/type_traits(1049): error: type name is not allowed /usr/include/c++/8/type_traits(1049): error: identifier "__is_assignable" is undefined /usr/include/c++/8/type_traits(1049): error: type name is not allowed /usr/include/c++/8/type_traits(1049): error: type name is not allowed /usr/include/c++/8/type_traits(1049): error: identifier "__is_assignable" is undefined /usr/include/c++/8/type_traits(1049): error: type name is not allowed /usr/include/c++/8/type_traits(1049): error: type name is not allowed /usr/include/c++/8/type_traits(1049): error: identifier "__is_assignable" is undefined /usr/include/c++/8/utility(307): error: pack expansion does not make use of any argument packs /usr/include/c++/8/utility(329): error: pack expansion does not make use of any argument packs /usr/include/c++/8/type_traits(1049): error: type name is not allowed /usr/include/c++/8/type_traits(1049): error: type name is not allowed /usr/include/c++/8/type_traits(1049): error: identifier "__is_assignable" is undefined /usr/include/c++/8/utility(329): error: expected a ">" detected during instantiation of type "std::make_integer_sequence" (340): here /usr/include/c++/8/utility(307): error: pack expansion does not make use of any argument packs /usr/include/c++/8/utility(329): error: pack expansion does not make use of any argument packs /usr/include/c++/8/utility(329): error: expected a ">" detected during instantiation of type "std::make_integer_sequence" (340): here /usr/include/c++/8/type_traits(1049): error: type name is not allowed /usr/include/c++/8/type_traits(1049): error: type name is not allowed /usr/include/c++/8/type_traits(1049): error: identifier "__is_assignable" is undefined 6 errors detected in the compilation of "/tmp/tmpxft_00006cb1_00000000-6_THCSleep.cpp1.ii". 6 errors detected in the compilation of "/tmp/tmpxft_00006cb9_00000000-6_THCBlas.cpp1.ii". CMake Error at THC_generated_THCSleep.cu.o.Release.cmake:279 (message): Error generating file /var/tmp/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCSleep.cu.o /usr/include/c++/8/type_traits(1049): error: type name is not allowed make[2]: *** [lib/THC/CMakeFiles/THC.dir/build.make:79: lib/THC/CMakeFiles/THC.dir/THC_generated_THCSleep.cu.o] Error 1 make[2]: *** Waiting for unfinished jobs.... /usr/include/c++/8/type_traits(1049): error: type name is not allowed /usr/include/c++/8/type_traits(1049): error: identifier "__is_assignable" is undefined CMake Error at THC_generated_THCBlas.cu.o.Release.cmake:279 (message): Error generating file /var/tmp/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCBlas.cu.o make[2]: *** [lib/THC/CMakeFiles/THC.dir/build.make:72: lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o] Error 1 /usr/include/c++/8/utility(307): error: pack expansion does not make use of any argument packs /usr/include/c++/8/utility(329): error: pack expansion does not make use of any argument packs /usr/include/c++/8/utility(329): error: expected a ">" detected during instantiation of type "std::make_integer_sequence" (340): here /usr/include/c++/8/utility(307): error: pack expansion does not make use of any argument packs /usr/include/c++/8/utility(329): error: pack expansion does not make use of any argument packs /usr/include/c++/8/utility(329): error: expected a ">" detected during instantiation of type "std::make_integer_sequence" (340): here /usr/include/c++/8/utility(307): error: pack expansion does not make use of any argument packs /usr/include/c++/8/utility(329): error: pack expansion does not make use of any argument packs /usr/include/c++/8/utility(329): error: expected a ">" detected during instantiation of type "std::make_integer_sequence" (340): here 6 errors detected in the compilation of "/tmp/tmpxft_00006cca_00000000-6_THCReduceApplyUtils.cpp1.ii". /usr/include/c++/8/utility(307): error: pack expansion does not make use of any argument packs /usr/include/c++/8/utility(329): error: pack expansion does not make use of any argument packs /usr/include/c++/8/utility(329): error: expected a ">" detected during instantiation of type "std::make_integer_sequence" (340): here CMake Error at THC_generated_THCReduceApplyUtils.cu.o.Release.cmake:279 (message): Error generating file /var/tmp/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCReduceApplyUtils.cu.o make[2]: *** [lib/THC/CMakeFiles/THC.dir/build.make:65: lib/THC/CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o] Error 1 6 errors detected in the compilation of "/tmp/tmpxft_00006cd7_00000000-6_THCTensor.cpp1.ii". CMake Error at THC_generated_THCTensor.cu.o.Release.cmake:279 (message): Error generating file /var/tmp/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensor.cu.o make[2]: *** [lib/THC/CMakeFiles/THC.dir/build.make:100: lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensor.cu.o] Error 1 6 errors detected in the compilation of "/tmp/tmpxft_00006ce2_00000000-6_THCStorageCopy.cpp1.ii". CMake Error at THC_generated_THCStorageCopy.cu.o.Release.cmake:279 (message): Error generating file /var/tmp/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCStorageCopy.cu.o make[2]: *** [lib/THC/CMakeFiles/THC.dir/build.make:93: lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorageCopy.cu.o] Error 1 /usr/include/c++/8/type_traits(1049): error: type name is not allowed /usr/include/c++/8/type_traits(1049): error: type name is not allowed /usr/include/c++/8/type_traits(1049): error: identifier "__is_assignable" is undefined 6 errors detected in the compilation of "/tmp/tmpxft_00006ce1_00000000-6_THCTensorCopy.cpp1.ii". /usr/include/c++/8/type_traits(1049): error: type name is not allowed /usr/include/c++/8/type_traits(1049): error: type name is not allowed /usr/include/c++/8/type_traits(1049): error: identifier "__is_assignable" is undefined CMake Error at THC_generated_THCTensorCopy.cu.o.Release.cmake:279 (message): Error generating file /var/tmp/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorCopy.cu.o make[2]: *** [lib/THC/CMakeFiles/THC.dir/build.make:107: lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorCopy.cu.o] Error 1 /usr/include/c++/8/utility(307): error: pack expansion does not make use of any argument packs /usr/include/c++/8/utility(329): error: pack expansion does not make use of any argument packs /usr/include/c++/8/utility(329): error: expected a ">" detected during instantiation of type "std::make_integer_sequence" (340): here /usr/include/c++/8/utility(307): error: pack expansion does not make use of any argument packs /usr/include/c++/8/utility(329): error: pack expansion does not make use of any argument packs /usr/include/c++/8/utility(329): error: expected a ">" detected during instantiation of type "std::make_integer_sequence" (340): here 6 errors detected in the compilation of "/tmp/tmpxft_00006d00_00000000-6_THCHalf.cpp1.ii". CMake Error at THC_generated_THCHalf.cu.o.Release.cmake:279 (message): Error generating file /var/tmp/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCHalf.cu.o make[2]: *** [lib/THC/CMakeFiles/THC.dir/build.make:562: lib/THC/CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o] Error 1 6 errors detected in the compilation of "/tmp/tmpxft_00006d08_00000000-6_THCStorage.cpp1.ii". CMake Error at THC_generated_THCStorage.cu.o.Release.cmake:279 (message): Error generating file /var/tmp/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCStorage.cu.o make[2]: *** [lib/THC/CMakeFiles/THC.dir/build.make:86: lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorage.cu.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:177: lib/THC/CMakeFiles/THC.dir/all] Error 2 make: *** [Makefile:130: all] Error 2 Error: Build error: Failed building. Any ideas? |
@AlekzNet |
Mmm... I'm getting the same error with gcc-7. |
Perhaps you need to delete CMakeCache.txt. $ rm build/CMakeCache.txt
$ CC=gcc-7 CXX=g++-7 luarocks make rocks/cutorch-scm-1.rockspec |
Yes! This is it! I thought I cleaned everything, but obviously not. Thanks much @nagadomi ! |
Thanks a lot to @nagadomi for the updated repo: Since I had to write a complete howto to installing Torch on Ubuntu 16.04 on RTX equipped machines, I tought to share it with you: **** Installing (Lua)Torch on Ubuntu 16.04.5 LTS (Updated as 27/12/2018) This is a tutorial to installing Torch on Ubuntu 16.04 for use with the new NVIDIA RTX20x0 GPUs (older GPUs such as GTX10x0 shall be supported as well). This tutorial addresses the problem of Torch being in mainteinance mode, officially not being able to run on RTX GPUs due to a complex chain of dependencies (look at this thread for more information #834). This tutorial will guide you from installing the NVIDIA kernel drivers to getting a working Torch version on RTX NVIDIA GPUs.
|
I encountered an error I found the solution in the link below. |
I've been trying to install "luarocks install cutorch", but it keeps failing at the same spot: /home/testbench/Downloads/cutorch-master/lib/THC/THCAtomics.cuh(97): error: cannot overload functions distinguished by return type alone 1 error detected in the compilation of "/tmp/tmpxft_0000737e_00000000-4_THCTensorScatterGather.cpp4.ii". lib/THC/CMakeFiles/THC.dir/build.make:8288: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorScatterGather.cu.o' failed 1 error detected in the compilation of "/tmp/tmpxft_00007386_00000000-4_THCTensorIndex.cpp4.ii". lib/THC/CMakeFiles/THC.dir/build.make:6883: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorIndex.cu.o' failed Error: Build error: Failed building. I have successfully installed just about everything else, including CUDA 10.0, newer Cmake, "luarocks install cunn" -worked just fine, and I tried Nagadomi's tip: $ rm build/CMakeCache.txt no difference... Is there any other tips or tricks that you could suggest? |
sorry for this question,
any help appreciated |
@generated # rm -r ~/torch # delete old installation
git clone https://github.com/nagadomi/distro.git ~/torch --recursive
cd ~/torch
./install-deps
./install.sh |
Hello,everyone! when I install cutorch,I meet some error. I have installed torch7+cuda10.0+cudnn7.4.1 in ubuntu16.04 with RTX2080( Driver Version: 410.78 ) jopts=$(getconf _NPROCESSORS_CONF) echo "Building on $jopts cores" Building on 12 cores Error: Build error: Failed building. Can kindly people help me? |
|
I have done all the steps as above but when I rull install.sh
|
Many thanks with the guidance and I made it work with cuda 10. I have a question about how to install new packages (e.g., |
@Yijunmaverick
test
I've heard that GFW blocks URLs about luarocks.
rockspec index: https://github.com/torch/rocks With |
I have this error after running : CC=gcc-7 CXX=g++-7 luarocks make rocks/cunn-scm-1.rockspec [ 26%] Building NVCC (Device) object lib/THCUNN/CMakeFiles/THCUNN.dir/THCUNN_generated_LookupTableBag.cu.o /tmp/cunn/lib/THCUNN/LookupTable.cu(62): error: identifier "FULL_MASK" is undefined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(5): error: incomplete type is not allowed /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(5): error: identifier "LookupTable_accGradParameters" is undefined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(5): error: expected a ";" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(37): warning: parsing restarts here after previous syntax error /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(40): error: this declaration has no storage class or type specifier /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(40): error: declaration is incompatible with function template "void cunn_LookupTable_accGradParametersKernelByFeature(long *, Dtype *, Dtype *, Dtype, ptrdiff_t, long, int)" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(40): error: expected a ";" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(47): warning: parsing restarts here after previous syntax error /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(48): error: this declaration has no storage class or type specifier /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(48): error: declaration is incompatible with "void THCudaHalfTensor_free(THCState *, THCudaHalfTensor *)" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(48): error: identifier "state" is undefined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(48): error: expected a ")" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(49): error: this declaration has no storage class or type specifier /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(49): error: declaration is incompatible with "void __THCudaCheck(cudaError_t, const char *, int)" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(49): error: expected a ")" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(50): error: expected a declaration /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(51): error: expected a declaration /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(54): error: this declaration has no storage class or type specifier /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(54): error: identifier "resize" is undefined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(54): error: expected a ";" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(54): warning: parsing restarts here after previous syntax error /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(55): error: this declaration has no storage class or type specifier /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(55): error: variable "THCIndexTensor_" has already been defined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(55): error: expected a ";" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(55): warning: parsing restarts here after previous syntax error /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(56): error: this declaration has no storage class or type specifier /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(56): error: declaration is incompatible with "void THLongStorage_free(THLongStorage *)" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(56): error: identifier "inputSize" is undefined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(61): error: expected a declaration /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(83): error: this declaration has no storage class or type specifier /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(83): error: namespace "thrust::cuda" has no actual member "par" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(83): error: identifier "thrustAlloc" is undefined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(83): error: expected a ";" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(86): warning: parsing restarts here after previous syntax error /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(87): error: expected a declaration /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(90): error: identifier "THCIndex_t" is undefined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(90): error: expression preceding parentheses of apparent call must have (pointer-to-) function type /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(90): error: identifier "data" is undefined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(90): error: identifier "origIndices" is undefined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(91): error: identifier "THCIndex_t" is undefined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(93): error: expected a declaration /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(127): warning: parsing restarts here after previous syntax error /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(128): error: expected a declaration /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(131): error: variable "block" has already been defined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(132): error: expected a declaration /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(142): warning: parsing restarts here after previous syntax error /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(144): error: this declaration has no storage class or type specifier /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(144): error: variable "THCudaHalfTensor_free" has already been defined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(144): error: expected a ")" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(145): error: this declaration has no storage class or type specifier /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(145): error: variable "__THCudaCheck" has already been defined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(145): error: expected a ")" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(146): error: expected a declaration /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(175): warning: parsing restarts here after previous syntax error /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(176): error: identifier "THCIndex_t" is undefined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(176): error: expression preceding parentheses of apparent call must have (pointer-to-) function type /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(176): error: identifier "idx" is undefined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(177): error: identifier "THCIndex_t" is undefined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(177): error: identifier "numel" is undefined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(177): error: no instance of overloaded function "thrust::unique" matches the argument list /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(178): error: this declaration has no storage class or type specifier /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(180): error: identifier "normType" is undefined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(183): error: expected a declaration /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(37): warning: parsing restarts here after previous syntax error /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(38): error: variable "block" has already been defined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(40): error: this declaration has no storage class or type specifier /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(40): error: variable "cunn_LookupTable_accGradParametersKernelByFeature" has already been defined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(40): error: expected a ";" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(47): warning: parsing restarts here after previous syntax error /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(48): error: this declaration has no storage class or type specifier /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(48): error: declaration is incompatible with "void THCudaTensor_free(THCState *, THCudaTensor *)" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(48): error: expected a ")" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(49): error: this declaration has no storage class or type specifier /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(49): error: variable "__THCudaCheck" has already been defined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(49): error: expected a ")" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(50): error: expected a declaration /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(51): error: expected a declaration /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(54): error: this declaration has no storage class or type specifier /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(54): error: variable "THCIndexTensor_" has already been defined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(54): error: expected a ";" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(54): warning: parsing restarts here after previous syntax error /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(55): error: this declaration has no storage class or type specifier /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(55): error: variable "THCIndexTensor_" has already been defined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(55): error: expected a ";" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(55): warning: parsing restarts here after previous syntax error /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(56): error: this declaration has no storage class or type specifier /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(56): error: variable "THLongStorage_free" has already been defined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(61): error: expected a declaration /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(83): error: this declaration has no storage class or type specifier /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(83): error: namespace "thrust::cuda" has no actual member "par" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(83): error: expected a ";" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(86): warning: parsing restarts here after previous syntax error /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(87): error: expected a declaration /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(90): error: identifier "THCIndex_t" is undefined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(90): error: variable "origIndices_data" has already been defined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(90): error: expression preceding parentheses of apparent call must have (pointer-to-) function type /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(91): error: identifier "THCIndex_t" is undefined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(91): error: variable "count_data" has already been defined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(93): error: expected a declaration /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(127): warning: parsing restarts here after previous syntax error /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(128): error: expected a declaration /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(131): error: variable "block" has already been defined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(132): error: expected a declaration /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(142): warning: parsing restarts here after previous syntax error /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(144): error: this declaration has no storage class or type specifier /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(144): error: variable "THCudaTensor_free" has already been defined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(144): error: expected a ")" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(145): error: this declaration has no storage class or type specifier /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(145): error: variable "__THCudaCheck" has already been defined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(145): error: expected a ")" /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(146): error: expected a declaration /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(175): warning: parsing restarts here after previous syntax error /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(176): error: identifier "THCIndex_t" is undefined /tmp/cunn/lib/THCUNN/generic/LookupTable.cu(176): error: variable "idx_ptr" has already been defined Error limit reached. lib/THCUNN/CMakeFiles/THCUNN.dir/build.make:8563: recipe for target 'lib/THCUNN/CMakeFiles/THCUNN.dir/THCUNN_generated_LookupTable.cu.o' failed /tmp/cunn/lib/THCUNN/LookupTableBag.cu(18): warning: variable "MODE_SUM" was declared but never referenced /tmp/cunn/lib/THCUNN/LookupTableBag.cu(18): warning: variable "MODE_SUM" was declared but never referenced /tmp/cunn/lib/THCUNN/LookupTableBag.cu(18): warning: variable "MODE_SUM" was declared but never referenced ptxas warning : Value of threads per SM for entry Z21kernelPointwiseApply3I34logSigmoid_updateGradInput_functorIdEdddmLin1ELin1ELin1EEv10TensorInfoIT0_T3_ES2_IT1_S4_ES2_IT2_S4_ES4_T is out of range. .minnctapersm will be ignored /tmp/cunn/lib/THCUNN/LookupTableBag.cu(18): warning: variable "MODE_SUM" was declared but never referenced /tmp/cunn/lib/THCUNN/LookupTableBag.cu(18): warning: variable "MODE_SUM" was declared but never referenced /tmp/cunn/lib/THCUNN/LookupTableBag.cu(18): warning: variable "MODE_SUM" was declared but never referenced CMakeFiles/Makefile2:131: recipe for target 'lib/THCUNN/CMakeFiles/THCUNN.dir/all' failed Error: Build error: Failed building. |
same issue with RTX 2080 ti, si someone have an idea? |
Ok, I was having issues installing However, I kept corrupting ~/torch/extras/cutorch because I kept applying the atomic.patch described, but I was already cloning torch from https://github.com/nagadomi/torch and his repo already has the patches! If you're going to use the @nagadomi repo, here's how I got everything working:
NOTE: I'm on Ubuntu 18.04 with CUDA 10.2 THANK YOU SO MUCH @nagadomi ! |
in case someone is interested, i put everything in a container docker run --runtime=nvidia mherkazandjian/char-rnn:latest th train.lua -data_dir data/tinyshakespeare -rnn_size 512 -num_layers 2 -dropout 0.5 the dockerfile is here:
that includes a fix based on the dockerfile of https://github.com/crisbal/docker-torch-rnn/tree/master/CUDA/10.0-ubuntu18.04 with some mods to include char-rnn in the container |
I keep getting |
Have you solved it? I have the same problem. |
on google colab after: !export TORCH_NVCC_FLAGS="-D__CUDA_NO_HALF_OPERATORS__" got this error: Warning: unmatched variable LUALIB jopts=$(getconf _NPROCESSORS_CONF) echo "Building on $jopts cores" Building on 2 cores /content/torch/extra/cutorch/lib/THC/generic/THCTensorMath.cu(414): error: more than one operator "==" matches these operands: 2 errors detected in the compilation of "/tmp/tmpxft_0001830f_00000000-13_THCTensorMath.compute_75.cpp1.ii". lib/THC/CMakeFiles/THC.dir/build.make:3113: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMath.cu.o' failed Error: Build error: Failed building. all other command works perfectly, except cutorch |
@nagadomi Please help me. I follow your instruction but still get the error. 1 error detected in the compilation of "/tmp/tmpxft_00014089_00000000-12_THCTensorIndex.compute_75.cpp1.ii". make[2]: *** [lib/THC/CMakeFiles/THC.dir/build.make:175: lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorIndex.cu.o] Error 1 Error: Build error: Failed building. |
I have followed all the steps. My system gets stuck when I type
|
it should be:
|
When building HEAD against CUDA 10.0.130, the build fails with:
The text was updated successfully, but these errors were encountered: