Opened 2 months ago

#8790 new defect

Compile NVDEC with Quadro RTX 6000 : "ERROR: failed checking for nvcc"

Reported by: mliradelc Owned by:
Priority: normal Component: build system
Version: unspecified Keywords: configure, nvidia, nvenc, nvcc, compile, build
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

When you try to compile FFmpeg 4.3 - 4.3.1 with Nvidia options enabled, results in a Nvidia compiler error. during the configure phase.

The details from the error log (config.log) are:

check_nvcc cuda_nvcc
test_nvcc
BEGIN /tmp/ffconf.lcEnfW9f/test.cu
    1   extern "C" {
    2       __global__ void hello(unsigned char *data) {}
    3   }
END /tmp/ffconf.lcEnfW9f/test.cu
nvcc -gencode arch= ,code=sm_30 -O2 -m64 -ptx -c -o /tmp/ffconf.lcEnfW9f/test.o /tmp/ffconf.lcEnfW9f/test.cu
nvcc fatal   : Unsupported gpu architecture 'compute_30'
ERROR: failed checking for nvcc.

How to reproduce:

Try to build ffmpeg, in my case using a self made script that you can find herehttps://github.com/markus-perl/ffmpeg-build-script/blob/master/build-ffmpeg.


Why happens:

This error happens because since the latest CUDA SDK (11.0) only accepts compute capability 5.2 - 8.0 (Maxwell, Pascal, Volta, Turing, Ampere). Compute_30

How to fix (Workaround):

The fix is to modify the compute version from 30 to 52 in the configure file:

if enabled cuda_nvcc; then
    nvcc_default="nvcc"
    nvccflags_default="-gencode arch=compute_52,code=sm_52 -O2"
else
    nvcc_default="clang"
    nvccflags_default="--cuda-gpu-arch=sm_52 -O2"
    NVCC_C=""
fi

System data

Quadro RTX6000 card with the latest cuda sdk (11.0) and the nvidia drivers 450.51.05.
OS: Centos 7

Nvidia SMI data:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.51.05    Driver Version: 450.51.05    CUDA Version: 11.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Quadro RTX 6000     Off  | 00000000:3B:00.0 Off |                    0 |
| N/A   31C    P0    23W / 250W |      0MiB / 22698MiB |      5%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

Change History (0)

Note: See TracTickets for help on using tickets.