szagoruyko / cutorch-rtc

lua apply function for cutorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed installation

ltrottier opened this issue · comments

Hi,

I tried installing your library, and I got these errors. I would love to use it because it looks crazy nice! Do you know what is the problem ? Thanks

luarocks install https://raw.githubusercontent.com/szagoruyko/cutorch-rtc/master/cutorch-rtc-scm-1.rockspec
Using https://raw.githubusercontent.com/szagoruyko/cutorch-rtc/master/cutorch-rtc-scm-1.rockspec... switching to 'build' mode
Cloning into 'cutorch-rtc'...
remote: Counting objects: 13, done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 13 (delta 0), reused 5 (delta 0), pack-reused 0
Receiving objects: 100% (13/13), 17.41 KiB | 0 bytes/s, done.
Checking connectivity... done.
cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/trottier/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/trottier/torch/install/lib/luarocks/rocks/cutorch-rtc/scm-1"

-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.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/trottier/torch/install
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - 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 (found suitable version "7.5", minimum required is "7.0") 
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/luarocks_cutorch-rtc-scm-1-7106/cutorch-rtc/build
cd build && make install
[ 33%] Building NVCC (Device) object CMakeFiles/cutorchrtc.dir/cutorchrtc_generated_apply.cu.o
CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THStorage.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THStorageCopy.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCStorage.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCStorageCopy.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THTensor.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THTensorCopy.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THTensorRandom.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THTensorMath.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THTensorConv.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THTensorLapack.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensor.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorCopy.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorMath.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorMathBlas.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorMathPairwise.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorMathPointwise.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorMathReduce.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorMathCompare.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorMathCompareT.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorMathScan.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorMasked.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorScatterGather.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorIndex.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorSort.h


/usr/include/c++/5/bits/hashtable.h(1526): error: no instance of overloaded function "std::forward" matches the argument list
            argument types are: (ApplyHash)
          detected during:
            instantiation of "std::pair<std::__detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2, _Hash, _Traits>::iterator, __nv_bool> std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::_M_emplace(std::true_type, _Args &&) [with _Key=ApplyHash, _Value=std::pair<const ApplyHash, std::shared_ptr<PTX>>, _Alloc=std::allocator<std::pair<const ApplyHash, std::shared_ptr<PTX>>>, _ExtractKey=std::__detail::_Select1st, _Equal=std::equal_to<ApplyHash>, _H1=std::hash<ApplyHash>, _H2=std::__detail::_Mod_range_hashing, _Hash=std::__detail::_Default_ranged_hash, _RehashPolicy=std::__detail::_Prime_rehash_policy, _Traits=std::__umap_traits<true>, _Args=<ApplyHash &, PTXPtr &>]" 
(726): here
            instantiation of "std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::__ireturn_type std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits>::emplace(_Args &&...) [with _Key=ApplyHash, _Value=std::pair<const ApplyHash, std::shared_ptr<PTX>>, _Alloc=std::allocator<std::pair<const ApplyHash, std::shared_ptr<PTX>>>, _ExtractKey=std::__detail::_Select1st, _Equal=std::equal_to<ApplyHash>, _H1=std::hash<ApplyHash>, _H2=std::__detail::_Mod_range_hashing, _Hash=std::__detail::_Default_ranged_hash, _RehashPolicy=std::__detail::_Prime_rehash_policy, _Traits=std::__umap_traits<true>, _Args=<ApplyHash &, PTXPtr &>]" 
/usr/include/c++/5/bits/unordered_map.h(380): here
            instantiation of "std::pair<std::_Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc, std::__detail::_Select1st, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::__detail::__is_noexcept_hash<_Key, _Hash>>>::value, false, true>>::iterator, __nv_bool> std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::emplace(_Args &&...) [with _Key=ApplyHash, _Tp=std::shared_ptr<PTX>, _Hash=std::hash<ApplyHash>, _Pred=std::equal_to<ApplyHash>, _Alloc=std::allocator<std::pair<const ApplyHash, std::shared_ptr<PTX>>>, _Args=<ApplyHash &, PTXPtr &>]" 
/tmp/luarocks_cutorch-rtc-scm-1-7106/cutorch-rtc/apply.cu(136): here
            instantiation of "void kernelPointwiseApply1RTC(TensorInfo<Ta, IndexType>, const char *, const char *, IndexType, dim3, dim3, int, cudaStream_t) [with Ta=float, IndexType=unsigned int]" 
/tmp/luarocks_cutorch-rtc-scm-1-7106/cutorch-rtc/apply.cu(359): here
            instantiation of "__nv_bool THC_pointwiseApply1(THCState *, TensorTypeA *, const char *, const char *) [with TensorTypeA=THCudaTensor]" 
/tmp/luarocks_cutorch-rtc-scm-1-7106/cutorch-rtc/apply.cu(401): here

/tmp/luarocks_cutorch-rtc-scm-1-7106/cutorch-rtc/apply.cu(88): warning: statement is unreachable
          detected during:
            instantiation of "const char *getTypeString<T>() [with T=half]" 
(122): here
            instantiation of "void kernelPointwiseApply1RTC(TensorInfo<Ta, IndexType>, const char *, const char *, IndexType, dim3, dim3, int, cudaStream_t) [with Ta=half, IndexType=unsigned int]" 
(359): here
            instantiation of "__nv_bool THC_pointwiseApply1(THCState *, TensorTypeA *, const char *, const char *) [with TensorTypeA=THCudaHalfTensor]" 
(403): here

1 error detected in the compilation of "/tmp/tmpxft_00006a06_00000000-7_apply.cpp1.ii".
CMake Error at cutorchrtc_generated_apply.cu.o.cmake:266 (message):
  Error generating file
  /tmp/luarocks_cutorch-rtc-scm-1-7106/cutorch-rtc/build/CMakeFiles/cutorchrtc.dir//./cutorchrtc_generated_apply.cu.o


CMakeFiles/cutorchrtc.dir/build.make:63: recipe for target 'CMakeFiles/cutorchrtc.dir/cutorchrtc_generated_apply.cu.o' failed
make[2]: *** [CMakeFiles/cutorchrtc.dir/cutorchrtc_generated_apply.cu.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/cutorchrtc.dir/all' failed
make[1]: *** [CMakeFiles/cutorchrtc.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Error: Build error: Failed installing.

Well, I managed to install it using:

CC=gcc-4.8 CXX=g++-4.8 CXXFLAGS="$CXXFLAGS -D_FORCE_INLINES" luarocks install https://raw.githubusercontent.com/szagoruyko/cutorch-rtc/master/cutorch-rtc-scm-1.rockspec