Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 937032 - OpenImageDenoise_device_cuda-build fails in media-libs/oidn-2.3.0
Summary: OpenImageDenoise_device_cuda-build fails in media-libs/oidn-2.3.0
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Sebastian Parborg
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-01 05:20 UTC by Alexey Chernyak
Modified: 2024-08-08 08:15 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Chernyak 2024-08-01 05:20:27 UTC
Haven't been able to build any oidn-2 ebuilds on a CUDA system.

[ebuild     U  ] media-libs/oidn-2.3.0::gentoo [1.4.3::gentoo] USE="cuda%* -apps% -hip% -openimageio% -test%" AMDGPU_TARGETS="gfx90a%* gfx906%* gfx908%* gfx1030%* -gfx803% -gfx900% -gfx1010% -gfx1011% -gfx1012% -gfx1031% -gfx1100% -gfx1101% -gfx1102%" LLVM_SLOT="17%* -15% -16%" PYTHON_SINGLE_TARGET="(-python3_10%) (-python3_11%*)" 0 KiB


OpenImageDenoise_device_cuda-configure completes fine:

[97/116] cd /mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0_build/devices/cuda/build && /usr/bin/cmake -GNinja -C/mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0_build/devices/cuda/tmp/OpenImageDenoise_device_cuda-cache-RelWithDebInfo.cmake -S /mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0/devices/cuda -B /mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0_build/devices/cuda/build && /usr/bin/cmake -E touch /mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0_build/devices/cuda/stamp/OpenImageDenoise_device_cuda-configure
loading initial cache file /mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0_build/devices/cuda/tmp/OpenImageDenoise_device_cuda-cache-RelWithDebInfo.cmake
-- The CXX compiler identification is GNU 13.3.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found CUDAToolkit: /opt/cuda/targets/x86_64-linux/include (found suitable version "12.5.82", minimum required is "11.8")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- The CUDA compiler identification is NVIDIA 12.5.82
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /opt/cuda/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Found Python: /mnt/tmpfs/portage/media-libs/oidn-2.3.0/temp/python3.13/bin/python3 (found version "3.13.0") found components: Interpreter
-- Configuring done (6.2s)
-- Generating done (0.0s)
-- Build files have been written to: /mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0_build/devices/cuda/build


OpenImageDenoise_device_cuda-build fails:

