You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
oidnNewDevice(OIDN_DEVICE_TYPE_METAL) returns NULL on an iPad #266
I was able to generate oidn dylibs (..., ..._core and ..._device_metal) for the iOS/Metal profile (disabling the iOS/CPU one, as I don't understand how to set dependencies to TBB for iOS).
I then packaged the dylibs into frameworks (after setting their paths with install_name_tool) and included them in my iOS project.
Compilation (Xcode) and execution (on an iPad device) were successful, except that oidnNewDevice returns NULL (both with OIDN_DEVICE_TYPE_DEFAULT and OIDN_DEVICE_TYPE_METAL).
changed the title [-]oidnNewDevice(OIDN_DEVICE_TYPE_METAL) return NULL on an iPad[/-][+]oidnNewDevice(OIDN_DEVICE_TYPE_METAL) returns NULL on an iPad[/+]on Jun 3, 2025
Considering you have disabled the CPU backend and the only applicable GPU backend is not available as well, the device is null. I think i might have an idea why your Metal backend doesn't work, as I have fixed the issue locally.
OIDN's CMake doesn't define a dependency of the core library, on the plugins (Metal, CUDA, etc.), so you can probably notice that your framework doesn't have the necessary libOpenImageDenoise_device_metal.dylib.
You could try copying that manually and see if it works, then make your project account for that during install.
OIDN's CMake doesn't define a dependency of the core library, on the plugins (Metal, CUDA, etc.), so you can probably notice that your framework doesn't have the necessary libOpenImageDenoise_device_metal.dylib.
Do you mean inside the main framework ?
In my specific case, I generated 3 frameworks : one for each dylib (one for libOpenImageDenoise.dylib, one for libOpenImageDenoise_core.dylib and one for libOpenImageDenoise_device_metal.dylib). Indeed, each one only encapsulates its own dylib, without any of the other 2.
You could try copying that manually and see if it works, then make your project account for that during install.
Activity
[-]oidnNewDevice(OIDN_DEVICE_TYPE_METAL) return NULL on an iPad[/-][+]oidnNewDevice(OIDN_DEVICE_TYPE_METAL) returns NULL on an iPad[/+]gracien-app commentedon Jun 13, 2025
Considering you have disabled the CPU backend and the only applicable GPU backend is not available as well, the device is null. I think i might have an idea why your Metal backend doesn't work, as I have fixed the issue locally.
OIDN's CMake doesn't define a dependency of the core library, on the plugins (Metal, CUDA, etc.), so you can probably notice that your framework doesn't have the necessary
libOpenImageDenoise_device_metal.dylib.You could try copying that manually and see if it works, then make your project account for that during install.
iPerKard commentedon Jun 14, 2025
Do you mean inside the main framework ?
In my specific case, I generated 3 frameworks : one for each dylib (one for libOpenImageDenoise.dylib, one for libOpenImageDenoise_core.dylib and one for libOpenImageDenoise_device_metal.dylib). Indeed, each one only encapsulates its own dylib, without any of the other 2.
Thanks Gracien, I'll give it a try.