Package Details: torch7-cutorch-git r1026.5e9d86c-5

Git Clone URL: https://aur.archlinux.org/torch7-cutorch-git.git (read-only)
Package Base: torch7-cutorch-git
Description: A CUDA backend for Torch7
Upstream URL: https://github.com/torch/cutorch
Licenses: BSD
Conflicts: torch7-cutorch
Provides: torch7-cutorch
Submitter: petronny
Maintainer: petronny
Last Packager: petronny
Votes: 6
Popularity: 0.000002
First Submitted: 2016-08-28 13:17
Last Updated: 2019-08-14 09:53

Dependencies (4)

Sources (2)

Latest Comments

1 2 Next › Last »

mathiassteiger commented on 2019-08-11 22:40

error: identifier "__builtin_is_constant_evaluated" is undefined

Modify this line:

cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DCUDA_HOST_COMPILER='/usr/bin/gcc-8'

thgravo commented on 2019-08-09 11:49

I get this error:

==> Continue building torch7-cutorch-git ? [Y/n]
==> --------------------------------------------
==> 
==> Building and installing package
==> Making package: torch7-cutorch-git r1026.5e9d86c-4 (2019-08-09T13:41:44 CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Cloning torch7-cutorch-git git repo...
Cloning into bare repository '<FOLDER>/aur-torch7-cutorch-git/torch7-cutorch-git'...
remote: Enumerating objects: 2, done.
remote: Counting objects: 100% (2/2), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 7722 (delta 1), reused 0 (delta 0), pack-reused 7720
Receiving objects: 100% (7722/7722), 2.73 MiB | 1.45 MiB/s, done.
Resolving deltas: 100% (4708/4708), done.
  -> Found THCAtomics.cuh.patch
==> Validating source files with sha512sums...
    torch7-cutorch-git ... Skipped
    THCAtomics.cuh.patch ... Passed
==> Extracting sources...
  -> Creating working copy of torch7-cutorch-git git repo...
Cloning into 'torch7-cutorch-git'...
done.
==> Starting prepare()...
patching file lib/THC/THCAtomics.cuh
Hunk #2 succeeded at 118 with fuzz 2.
==> Starting pkgver()...
==> Starting build()...
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 9.1.0
-- The CXX compiler identification is GNU 9.1.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
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- 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  
-- Caffe2: Found gflags with new-style gflags target.
-- Caffe2: Cannot find glog automatically. Using legacy find.
-- Found glog: /usr/include  
-- Caffe2: Found glog (include: /usr/include, library: /usr/lib/libglog.so)
-- Found CUDA: /opt/cuda (found version "10.1") 
-- Caffe2: CUDA detected: 10.1
-- Caffe2: CUDA nvcc is: /opt/cuda/bin/nvcc
-- Caffe2: CUDA toolkit directory: /opt/cuda
-- Caffe2: Header version is: 10.1
-- Found CUDNN: /usr/include  
-- Found cuDNN: v7.6.1  (include: /usr/include, library: /usr/lib/libcudnn.so)
-- Autodetected CUDA architecture(s):  6.1
-- Added CUDA NVCC flags for: -gencode;arch=compute_61,code=sm_61
-- Found torch: /usr/lib/libtorch.so  
-- Found CUDA: /opt/cuda (found suitable version "10.1", minimum required is "6.5") 
-- Removing -DNDEBUG from compile flags
-- TH_LIBRARIES: TH
-- MAGMA not found. Compiling without MAGMA support
-- Autodetected CUDA architecture(s):  6.1
-- got cuda version 10.1
-- Found CUDA with FP16 support, compiling with torch.CudaHalfTensor
-- CUDA_NVCC_FLAGS: -DONNX_NAMESPACE=onnx_c2;-gencode;arch=compute_61,code=sm_61;-Xcudafe;--diag_suppress=cc_clobber_ignored;-Xcudafe;--diag_suppress=integer_sign_change;-Xcudafe;--diag_suppress=useless_using_declaration;-Xcudafe;--diag_suppress=set_but_not_used;-std=c++11;-Xcompiler;-fPIC;--expt-relaxed-constexpr;--expt-extended-lambda;-D__CUDA_NO_HALF_OPERATORS__;-gencode;arch=compute_61,code=sm_61;-DCUDA_HAS_FP16=1
-- THC_SO_VERSION: 0
-- Performing Test HAS_LUAL_SETFUNCS
-- Performing Test HAS_LUAL_SETFUNCS - Success
CMake Error at CMakeLists.txt:43 (ADD_TORCH_WRAP):
  Unknown CMake command "ADD_TORCH_WRAP".


-- Configuring incomplete, errors occurred!
See also "<FOLDER>/aur-torch7-cutorch-git/src/torch7-cutorch-git/CMakeFiles/CMakeOutput.log".
See also "<FOLDER>/aur-torch7-cutorch-git/src/torch7-cutorch-git/CMakeFiles/CMakeError.log".
==> ERROR: A failure occurred in build().
    Aborting...
==> ERROR: Makepkg was unable to build torch7-cutorch-git.
==> Restart building torch7-cutorch-git ? [y/N]
==> -------------------------------------------
==> 

chrhasse commented on 2019-04-11 04:59

Looks like the latest version of cuda supports gcc-8 and gcc-7 has been removed from community into the AUR so you don't need -DCMAKE_C_COMPILER=gcc-7 anymore.

ei-grad commented on 2018-11-07 23:29

Getting error with CUDA 10:

lib/THC/THCAtomics.cuh(97): error: cannot overload functions distinguished by return type alone

Patch is needed https://github.com/torch/cutorch/issues/834:

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

fuan_k commented on 2018-09-16 19:30

gcc-5 doesn't exist anymore in Arch. Cannot compile:

If I edit PKGBUILD for gcc version 8.2.0 (currently), it yields an error:

/opt/cuda/include/crt/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 7 are not supported! #error -- unsupported GNU version! gcc versions later than 7 are not supported!

Do we really need gcc-5 in order to use cuda? It should at least be marked as a dependency.

Found a pre-built binary package on the manjaro repos for gcc 4.9 (http://kibo.remi.lu/stable/extra/x86_64/gcc49-4.9.3-2-x86_64.pkg.tar.xz) , and used that instead of gcc5, seems to have compiled fine. Had to trick the linker for gcc with ln -s /usr/lib/libmpfr.so /usr/lib/libmpfr.so.4 because we're now at version 6 for libmpfr, and luckily it compiled.

To point to your custom gcc-4.9 edit this line in the PKGBUIL: cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_C_COMPILER=/path/to/gcc49/usr/bin/gcc-4.9 -DCMAKE_BUILD_TYPE=Release

Alternatively, one could use the gcc shipped with cuda in /opt/cuda/bin/gcc I guess...

eigengrau commented on 2017-09-25 14:12

I’m also seeing implicit function declaration errors when building this. The patch posted below resolved this. Maybe it would make sense to apply this here until it is taken up upstream.

zsrkmyn commented on 2017-09-23 18:04

`-fno-plt` is in the `CFLAGS` and `CXXFLAGS` by default in the latest makepkg.conf file, which should be removed, since gcc-5/g++-5 cannot recognize it.

for more details, please refer to [1].

[1] https://git.archlinux.org/svntogit/community.git/tree/repos/community-x86_64/PKGBUILD?h=packages/python-pytorch#n53

torch7-cunn-git has the same problem as well.

edmeme commented on 2017-09-13 14:23

I had to do some juggling to get this building on my system. I got the same errors as @ansine, which were caused because lua52 headers were accidentaly used at some step in the compilation. I solved this by prepending to CPATH=/usr/include/lua5.1/ to cmake in PKGBUILD.

@petronny is right about removing -fno-plt on makepkg.conf, but I wonder how to do it in a way its contained in the PKGBUILD, maybe rewriting CFLAGS in build() is enough.

Furthermore, I believe cmake flag -DCMAKE_C_COMPILER is obsolete, you should use environment variables instead.

Finaly glibc 2.26-3 was attempting to use __Float128 within nvcc, as it was unable to determine correctly GCC's version, the only fix I could find is patching a header of glibc itself.

All the changes I made are in https://www.reddit.com/r/archlinux/comments/6zrmn1/torch_on_arch/dmy58b5/

petronny commented on 2017-08-26 12:56

@xico remove it in /etc/makepkg.conf will work

xico commented on 2017-08-22 12:15

Compilation fails with gcc5 due to the recent adding of `-fno-plt` in makepkg.conf.

https://git.archlinux.org/svntogit/packages.git/commit/trunk/makepkg.conf?h=packages/pacman&id=0cd22d4454e0e1b3ae589b95274f808001465c15

Actual error message is:

CMake Error at /usr/share/cmake-3.9/Modules/CMakeTestCCompiler.cmake:51 (message):
The C compiler "/usr/bin/gcc-5" is not able to compile a simple test
program.