Opened 4 years ago

Last modified 8 weeks ago

#9150 new defect

Latest MSVS breaks build on windows

Reported by: TwinOak Owned by:
Priority: normal Component: avfilter
Version: git-master Keywords: cuda
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

When building on Windows (MSVC, MSYS2) with Nvidia HW support, MSVC 16.9 breaks the process, NVCC (CUDA dev version 11.2) is complaining about

libavfilter/vf_scale_cuda_bicubic.cu(101): error: calling a __host__ function("__floorf") from a __device__ function("Subsample_Bicubic<unsigned char> ") is not allowed

libavfilter/vf_scale_cuda_bicubic.cu(101): error: identifier "__floorf" is undefined in device code

Changing the four floor calls to floorf in libavfilter/vf_scale_cuda_bicubic.cu as suggested here
https://devtalk.blender.org/t/cuda-compile-error-windows-10/17886/4
seems to do the business. Builds fine and the filter works.

Being a bit green when it comes to development and contributing, I hope that someone with more experience could provide a patch.

Best regards
Alexander

Change History (3)

comment:1 by TwinOak, 4 years ago

Summary: Latest MSVSLatest MSVS breaks build on windows

comment:2 by Carl Eugen Hoyos, 4 years ago

Keywords: filter floor floorf removed

Please send your patch - made with git format-patch - to the FFmpeg development mailing list.

comment:3 by Balling, 8 weeks ago

This is a bug in actual new version of new MSVC (the issue is that cmath now has new header file that had floor, so that overrides a/intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h), new compiler, new bugfixes... This must be fixed already, see #9019 and file vf_scale_cuda_bicubic.cu does not even exist anymore. Probably this https://github.com/FFmpeg/FFmpeg/blob/1864025458021a2d2c542f56e268ee1106f84460/libavfilter/vf_scale_cuda.cu#L1120

And anyway, you misunderstood the way this should have been fixed, you were supposed to patch ACTUAL Nvidia SDK files, that is intern/cycles/kernel/kernels/cuda/kernel_cuda_image.h to have new function and thrn also patch cu files in ffmpeg to use that.

Last edited 8 weeks ago by Balling (previous) (diff)
Note: See TracTickets for help on using tickets.