Error when compiling

#1
by getnow - opened

Hi!
It does not work at Ubuntu 22.04
It started then tried to compile modules
"Building extension module wkv_cuda..."
then generated a huge lot of errors
26 errors detected in the compilation of "/root/miniconda3/envs/test-pycuda-py310/lib/python3.10/site-packages/rwkv/cuda/operators.cu" with endings of
FAILED: operators.cuda.o
FAILED: wrapper.o
RuntimeError: Error building extension 'wkv_cuda'
------------some errors like this
/usr/include/c++/11/bits/std_mutex.h(169): error: identifier "pthread_cond_clockwait" is undefined
mutex(272): error: identifier "pthread_mutex_clocklock" is undefined

/miniconda3/envs/test-pycuda-py310/include/thrust/detail/complex/cproj.h(41): error: more than one instance of overloaded function "thrust::detail::complex::isinf" matches the argument list:
function "std::isinf(double)" (declared at line 592 of /usr/include/c++/11/cmath)
function "isinf(double) throw()" (declared at line 201 of /usr/include/x86_64-linux-gnu/bits/mathcalls.h)

/usr/include/c++/11/shared_mutex:633:21: error: there are no arguments to ‘pthread_rwlock_clockrdlock’ that depend on a template parameter, so a declaration of ‘pthread_rwlock_clockrdlock’ must be available [-fpermissive]
633 | int __ret = pthread_rwlock_clockrdlock(&_M_rwlock, CLOCK_MONOTONIC,
-----------------------------------etc etc
c++ (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
python 3.10 (also checked with 3.9)
CUDA Version: 12.0
Any suggestions?
Thanks!

maybe set os.environ["RWKV_CUDA_ON"] = '0' first (slower but works) until you solve your env issue :)

Yes, it works with this parameter set to "0", thank you!
But what does it mean? It not uses all features in some modules, as I understand.

I also used c++ 9.5.0 version in previous my attempt when os.environ["RWKV_CUDA_ON"] = '1' and failed as above and then tried with rwkv 0.7.2 (failed).
Maybe it depends of CUDA version?

export PATH=/usr/local/cuda:$PATH

it should be:
export PATH=/usr/local/cuda/bin:$PATH

After setting this env variable, the compiling error is gone

Sign up or log in to comment