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

Git Clone URL: https://aur.archlinux.org/torch7-cutorch-git.git (read-only, click to copy)
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: None
Last Packager: petronny
Votes: 7
Popularity: 0.000368
First Submitted: 2016-08-28 13:17
Last Updated: 2019-08-14 09:53

Dependencies (4)

Sources (2)

Latest Comments

1 2 Next › Last »

Talzahr commented on 2020-11-04 12:51

Appears that gcc8 package is required now but not in the makedeps.

**edit: error near end of compiling. The cutorch project hasn't been touched in several years now. Maybe I can find a patch

spendingmarrow commented on 2020-08-25 14:32

I get the following error:

 
:: (1/1) Parsing SRCINFO: torch7-cutorch-git
==> Making package: torch7-cutorch-git r1026.5e9d86c-5 (Tue 25 Aug 2020 10:23:18 AM)
==> Retrieving sources...
  -> Updating torch7-cutorch-git git repo...
Fetching origin
  -> Found THCAtomics.cuh.patch
==> Validating source files with sha512sums...
    torch7-cutorch-git ... Skipped
    THCAtomics.cuh.patch ... Passed
==> Making package: torch7-cutorch-git r1026.5e9d86c-5 (Tue 25 Aug 2020 10:23:20 AM)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating torch7-cutorch-git git repo...
Fetching origin
  -> Found THCAtomics.cuh.patch
==> Validating source files with sha512sums...
    torch7-cutorch-git ... Skipped
    THCAtomics.cuh.patch ... Passed
