Message ID | 98591987-1670-4F65-9163-1F553A0408B8@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] CUDA - make it work for multiple GPU architectures | expand |
Context | Check | Description |
---|---|---|
andriy/configure | warning | Failed to apply patch |
On 12.03.2021 16:14, Patrick Ecord wrote: > Tried that and ran configure and it failed with Option '--ptx (-ptx)' is not allowed when compiling for multiple GPU architectures" > > So I removed the `-ptx` flag and I was able to run configure and make and make install without any errors. FFmpeg embeds the ptx assembly code. Removing the -ptx option WILL breaks any and all CUDA filters. > Tested by converting Big Buck Bunny and it played fine. > ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i ./Big_Buck_Bunny_1080_10s_30MB.mp4 -c:a copy -c:v h264_nvenc -b:v 5M output.mp4 This only works because you are not actually using any CUDA filters. There is zero need for nvcc support for that commandline. On top of that, just use clang and don't bother with the Nvidia SDK unless you are developing filters.
diff --git a/configure b/configure index d11942fced..d9e4eff592 100755 --- a/configure +++ b/configure @@ -4344,7 +4344,7 @@ fi if enabled cuda_nvcc; then nvcc_default="nvcc" - nvccflags_default="-gencode arch=compute_30,code=sm_30 -O2" + nvccflags_default="-arch=sm_52 -gencode=arch=compute_52,code=sm_52 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_61,code=sm_61 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_80,code=sm_80 -gencode=arch=compute_86,code=sm_86 -gencode=arch=compute_86,code=compute_86" else nvcc_default="clang" nvccflags_default="--cuda-gpu-arch=sm_30 -O2" @@ -6240,7 +6240,7 @@ else fi if enabled cuda_nvcc; then - nvccflags="$nvccflags -ptx" + nvccflags="$nvccflags" else nvccflags="$nvccflags -S -nocudalib -nocudainc --cuda-device-only -Wno-c++11-narrowing -include ${source_link}/compat/cuda/cuda_runtime.h" check_nvcc cuda_llvm