Skip to content
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

CMake Error at THCUNN_generated_LookupTable.cu.o.cmake:267 (message): #494

Open
lethal233 opened this issue Nov 27, 2020 · 0 comments
Open

Comments

@lethal233
Copy link

when I tried to install the cunn through luarocks: luarocks make rocks/cunn-scm-1.rockspec, it occurs error:

/media/xxx/21EC3ABD229B0E60/project/cnncomplete-master/torch/cunn/lib/THCUNN/LookupTable.cu(32): error: identifier "__shfl" is undefined

/media/xxx/21EC3ABD229B0E60/project/cnncomplete-master/torch/cunn/lib/THCUNN/LookupTable.cu(49): warning: function "__any"
/usr/local/cuda/include/device_atomic_functions.h(178): here was declared deprecated ("__any() is not valid on compute_70 and above, and should be replaced with __any_sync().To continue using __any(), specify virtual architecture compute_60 when targeting sm_70 and above, for example, using the pair of compiler options: -arch=compute_60 -code=sm_70.")

1 error detected in the compilation of "/tmp/tmpxft_00002d60_00000000-6_LookupTable.cpp1.ii".
CMake Error at THCUNN_generated_LookupTable.cu.o.cmake:267 (message):
  Error generating file
  /media/xxx/21EC3ABD229B0E60/project/cnncomplete-master/torch/cunn/build/lib/THCUNN/CMakeFiles/THCUNN.dir//./THCUNN_generated_LookupTable.cu.o


lib/THCUNN/CMakeFiles/THCUNN.dir/build.make:8598: recipe for target 'lib/THCUNN/CMakeFiles/THCUNN.dir/THCUNN_generated_LookupTable.cu.o' failed
make[2]: *** [lib/THCUNN/CMakeFiles/THCUNN.dir/THCUNN_generated_LookupTable.cu.o] Error 1
CMakeFiles/Makefile2:130: recipe for target 'lib/THCUNN/CMakeFiles/THCUNN.dir/all' failed
make[1]: *** [lib/THCUNN/CMakeFiles/THCUNN.dir/all] Error 2
Makefile:148: recipe for target 'all' failed
make: *** [all] Error 2

and in LookupTable.cu

#if __CUDA_ARCH__ >= 300

  #pragma unroll
  for (int i = 1; i <= 16; i++)
  {
    dup |= (__shfl(val, (laneId + i) % 32) == val);    <- line 32
  }

#else

  volatile __shared__ int values[128];
  values[threadIdx.x] = val;
  const int offset = threadIdx.x - laneId;

  #pragma unroll
  for (int i = 1; i <= 16; i++)
  {
    dup |= (values[offset + ((laneId + i) % 32)] == val);
  }

#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant