[FFmpeg-devel] Unable to use sqrt() and exp() in CUDA

Timo Rothenpieler timo at rothenpieler.org
Sat Jun 26 16:37:16 EEST 2021


On 26.06.2021 15:35, Dylan Fernando wrote:
> I can't seem to be able to use exp() and sqrt() in CUDA.
> 
> I get:
> 
> NVCC    libavfilter/try_cuda.ptx
> clang-11: warning: Unknown CUDA version. cuda.h: CUDA_VERSION=11030.
> Assuming the latest supported version 10.1 [-Wunknown-cuda-version]
> libavfilter/try_cuda.cu:39:19: error: use of undeclared identifier 'exp'
>         float g = exp(f);

Is this using enable-cuda-llvm? If so, you will need to add any new 
functions to our compat layer in compat/cuda/cuda_runtime.h.

Also, where does this cuda.h error come from? Are you including that in 
your cuda file? If so, don't. It's not license compatible with ffmpeg.

For development of filters, I usually use actual CUDA nvcc, since it 
also supports greater debugging features, and then in the end solve any 
compatibility issues with a clang build.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4494 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210626/70e260df/attachment.bin>


More information about the ffmpeg-devel mailing list