==> Removing existing $srcdir/ directory...
==> 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()...
==> Sources are ready.
==> Making package: torch7-cutorch-git r1026.5e9d86c-5 (Tue 25 Aug 2020 10:23:23 AM)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting pkgver()...
==> Removing existing $pkgdir/ directory...
==> 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 8.4.0
-- The CXX compiler identification is GNU 10.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc-8 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Torch7 in /usr
-- 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  
-- Found CUDA: /opt/cuda (found suitable version "11.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):  6.1
-- got cuda version 11.0
-- Found CUDA with FP16 support, compiling with torch.CudaHalfTensor
-- CUDA_NVCC_FLAGS: -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 - Failed
-- Configuring done
-- Generating done
-- Build files have been written to: /home/angad/.cache/yay/torch7-cutorch-git/src/torch7-cutorch-git
[  1%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o
[  2%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorCopy.cu.o
[  3%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCSleep.cu.o
[  4%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorage.cu.o
[  5%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o
[  6%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o
[  7%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCStorageCopy.cu.o
[  8%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensor.cu.o
[ 10%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMath.cu.o
[ 11%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMath2.cu.o
[ 12%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMathBlas.cu.o
[ 13%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMathMagma.cu.o
[ 14%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMathPairwise.cu.o
[ 15%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMathReduce.cu.o
[ 16%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMathScan.cu.o
[ 17%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorIndex.cu.o
[ 18%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorConv.cu.o
[ 20%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorRandom.cu.o
[ 21%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorScatterGather.cu.o
[ 22%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorTopK.cu.o
[ 23%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorSort.cu.o
[ 24%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorTypeUtils.cu.o
[ 25%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCSortUtils.cu.o
[ 26%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/THC_generated_THCTensorMode.cu.o
[ 27%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorSortByte.cu.o
[ 28%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathCompareTByte.cu.o
[ 30%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathPointwiseByte.cu.o
[ 31%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathCompareByte.cu.o
[ 32%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathReduceByte.cu.o
[ 33%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMaskedByte.cu.o
[ 34%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorSortChar.cu.o
[ 35%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathCompareTChar.cu.o
[ 36%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathPointwiseChar.cu.o
[ 37%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathCompareChar.cu.o
[ 38%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathReduceChar.cu.o
[ 40%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMaskedChar.cu.o
[ 41%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorSortShort.cu.o
[ 42%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathCompareTShort.cu.o
[ 43%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathPointwiseShort.cu.o
[ 44%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathCompareShort.cu.o
[ 45%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathReduceShort.cu.o
[ 46%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMaskedShort.cu.o
[ 47%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorSortInt.cu.o
[ 48%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathCompareTInt.cu.o
[ 50%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathPointwiseInt.cu.o
[ 51%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathCompareInt.cu.o
[ 52%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathReduceInt.cu.o
[ 53%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMaskedInt.cu.o
[ 54%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorSortLong.cu.o
[ 55%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathCompareTLong.cu.o
[ 56%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathPointwiseLong.cu.o
[ 57%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathCompareLong.cu.o
[ 58%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathReduceLong.cu.o
[ 60%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMaskedLong.cu.o
[ 61%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorSortHalf.cu.o
[ 62%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathCompareTHalf.cu.o
[ 63%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathPointwiseHalf.cu.o
[ 64%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathCompareHalf.cu.o
[ 65%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathReduceHalf.cu.o
[ 66%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMaskedHalf.cu.o
[ 67%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorSortFloat.cu.o
[ 68%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathCompareTFloat.cu.o
[ 70%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathPointwiseFloat.cu.o
[ 71%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathCompareFloat.cu.o
[ 72%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathReduceFloat.cu.o
[ 73%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMaskedFloat.cu.o
[ 74%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorSortDouble.cu.o
[ 75%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathCompareTDouble.cu.o
[ 76%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathPointwiseDouble.cu.o
[ 77%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathCompareDouble.cu.o
[ 78%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMathReduceDouble.cu.o
[ 80%] Building NVCC (Device) object lib/THC/CMakeFiles/THC.dir/generated/THC_generated_THCTensorMaskedDouble.cu.o
Scanning dependencies of target THC
[ 81%] Building CXX object lib/THC/CMakeFiles/THC.dir/THCCachingHostAllocator.cpp.o
[ 83%] Building CXX object lib/THC/CMakeFiles/THC.dir/THCCachingAllocator.cpp.o
[ 83%] Building C object lib/THC/CMakeFiles/THC.dir/THCStorageCopy.c.o
[ 85%] Building C object lib/THC/CMakeFiles/THC.dir/THCGeneral.c.o
[ 84%] Building CXX object lib/THC/CMakeFiles/THC.dir/THCStream.cpp.o
[ 87%] Building CXX object lib/THC/CMakeFiles/THC.dir/THCTensorRandom.cpp.o
[ 87%] Building C object lib/THC/CMakeFiles/THC.dir/THCTensor.c.o
[ 88%] Building C object lib/THC/CMakeFiles/THC.dir/THCTensorCopy.c.o
[ 90%] Building C object lib/THC/CMakeFiles/THC.dir/THCThreadLocal.c.o
[ 91%] Linking CXX shared library libTHC.so
[ 91%] Built target THC
[ 92%] Generating TensorMath.c
Scanning dependencies of target cutorch
[ 93%] Building C object CMakeFiles/cutorch.dir/Storage.c.o
[ 94%] Building C object CMakeFiles/cutorch.dir/Tensor.c.o
[ 96%] Building C object CMakeFiles/cutorch.dir/init.c.o
[ 96%] Building C object CMakeFiles/cutorch.dir/TensorOperator.c.o
[ 97%] Building C object CMakeFiles/cutorch.dir/torch/utils.c.o
[ 98%] Building C object CMakeFiles/cutorch.dir/TensorMath.c.o
/home/angad/.cache/yay/torch7-cutorch-git/src/torch7-cutorch-git/init.c: In function ‘cutorch_isManagedPtr’:
/home/angad/.cache/yay/torch7-cutorch-git/src/torch7-cutorch-git/init.c:938:34: error: ‘struct cudaPointerAttributes’ has no member named ‘isManaged’
     lua_pushboolean(L, attributes.isManaged);
                                  ^
make[2]: *** [CMakeFiles/cutorch.dir/build.make:99: CMakeFiles/cutorch.dir/init.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:134: CMakeFiles/cutorch.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
error making: torch7-cutorch-git

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/