[114/116] cd /mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0_build/devices/cuda/build && /usr/bin/cmake --build .
FAILED: devices/cuda/stamp/OpenImageDenoise_device_cuda-build /mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0_build/devices/cuda/stamp/OpenImageDenoise_device_cuda-build 
cd /mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0_build/devices/cuda/build && /usr/bin/cmake --build .
[1/12] Building CXX object CMakeFiles/OpenImageDenoise_device_cuda.dir/cuda_external_buffer.cpp.o
[2/12] Building CXX object CMakeFiles/OpenImageDenoise_device_cuda.dir/cuda_module.cpp.o
[3/12] Building CXX object CMakeFiles/curtn.dir/curtn.cpp.o
[4/12] Linking CXX static library /mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0_build/libcurtn.a
[5/12] Building CXX object CMakeFiles/OpenImageDenoise_device_cuda.dir/cuda_device.cpp.o
[6/12] Building CUDA object CMakeFiles/OpenImageDenoise_device_cuda.dir/cuda_engine.cu.o
FAILED: CMakeFiles/OpenImageDenoise_device_cuda.dir/cuda_engine.cu.o 
/opt/cuda/bin/nvcc -forward-unknown-to-host-compiler -ccbin=/usr/x86_64-pc-linux-gnu/gcc-bin/13 -DOIDN_DEVICE_CUDA_API_DRIVER -DOpenImageDenoise_device_cuda_EXPORTS -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0/devices/cuda/../../external/cutlass/include -I/mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0/devices/cuda/../../external/cutlass/tools/util/include -isystem /opt/cuda/targets/x86_64-linux/include -isystem /mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0 -isystem /mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0/external -isystem /mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0_build -O2 -g -DNDEBUG -std=c++11 -Xcompiler=-fPIC -fvisibility=internal -fvisibility-inlines-hidden -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_90,code=sm_90 -MD -MT CMakeFiles/OpenImageDenoise_device_cuda.dir/cuda_engine.cu.o -MF CMakeFiles/OpenImageDenoise_device_cuda.dir/cuda_engine.cu.o.d -x cu -c /mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0/devices/cuda/cuda_engine.cu -o CMakeFiles/OpenImageDenoise_device_cuda.dir/cuda_engine.cu.o
/mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0/core/math.h(25): error: more than one instance of overloaded function "max" matches the argument list:
            function "max(int, int)" (declared at line 386 of /opt/cuda/targets/x86_64-linux/include/crt/math_functions.h)
            function "max(unsigned int, unsigned int)" (declared at line 997 of /opt/cuda/targets/x86_64-linux/include/crt/math_functions.hpp)
            function "max(int, unsigned int)" (declared at line 1002 of /opt/cuda/targets/x86_64-linux/include/crt/math_functions.hpp)
            function "max(unsigned int, int)" (declared at line 1007 of /opt/cuda/targets/x86_64-linux/include/crt/math_functions.hpp)
            function "max(long, long)" (declared at line 1012 of /opt/cuda/targets/x86_64-linux/include/crt/math_functions.hpp)
            function "max(unsigned long, unsigned long)" (declared at line 1031 of /opt/cuda/targets/x86_64-linux/include/crt/math_functions.hpp)
            function "max(long, unsigned long)" (declared at line 1049 of /opt/cuda/targets/x86_64-linux/include/crt/math_functions.hpp)
            function "max(unsigned long, long)" (declared at line 1067 of /opt/cuda/targets/x86_64-linux/include/crt/math_functions.hpp)
            function "max(long long, long long)" (declared at line 1085 of /opt/cuda/targets/x86_64-linux/include/crt/math_functions.hpp)
            function "max(unsigned long long, unsigned long long)" (declared at line 1090 of /opt/cuda/targets/x86_64-linux/include/crt/math_functions.hpp)
            function "max(long long, unsigned long long)" (declared at line 1095 of /opt/cuda/targets/x86_64-linux/include/crt/math_functions.hpp)
            function "max(unsigned long long, long long)" (declared at line 1100 of /opt/cuda/targets/x86_64-linux/include/crt/math_functions.hpp)
            function "max(float, float)" (declared at line 1105 of /opt/cuda/targets/x86_64-linux/include/crt/math_functions.hpp)
            argument types are: (half, half)
    template<typename T> __attribute__((host)) __attribute__((device)) inline __attribute__((always_inline)) T max(T a, T b) { return ::max(a, b); }
                                                                                                                                      ^
          detected during:
            instantiation of "T oidn::math::max(T, T) [with T=half]" at line 50 of /mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0/devices/cuda/../gpu/gpu_pool.h
            instantiation of "void oidn::GPUPoolKernel<T, oidn::TensorLayout::hwc>::operator()(const oidn::WorkItem<3> &) const [with T=half]" at line 39 of /mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0/devices/cuda/cuda_engine.h
            instantiation of "void oidn::<unnamed>::basicCUDAKernel(oidn::WorkDim<3>, Kernel) [with Kernel=oidn::GPUPoolKernel<half, oidn::TensorLayout::hwc>]" at line 105 of /mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0/devices/cuda/cuda_engine.h
            instantiation of "void oidn::CUDAEngine::submitKernel(oidn::WorkDim<N>, const Kernel &) [with N=3, Kernel=oidn::GPUPoolKernel<half, oidn::TensorLayout::hwc>]" at line 73 of /mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0/devices/cuda/../gpu/gpu_pool.h
            instantiation of "void oidn::GPUPool<EngineT, SrcDstT, srcDstLayout>::submit() [with EngineT=oidn::CUDAEngine, SrcDstT=half, srcDstLayout=oidn::TensorLayout::hwc]" at line 61 of /mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0/devices/cuda/../gpu/gpu_pool.h
            implicit generation of "oidn::GPUPool<EngineT, SrcDstT, srcDstLayout>::~GPUPool() [with EngineT=oidn::CUDAEngine, SrcDstT=half, srcDstLayout=oidn::TensorLayout::hwc]" at line 61 of /mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0/devices/cuda/../gpu/gpu_pool.h
            instantiation of class "oidn::GPUPool<EngineT, SrcDstT, srcDstLayout> [with EngineT=oidn::CUDAEngine, SrcDstT=half, srcDstLayout=oidn::TensorLayout::hwc]" at line 61 of /mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0/devices/cuda/../gpu/gpu_pool.h
            instantiation of "oidn::GPUPool<EngineT, SrcDstT, srcDstLayout>::GPUPool(EngineT *, const oidn::PoolDesc &) [with EngineT=oidn::CUDAEngine, SrcDstT=half, srcDstLayout=oidn::TensorLayout::hwc]" at line 146 of /mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0/core/ref.h
            instantiation of "oidn::Ref<T> oidn::makeRef<T,Args...>(Args &&...) [with T=oidn::GPUPool<oidn::CUDAEngine, half, oidn::TensorLayout::hwc>, Args=<oidn::CUDAEngine *, const oidn::PoolDesc &>]" at line 46 of /mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0/devices/cuda/cuda_engine.cu

1 error detected in the compilation of "/mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0/devices/cuda/cuda_engine.cu".
Comment 1 Alexey Chernyak 2024-08-01 05:23:22 UTC
The actual error seems to be caused by build trying to pull in both .h and .hpp headers simultaneously:

/mnt/tmpfs/portage/media-libs/oidn-2.3.0/work/oidn-2.3.0/core/math.h(25): error: more than one instance of overloaded function "max" matches the argument list:
            function "max(int, int)" (declared at line 386 of /opt/cuda/targets/x86_64-linux/include/crt/math_functions.h)
            function "max(unsigned int, unsigned int)" (declared at line 997 of /opt/cuda/targets/x86_64-linux/include/crt/math_functions.hpp)