WIP: rocm-6 changes #113219

Closed
Brian Savery (AMD) wants to merge 3 commits from BrianSavery/blender:rocm-6 into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

Few changes needed for ROCM-6. I've tried to make them all backwards compatible so versions of blender should be compilable with both ROCM 5.X and 6.

  • With ROCm 6.0 the lib path is changing from:

/opt/rocm/hip/lib/ to /opt/rocm/lib. In fact the last few versions of ROCm should have had both lib paths. It would actually be possible but not necessary to change all paths here to the new one.

  • Also, I updated to use .so.6 by default.

  • The HIPMemoryType enum has changed for 6 so that is #if -ed in hipew.h

Marking WIP until we have full QA validation. Once is this we should port this change to older LTS versions to make sure they still work with ROCm 6.0

Few changes needed for ROCM-6. I've tried to make them all backwards compatible so versions of blender should be compilable with both ROCM 5.X and 6. - With ROCm 6.0 the lib path is changing from: /opt/rocm/hip/lib/ to /opt/rocm/lib. In fact the last few versions of ROCm should have had both lib paths. It would actually be possible but not necessary to change all paths here to the new one. - Also, I updated to use .so.6 by default. - The HIPMemoryType enum has changed for 6 so that is #if -ed in hipew.h Marking WIP until we have full QA validation. Once is this we should port this change to older LTS versions to make sure they still work with ROCm 6.0
Brian Savery (AMD) added 1 commit 2023-10-03 21:07:43 +02:00
Brian Savery (AMD) force-pushed rocm-6 from 429972e9eb to fdef534ceb 2023-10-04 20:58:34 +02:00 Compare
Brian Savery (AMD) force-pushed rocm-6 from fdef534ceb to 35cebd6f9e 2023-10-04 21:13:45 +02:00 Compare
Brecht Van Lommel requested changes 2023-10-09 18:19:18 +02:00
Brecht Van Lommel left a comment
Owner

The way this is implemented now, builds will not work with both ROCm 5 and 6?

It will have to switch between the two enum values at runtime instead of compile time, based on the detected ROCm driver version.

The way this is implemented now, builds will not work with both ROCm 5 and 6? It will have to switch between the two enum values at runtime instead of compile time, based on the detected ROCm driver version.
Author
Member

Yes. Let me check on that. Because basically what you're asking is "can we compile with ROCM-6 and have users on ROCM 5.x." I have to confirm that will work at all in the first place.

Yes. Let me check on that. Because basically what you're asking is "can we compile with ROCM-6 and have users on ROCM 5.x." I have to confirm that will work at all in the first place.
Brian Savery (AMD) added 1 commit 2023-10-28 00:10:25 +02:00
Brecht Van Lommel requested changes 2023-10-29 13:00:04 +01:00
@ -189,4 +198,4 @@
hipMemoryTypeHost = 0x00,
hipMemoryTypeDevice = 0x01,
hipMemoryTypeArray = 0x02,
hipMemoryTypeUnified = 0x03,

Unlike the previous version of this (35cebd6f9e), it seems the values are now identical. The only difference is the addition of hipMemoryTypeManaged.

So I don't think we need the #if here, we can just use the ROCm 6 enum.

Unlike the previous version of this (35cebd6f9e057fca084bedea17c0a6d872b6610c), it seems the values are now identical. The only difference is the addition of `hipMemoryTypeManaged`. So I don't think we need the #if here, we can just use the ROCm 6 enum.
@ -238,3 +238,3 @@
/* Default installation path. */
const char *hip_paths[] = {"", NULL};
#else
#elif #if HIP_VERSION_MAJOR >= 6

Remove this double #if.

We may be able to just always try loading the ROCm 6 library though, and not have a HIP_VERSION_MAJOR option. Unless there is a difference in the kernel binaries that would make them incompatible?

Remove this double #if. We may be able to just always try loading the ROCm 6 library though, and not have a `HIP_VERSION_MAJOR` option. Unless there is a difference in the kernel binaries that would make them incompatible?
Brian Savery (AMD) added 1 commit 2023-11-09 19:33:06 +01:00

Pull request closed

Sign in to join this conversation.
No reviewers
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
2 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#113219
No description provided.