RenderKit / oidn

Intel® Open Image Denoise library
https://www.openimagedenoise.org/
Apache License 2.0
1.74k stars 160 forks source link

No supported devices #161

Closed siliconvoodoo closed 9 months ago

siliconvoodoo commented 1 year ago

As of today's git pull (a9928284a8613) on the master branch, this snippet of code:

    auto deviceType = oidn::DeviceType::Default;
    oidn::DeviceRef device = oidn::newDevice(deviceType);
    char const* msg;
    if (device.getError(msg) != oidn::Error::None)
        printf("intel denoise: %s", msg);

results in the error path taken and the message:

intel denoise: no supported devices found

Same effect on the benchmark project for example.

Or the test project which has this sort of output:


oidnTest.exe is a Catch v2.13.6 host application.
Run with -? for options

-------------------------------------------------------------------------------
buffer
-------------------------------------------------------------------------------
C:\work\external\oidn\apps\oidnTest.cpp(98)
...............................................................................

C:\work\external\oidn\apps\oidnTest.cpp(101): FAILED:
  REQUIRE( bool(device) )
with expansion:
  false

-------------------------------------------------------------------------------
single filter
-------------------------------------------------------------------------------
C:\work\external\oidn\apps\oidnTest.cpp(204)
...............................................................................

C:\work\external\oidn\apps\oidnTest.cpp(210): FAILED:
  REQUIRE( bool(device) )
with expansion:
  false

-------------------------------------------------------------------------------
multiple filters
-------------------------------------------------------------------------------
C:\work\external\oidn\apps\oidnTest.cpp(286)
...............................................................................

C:\work\external\oidn\apps\oidnTest.cpp(289): FAILED:
  REQUIRE( bool(device) )
with expansion:
  false

-------------------------------------------------------------------------------
multiple devices
-------------------------------------------------------------------------------
C:\work\external\oidn\apps\oidnTest.cpp(316)
...............................................................................

C:\work\external\oidn\apps\oidnTest.cpp(327): FAILED:
  REQUIRE( devices[i] )
with expansion:
  0

I have: ispc 1.18.0 oneapi-tbb-2021.7.0 Xeon W-2245 cpu

I confirm that doing git checkout --recurse-submodules v1.4.3 and rebuilding results in a working library that behaves like expected.

kraszkow commented 1 year ago

@siliconvoodoo - could you check if you have "libOpenImageDenoise_device_cpu.so*" in the same directory where you have "libOpenImageDenoise.so.2" library?

I can reproduce this issue only after moving "libOpenImageDenoise_device_cpu.so*" to different directory (If I'm not mistaken since 2.0 version there is assumption that all OIDN libraries should be in the same directory).

If above won't help could you attach strace log from app execution (strace ./app &> strace.log) ?

atafra commented 1 year ago

@siliconvoodoo Did you try to run the official binaries? If those work, you probably have some issue with building or running your binaries.

siliconvoodoo commented 1 year ago

Not official binaries, built from source. Thank you for the help you two. From memory, yes I recall I did copy the *device_cpu.dll side by side to the main library, and side by side to my executable. (also the visual studio solution generated by cmake normally provides directly launchable test projects anyways, that setup is probably not dependent on human manipulation error). Now I switched my repository to 1.4 so reswitching to 2.0 takes time and is not on the menu for now, please put a pin on this report until somebody else runs into something similar because I can't help you further as my my current busy situation :(

tatsy commented 1 year ago

Hi, I have come across the similar situation with v2.0.0. My (colleague's) CPU is i9-13900K, which does not support AVX-512, and when we ran the command "oidnBenchmark -d cpu -v 1" after building the executable from the source using MSVC 2022, the program complains "no supported devices found". In the same environment, the official binary downloaded from GitHub releases has successfully work. So, maybe the building process is a problem. For reference, I have also tested another CPU, i9-9980XE, which supports AVX-512, the program built by ourselves worked.

We have also tested building the binary for CUDA, but again it complains that there are no supported devices found (the graphics card is RTX 2080Ti). While we compiled the binary using CMake but is there any required flag to make it work in a specific environment (e.g., on the computer with a CPU supporting only SSE 4.x instruction set)?

atafra commented 1 year ago

Hi. I think the issue is the same as in the previous case: the library is probably not deployed correctly.

tatsy commented 1 year ago

@atafra Thank you very much for your kind advice. As you mentioned, the problem was the location of DLLs. After adding a path for TBB DLLs to the Windows environment PATH, I could get the program working.

I am sorry for my carelessness, and thank you again for your prompt response!

kruunua commented 10 months ago

Hi, I have an issue with CUDA. Everything works fine on CPU, but launched with the device set to CUDA, returns with "unsupported device type: CUDA". Tried with both precompiled executable and compiled from sources. I have NVIDIA GTX 1060 with the latest driver installed (536.99), and CUDA 11.8. BTW, not actually sure that Pascal architecture is supported by oind.

atafra commented 9 months ago

OIDN doesn't support the Pascal architecture. The supported architectures are listed in the documentation.