How to build blender with oidn with Nvidia gpu support?

Hello all

I try to build blender with oidn with Nvidia gpu support.

This is my building scripts (gentoo)

Thank you for advice!

These are Gentoo specific builds which not many developers are familiar with or can easily test themselves, so not likely to get a response.

In general to help getting this solved:

  • Check include/OpenImageDenoise/config.h to verify supported device types are enabled
  • Provide build logs for OIDN and Blender
  • Say which exact GPU model you are testing this with

Hi,
Tank you for answer!

oidn package builds with -DOIDN_DEVICE_CUDA=ON and cuda targets sm_86 for 3080

oidn package has /usr/lib64/libOpenImageDenoise_device_cuda.so.2.2.2 and /usr/include/OpenImageDenoise/config.h installed

blender compiled with cuda and optix? and it works fine.

What thing i missed?

  • Check that CUDA is enabled in /usr/include/OpenImageDenoise/config.h
  • Provide build logs for OIDN and Blender
  • Provide output of blender --debug-cycles --verbose 10 trying to render with OIDN GPU support

This is my /usr/include/OpenImageDenoise/config.h
https://bpa.st/AMTQ

I open blender and turn on oidn gpu checkbox

$ blender --debug-cycles --verbose 10
INFO:cg_preferences:Register CG Preferences!
INFO:cg_preferences:Checking preferences ...
INFO:cg_preferences:No new version was found!
I20240604 17:13:43.901419 70594 device.cpp:36] CUEW initialization succeeded
I20240604 17:13:43.902469 70594 device.cpp:42] Found CUDA compiler nvcc
I20240604 17:13:43.919731 70594 denoiser_oidn_gpu.cpp:70] Checking device NVIDIA GeForce RTX 3080 Laptop GPU (CUDA_NVIDIA GeForce RTX 3080 Laptop GPU_0000:01:00) for OIDN GPU support
I20240604 17:13:43.920310 70594 denoiser_oidn_gpu.cpp:120] Found 1 OIDN device(s)
I20240604 17:13:43.920323 70594 denoiser_oidn_gpu.cpp:124] OIDN device 0: name="11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz" type=CPU
I20240604 17:13:43.920329 70594 denoiser_oidn_gpu.cpp:143] No matched OIDN device found

after render log
https://bpa.st/DGEA

Does a build downloaded from blender.org work? It’s seeming less like a build problem, at least I don’t have a good guess for it.

Perhaps OIDN has an issue finding the CUDA shared library on the system. Blender uses dlopen to load it at runtime, while OIDN links against it directly.

You could attach the out of running LD_DEBUG=libs blender and trying to rendering with OIDN GPU. The log might show it can’t find some CUDA library.

1 Like

Thank you!
Looks like we found a problem
I run blender as:
LD_DEBUG=libs blender

and get log woth this errors:

80696:     /usr/lib64/libOpenImageDenoise_device_cuda.so.2.2.2: error: symbol lookup error: undefined symbol: _ZN4oidn23getCutlassConvInstancesILi70EEESt6vectorINS_18CutlassConvFactoryESaIS2_EEv (fatal)
80696:     /usr/lib64/libnvidia-glcore.so.550.78: error: symbol lookup error: undefined symbol: __malloc_hook (fatal)

I think problem is somwhere in my system toolchain

I will report if i found a way!