Cycles: Enable HIP devices for OpenImageDenoise #115854

Merged
Stefan Werner merged 6 commits from Stefan_Werner/blender:oidn_hip into main 2023-12-13 21:38:30 +01:00
Member

This enables the HIP backend of OpenImageDenoise on supported devices.

This enables the HIP backend of OpenImageDenoise on supported devices.
Stefan Werner added 3 commits 2023-12-06 17:07:12 +01:00
Stefan Werner requested review from Brecht Van Lommel 2023-12-06 17:07:47 +01:00
Stefan Werner requested review from Sergey Sharybin 2023-12-06 17:07:48 +01:00
Brecht Van Lommel requested changes 2023-12-06 18:49:35 +01:00
@ -41,0 +44,4 @@
case DEVICE_HIP: {
/* Test if OIDN can use the given HIP device. */
hipStream_t stream = nullptr;
OIDNDevice test_device = oidnNewHIPDevice(&device.num, &stream, 1);

Can we avoid creating a HIP device on Blender startup, from device_hip_info?

To avoid the overhead, but also especially to avoid potentially crashing Blender as a whole when there is an issue in either OIDN or the HIP driver.

Can we avoid creating a HIP device on Blender startup, from `device_hip_info`? To avoid the overhead, but also especially to avoid potentially crashing Blender as a whole when there is an issue in either OIDN or the HIP driver.
Author
Member

I changed it to compare PCI IDs between the devices that Cycles detects and the supported devices that OIDN found in the system.

I changed it to compare PCI IDs between the devices that Cycles detects and the supported devices that OIDN found in the system.
brecht marked this conversation as resolved
Author
Member

The only way I can think if would be to check against the same whitelist that OIDN is using internally. This list would need to be updated for every version update of OIDN.

The only way I can think if would be to check against the same whitelist that OIDN is using internally. This list would need to be updated for every version update of OIDN.
Stefan Werner added 1 commit 2023-12-07 14:37:30 +01:00

Would it be possible to add an API function to OIDN to check against this whitelist, and if necessary duplicate it until there is a release with that functionality?

Would it be possible to add an API function to OIDN to check against this whitelist, and if necessary duplicate it until there is a release with that functionality?

Ah ok, didn't see this. Let me know if there's any help I can provide.

Ah ok, didn't see this. Let me know if there's any help I can provide.
Author
Member

If you could give it a try and let us know if it works for you, that would already be of help.

If you could give it a try and let us know if it works for you, that would already be of help.
Stefan Werner added 1 commit 2023-12-12 15:18:40 +01:00
Stefan Werner added 1 commit 2023-12-12 18:37:33 +01:00
Author
Member

Note: I added the PCI ID check for SYCL, HIP and CUDA devices, since the check can be used for all of them.

Note: I added the PCI ID check for SYCL, HIP and CUDA devices, since the check can be used for all of them.
Brecht Van Lommel approved these changes 2023-12-13 13:15:00 +01:00
Stefan Werner merged commit fd8bb41224 into main 2023-12-13 21:38:30 +01:00
Stefan Werner deleted branch oidn_hip 2023-12-13 21:38:32 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#115854
No description provided.