HazyResearch / safari

Convolutions for Sequence Modeling
Apache License 2.0
848 stars 70 forks source link

fftconv compiling issue #27

Closed leeyeehoo closed 1 year ago

leeyeehoo commented 1 year ago
      In file included from /usr/local/cuda-11.3/include/cuda/std/cmath:19,                                                      
                       from /usr/local/cuda-11.3/include/cuda/std/complex:12,                                                    
                       from fftconv.cpp:6:                                                                                       
      /usr/local/cuda-11.3/include/cuda/std/detail/libcxx/include/cmath:569:101: error: ‘float cuda::std::__3::hypot(float, float
, float)’ conflicts with a previous declaration                                                                                  
        569 | inline _LIBCUDACXX_INLINE_VISIBILITY float       hypot(       float x,       float y,       float z ) { return sqrt
(x*x + y*y + z*z); }
            |                                                                                                     ^
      In file included from fftconv.cpp:3:
      /usr/include/c++/9/cmath:1868:3: note: previous declaration ‘float std::hypot(float, float, float)’
       1868 |   hypot(float __x, float __y, float __z)
            |   ^~~~~
      In file included from /usr/local/cuda-11.3/include/cuda/std/cmath:19,
                       from /usr/local/cuda-11.3/include/cuda/std/complex:12,
                       from fftconv.cpp:6:
      /usr/local/cuda-11.3/include/cuda/std/detail/libcxx/include/cmath:570:101: error: ‘double cuda::std::__3::hypot(double, dou
ble, double)’ conflicts with a previous declaration
        570 | inline _LIBCUDACXX_INLINE_VISIBILITY double      hypot(      double x,      double y,      double z ) { return sqrt
(x*x + y*y + z*z); }
            |                                                                                                     ^
      In file included from fftconv.cpp:3:
      /usr/include/c++/9/cmath:1872:3: note: previous declaration ‘double std::hypot(double, double, double)’
       1872 |   hypot(double __x, double __y, double __z)
            |   ^~~~~
      In file included from /usr/local/cuda-11.3/include/cuda/std/cmath:19,
                       from /usr/local/cuda-11.3/include/cuda/std/complex:12,
                       from fftconv.cpp:6:
      /usr/local/cuda-11.3/include/cuda/std/detail/libcxx/include/cmath:572:101: error: ‘long double cuda::std::__3::hypot(long d
ouble, long double, long double)’ conflicts with a previous declaration
        572 | inline _LIBCUDACXX_INLINE_VISIBILITY long double hypot( long double x, long double y, long double z ) { return sqrt
(x*x + y*y + z*z); }
            |                                                                                                     ^
      In file included from fftconv.cpp:3:
      /usr/include/c++/9/cmath:1876:3: note: previous declaration ‘long double std::hypot(long double, long double, long double)’
       1876 |   hypot(long double __x, long double __y, long double __z)
            |   ^~~~~
      error: command '/usr/bin/gcc' failed with exit code 1

with cuda 11.3, gcc 9.4.0, pytorch 2.1.0, pip install . under folder csrc/fftconv Kindly ask if anyone encounter this issue. Thank you!

radarFudan commented 1 year ago

Please try CUDA 11.7+, PyTorch 1.13(not 2.0).

I can do the compilation in 11.7(or 12.0)+1.13 setting.

DanFu09 commented 1 year ago

We recommend using the Nvidia PyTorch container for compiling.

leeyeehoo commented 1 year ago

Thank you @DanFu09 @radarFudan !