-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Request] Add support for libvmaf_cuda
filter
#717
Comments
Do we need to install this CUDA from somewhere first? :)
…On Thu, Oct 26, 2023 at 5:31 PM HunterAP23 ***@***.***> wrote:
The libvmaf_cuda filter is a CUDA-accelerated version of the regular
libvmaf filter. Normally FFmpeg will compile it if libvmaf was built with
the meson option -Denable_cuda=true, and if FFmpeg was configured with
these options: --enable-nonfree --enable-ffnvcodec --enable-libvmaf
--enable-nonfree is added when the the cross_compile_ffmpeg.sh option
--disable-nonfree=n is specified.
I've made a modified version of the build script to try to compile libvmaf
with CUDA support, but it currently fails to compile. When setting up the
environment, installing cuda, libvmaf fails to compile as it seems to not
be able to find CUDA when using the option
--cross-file=meson-cross.mingw.txt:
The Meson build system
Version: 1.2.3
Source dir: /ffmpeg-windows-build-helpers/sandbox/win64/vmaf_git/libvmaf
Build dir: /ffmpeg-windows-build-helpers/sandbox/win64/vmaf_git/libvmaf/build
Build type: cross build
Project name: libvmaf
Project version: 2.3.1
C compiler for the host machine: /ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/bin/x86_64-w64-mingw32-gcc (gcc 10.2.0 "x86_64-w64-mingw32-gcc (GCC) 10.2.0")
C linker for the host machine: /ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/bin/x86_64-w64-mingw32-gcc ld.bfd 2.36.1
C++ compiler for the host machine: /ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/bin/x86_64-w64-mingw32-g++ (gcc 10.2.0 "x86_64-w64-mingw32-g++ (GCC) 10.2.0")
C++ linker for the host machine: /ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/bin/x86_64-w64-mingw32-g++ ld.bfd 2.36.1
C compiler for the build machine: cc (gcc 7.5.0 "cc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0")
C linker for the build machine: cc ld.bfd 2.30
C++ compiler for the build machine: c++ (gcc 7.5.0 "c++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0")
C++ linker for the build machine: c++ ld.bfd 2.30
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Check usable header "stdatomic.h" : YES
Configuring version.h using configuration
Program nasm found: YES (/usr/bin/nasm)
Configuring config.asm using configuration
Program xxd found: YES (/usr/bin/xxd)
Run-time dependency CUDA found: NO
src/meson.build:162:22: ERROR: Dependency lookup for cuda with method 'system' failed: Couldn't find requested CUDA module 'cudart_static'
A full log can be found at /ffmpeg-windows-build-helpers/sandbox/win64/vmaf_git/libvmaf/build/meson-logs/meson-log.txt
I crudely modified the cross_compile_ffmpeg.sh file to grab the master
branch of the VMAF library and to use the -Denable_cuda=true option in
the meson setup, which is where the issue mentioned above occurs. If I do
no specify the --cross-file option, then the build succeeds, but
obviously does not create anything usable for a Windows version. I'm not
sure how to set some variable for meson to find CUDA correctly in this
state.
This is the diff of my modified cross_compile_ffmpeg.sh script against
the original:
1065,1067c1065
< do_git_checkout https://github.com/Netflix/vmaf.git vmaf_git
< export CUDA_HOME=/usr/local/cuda
< export CUDA_PATH=/usr/local/cuda
---
> do_git_checkout https://github.com/Netflix/vmaf.git vmaf_git v2.3.0
1074c1072
< local meson_options="--prefix=${mingw_w64_x86_64_prefix} --libdir=${mingw_w64_x86_64_prefix}/lib -Denable_cuda=true --buildtype=release --default-library=static . build"
---
> local meson_options="--prefix=${mingw_w64_x86_64_prefix} --libdir=${mingw_w64_x86_64_prefix}/lib --buildtype=release --default-library=static . build"
2375c2373
< config_options="$init_options --enable-libcaca --enable-gray --enable-libtesseract --enable-fontconfig --enable-gmp --enable-libass --enable-libbluray --enable-libbs2b --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libvorbis --enable-libwebp --enable-libzimg --enable-libzvbi --enable-libmysofa --enable-libopenjpeg --enable-libopenh264 --enable-ffnvcodec --enable-libvmaf --enable-libsrt --enable-libxml2 --enable-opengl --enable-libdav1d --enable-cuda-llvm --enable-gnutls"
---
> config_options="$init_options --enable-libcaca --enable-gray --enable-libtesseract --enable-fontconfig --enable-gmp --enable-libass --enable-libbluray --enable-libbs2b --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libvorbis --enable-libwebp --enable-libzimg --enable-libzvbi --enable-libmysofa --enable-libopenjpeg --enable-libopenh264 --enable-libvmaf --enable-libsrt --enable-libxml2 --enable-opengl --enable-libdav1d --enable-cuda-llvm --enable-gnutls"
—
Reply to this email directly, view it on GitHub
<#717>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAADBUDKAU5ZXPTJGE77S5LYBLXFDAVCNFSM6AAAAAA6R7APXCVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE3DINJRG43DMOA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Cross-posting this information form the vmaf repo issue here: Netflix/vmaf#1227 (comment) After installing CUDA (I tried 10.2, 11.6, 11.8, and 12.2) and NVCC, along with all the requirements for both libvmaf and the ffmpeg builder tool, I modified the ffmpeg build script to do the following three things:
After doing that, I get this issue:
I fixed the above issue by copying the After doing this, the
and adding Afterwards attempting to run the compile script again, I'm met with a different error, this one from
Not sure what the |
@HunterAP23
|
The
libvmaf_cuda
filter is a CUDA-accelerated version of the regularlibvmaf
filter. Normally FFmpeg will compile it iflibvmaf
was built with themeson
option-Denable_cuda=true
, and if FFmpeg was configured with these options:--enable-nonfree --enable-ffnvcodec --enable-libvmaf
--enable-nonfree
is added when the thecross_compile_ffmpeg.sh
option--disable-nonfree=n
is specified.I've made a modified version of the build script to try to compile
libvmaf
with CUDA support, but it currently fails to compile. When setting up the environment, installingcuda
,libvmaf
fails to compile as it seems to not be able to find CUDA when using the option--cross-file=meson-cross.mingw.txt
:I crudely modified the
cross_compile_ffmpeg.sh
file to grab the master branch of theVMAF
library and to use the-Denable_cuda=true
option in the meson setup, which is where the issue mentioned above occurs. If I do not specify the--cross-file
option, then the build succeeds, but obviously does not create anything usable for a Windows version. I'm not sure how to set some variable for meson to find CUDA correctly in this state.This is the diff of my modified
cross_compile_ffmpeg.sh
script against the original:The text was updated successfully, but these errors were encountered: