WIP: Linux Support for HIP-RT #121050
No reviewers
Labels
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#121050
Loading…
Reference in New Issue
No description provided.
Delete Branch "salipour/AMD_HIPRT:HIPRT_OPEN_SOURCE"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
HIP-RT was originally closed source and that created issue with distribution of HIP-RT runtime and kernel binaries. The changes add support for Linux but more importantly HIP-RT kernel binaries are generated during the build process, simplifying the distribution process, and unifying the compiler across all the components (BVH builder, traversal library and Cycles kernels).
In the current change list, the assumptions is that HIP-RT SDK is available under third party lib folder, and the folder structure is
top folder lib/hiprt
include files: hiprt/hiprt
dynamic library: hiprt/bin
dependency (headers only): hiprt/orochi
info_cfg_option(WITH_CYCLES_DEVICE_HIPRT)
insideCmakeLists.txt
should be inside theif (NOT APPLE)
check above it.Generally we try to make things work with old and new versions of a library, to make coordination of landing updates easier. But in this case it looks not so simple, and not worth doing.
So I think when the time comes to land this, we either disable
WITH_CYCLES_DEVICE_HIPRT
for a little bit, or coordinate with @LazyDodo to land precompiled libraries at the same time.I wasn't able to actually test the
make deps
integration because the version doesn't seem to exist. But some comments from reading through the changes.@ -699,3 +697,1 @@
option(WITH_CYCLES_DEVICE_HIPRT "Enable Cycles AMD HIPRT support" OFF)
mark_as_advanced(WITH_CYCLES_DEVICE_HIPRT)
endif()
option(WITH_CYCLES_DEVICE_HIPRT "Enable Cycles AMD HIPRT support" ON)
This should still default to OFF.
It's
build_files/cmake/config/blender_release.cmake
that enables it by default for releases. Though we should still not enable it for Linux there, until after the precompiled libraries for that platform have landed.@ -0,0 +8,4 @@
set(HIPRT_CMAKE_FLAGS ${DEFAULT_CMAKE_FLAGS})
set(HIPRT_EXTRA_ARGS
--DHIPRT_EXPORTS=ON
Should be
-D
instead of--D
?@ -0,0 +39,4 @@
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
For Linux, there will need to be additions in
build_files/build_environment/cmake/harvest.cmake
to install things.I guess something like this, not sure if we want to just install all files or only a subset.
@ -0,0 +54,4 @@
ExternalProject_Add_Step(external_hiprt after_install
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/hiprt/dist/bin/Release/hiprt64.dll
${HARVEST_TARGET}/hiprt/bin/hiprt64.dll
I think
hiprt64_d.dll
should be used here.@ -856,2 +856,4 @@
set(PYBIND11_HASH_TYPE MD5)
set(PYBIND11_FILE pybind-v${PYBIND11_VERSION}.tar.gz)
set(HIPRT_VERSION 2.3.7df94af)
This version doesn't seem to exist?
https://github.com/GPUOpen-LibrariesAndSDKs/HIPRTSDK/releases
Not sure if we need to wait for it to be released, or if another version should be used.
URI is wrong, it's over at https://github.com/GPUOpen-LibrariesAndSDKs/HIPRT/releases/tag/2.3.7df94af
Ah ok, so it's:
probably? I haven't gotten around to building this yet i'll try to schedule some time for this over the weekend.
Ok, thanks. For reference, this PR is heavily WIP and will need many more changes to get it to actually build.
I asked to just add the code so we get an idea of how things should fit together, what the build options should be, etc. But not to actually test if it works, since it's not so easy to build the libs on Windows.
@ -51,0 +44,4 @@
if(WIN32)
set(HIPRT_DYNAMIC_LIB hiprt${HIPRT_VERSION}64.dll)
else()
set(HIPRT_DYNAMIC_LIB hiprt${HIPRT_VERSION}64.so)
Is
${HIPRT_VERSION}
supposed to be in the name? It's not inhiprt.cmake
.I updated the name in hiprt.cmake file.
@ -53,0 +57,4 @@
)
if(HIPRT_LIB_DIR)
set(HIPRT_DYNAMIC_LIB_PATH
This seems to be unused currently. I guess the idea is still to dynamically load the hiprt library rather than Blender linking to it? If so I guess this variable can be removed.
To install the shared libraries along with Blender, this will need to be added in
build_files/cmake/platform/platform_unix.cmake
, which will copy all.so
files into the bundled lib directory.For Windows this is done in
source/creator/CMakeLists.txt
, something like:Unless there are separate release and debug libraries, in which case:
The main intention was to check if the dynamic library for hiprt exists before enabling it.
@ -732,0 +797,4 @@
COMMAND ${hiprt_compile_command} ${hiprt_compile_flags_sdk_bc}
DEPENDS ${HIPRT_INCLUDE_DIR}/hiprt/impl/hiprt_kernels_bitcode.h)
Nitpick: use 1 instead of 2 empty lines.
@ -1 +1 @@
Subproject commit a5521c85e03bfd1556ff1e63bf7163235c401497
Subproject commit 19b2b87f5ef0d8caa39e0882fbf832052974b785
This change to the submodule hash should be left out.
Happened accidentally. How can I roll it back?
Like this:
Checkout
From your project repository, check out a new branch and test the changes.