[FFmpeg-devel] Unable to compile with cuda
Dylan Fernando
dylanf123 at gmail.com
Mon May 24 21:56:50 EEST 2021
On Sun, May 23, 2021 at 3:03 PM Dennis Mungai <dmngaie at gmail.com> wrote:
> On Sun, 23 May 2021 at 15:08, Dylan Fernando <dylanf123 at gmail.com> wrote:
>
> > I got it to work, with --enable-cuda as well, using:
> >
> > PKG_CONFIG_PATH="/home/dylan/Files/nv-codec-headers" ./configure
> > --enable-opencl --enable-vulkan --enable-libglslang --disable-stripping
> > --enable-nonfree --enable-cuda --enable-cuda-nvcc
> > --extra-cflags=-I/opt/local/cuda/include --nvccflags="-gencode
> > arch=compute_52,code=sm_52 -O2"
> >
> > Thanks,
> > Dylan
> >
> >
>
> Dylan,
>
> That has to be a very old build of FFmpeg. The option --enable-cuda has
> been deprecated for months. Try building from a current release or git
> master.
> For the LLVM route, you can also pass nvccflags in this fashion:
> --enable-cuda-llvm --nvccflags="--cuda-gpu-arch=sm_52 -O2".
> These flags will differ based on your current GPU and the CUDA version in
> use. See
>
> https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#options-for-steering-gpu-code-generation
> FFmpeg's ./cconfigure script picks a very old set of flags that are
> deprecated in newer CUDA versions, hence the need to override these flags
> with CUDA builds. See:
> https://github.com/FFmpeg/FFmpeg/blob/master/configure#L4382
> The difference between the build with and without the proprietary CUDA SDK
> will be the inclusion of the scale_npp filters.
> With the proprietary SDK, both the scale_npp and scale_cuda filters will be
> available.
> With the cuda llvm route, only scale_cuda will be available.
> For more on their usage, see https://superuser.com/a/1650962/473795
> And for more on compiling cuda with llvm, see the llvm wiki entry here:
> https://llvm.org/docs/CompileCudaWithLLVM.html
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
Hi Dennis, Timo,
I omitted --enable-cuda and it works correctly. I also switched to using
--enable-cuda-llvm.
Thanks,
Dylan
More information about the ffmpeg-devel
mailing list