File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 55
66#include  " THCDeviceTensor.cuh" 
77#include  " THCDeviceTensorUtils.cuh" 
8- 
8+ # include   " THCDeviceUtils.cuh " 
99const  int  WARP_SIZE = 32 ;
1010
1111//  The maximum number of threads in a block
@@ -80,7 +80,7 @@ template <typename T>
8080static  __device__  __forceinline__  T warpSum (T val) {
8181#if  __CUDA_ARCH__ >= 300
8282  for  (int  i = 0 ; i < getMSB (WARP_SIZE); ++i) {
83-     val += __shfl_xor (val, 1  << i, WARP_SIZE);
83+     val += WARP_SHFL_XOR (val, 1  << i, WARP_SIZE);
8484  }
8585#else 
8686  __shared__  T values[MAX_BLOCK_SIZE];
Original file line number Diff line number Diff line change @@ -51,6 +51,10 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
5151  endif (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER  "4.9.3" )
5252endif (CMAKE_CXX_COMPILER_ID STREQUAL  "GNU" )
5353
54+ if (CUDA_VERSION VERSION_GREATER  "8.0" )
55+   LIST (APPEND  CUDA_NVCC_FLAGS "-D__CUDA_NO_HALF_OPERATORS__" )
56+ endif (CUDA_VERSION VERSION_GREATER  "8.0" )
57+ 
5458IF (MSVC )
5559  LIST (APPEND  CUDA_NVCC_FLAGS "-Xcompiler /wd4819" )
5660  ADD_DEFINITIONS (-DTH_EXPORTS)
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments