Cycles HIP device #91571
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
73 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#91571
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
Tasks to keep track of HIP device development tasks.
c2f93e0f68
)hipGetDeviceProperties
c2f93e0f68
)On hold
Deduplicate CUDA and HIP host code(No practical mechanism for this currently)Graphics interop(Wait until overall HIP stability improves before risking this)Completed for 3.0 release:
Changed status from 'Needs Triage' to: 'Confirmed'
Added subscriber: @brecht
Added subscriber: @Raimund58
Added subscriber: @SteffenD
Added subscriber: @BrianSavery
Added subscriber: @GeorgiaPacific
Added subscriber: @Alaska
Added subscriber: @Stat_Headcrabed
So AMD GPU cannot use blender on windows even after HIP support is implemented?
@Stat_Headcrabed Even with HIP implemented it would currently not work because the GPU driver to support it is not released yet.
At the moment it seems like the HIP implementation works on Linux with the right setup. There appear to be plans to add Windows support via the release of tools and a new GPU driver in the coming months. The current time line suggest that Windows support should be avaliable before the relase of Blender 3.0, but it is not garunteed that the HIP implementation will be added to/or enabled in Blender with the 3.0 release.
Notes about it can be found in the
Render Meeting Notes
: https://devtalk.blender.org/c/blender/meetings-archive/18This issue was referenced by blender/cycles@fedbb9c898
This issue was referenced by
044a77352f
Added subscriber: @AndyCuccaro
Added subscriber: @julian8bruns
Added subscriber: @2046411367
Added subscriber: @easythrees
@BrianSavery , I'm trying to set this up on the buildbot but running into some issues. I did various improvements and fixes in
55b8fc7
, but still running into problems.CYCLES_HIP_BINARIES_ARCH
support to be set to?Added subscriber: @fire
Added subscriber: @pauanyu_blender
Added subscriber: @Sayak-Biswas
Added subscriber: @2905710881
amd yes
Added subscriber: @LahceneB
Added subscriber: @IyadAhmed
Added subscriber: @AndreaMonzini
As GNU/Linux user i think it would be important to help ( and ideally support ) the ROCm/HIP installation on other distros like for example Arch, GUIX Sytem, NixOS.
Or with Cycles HIP we will have less freedom on the OS we can use compared to the Cycles on OpenCL.
Anyway thank you for your work !
Added subscriber: @FreeCX
Added subscriber: @pikhosh
Added subscriber: @Chou-Vieux
Added subscriber: @Diogo_Valadares
Added subscriber: @s12a
Added subscriber: @Low_Polygon42
Thank you for all your hard work. This will add more options as to the choices creators have when it comes to gpu's. Again, thank you.
Added subscriber: @leesonw
Added subscriber: @FogLizard
I have installed full rocm on Arch Linux and enabled HIP in CMakeLists.txt by overriding the options in the blender-git PKGBUILD, I do have HIP option under system preferences and my GPU and CPU shows up there.
However if I try to render with Cycles and GPU Compute, render fails with the following error:
Invalid value in hipDeviceGetAttribute(&pitch_alignment, hipDeviceAttributeTexturePitchAlignment, hipDevice)) (intern/cycles/device/hip/device_impl.cpp:116)
I have a Vega 64 and I've checked with rocminfo that it's arch is gfx900, which is missing in CMakeLists.txt:
set(CYCLES_HIP_BINARIES_ARCH gfx1010 gfx1011 gfx1012 gfx1030 gfx1031 gfx1032 gfx1034 CACHE STRING "AMD HIP architectures to build binaries for")
I have tried overriding this option in PKGBUILD file and recompiling, but apparently it didn't work.
cmake -G Ninja -S "$srcdir/blender" -B build
- C "${srcdir}/blender/build_files/cmake/config/blender_release.cmake"
- DCMAKE_INSTALL_PREFIX=/usr
- DCMAKE_BUILD_TYPE=Release
- DWITH_INSTALL_PORTABLE=OFF
- DWITH_SYSTEM_GLEW=OFF
- DWITH_PYTHON_INSTALL=OFF
- DWITH_CYCLES_DEVICE_HIP=ON
- DWITH_CYCLES_HIP_BINARIES=ON
- DCYCLES_HIP_BINARIES_ARCH=gfx900
- DXR_OPENXR_SDK_ROOT_DIR=/usr
- DPYTHON_VERSION="${_pyver}" \
Please add Vega 64 arch gfx900 support, as it supports HIP, or let me know how to do it manually.
Official instructions on how to setup HIP in Cycles will be avalibale in the future. Once the instructions are released, it should be better.
As a side note, I'm not familiar with with the build method you're using, but I would suggest using the official build instructions listed on the Blender website: https://wiki.blender.org/wiki/Building_Blender
And once you've got Blender compiled and working, navigate to
~/blender-git/build-linux/
and modify the fileCMakeCache.txt
with an application likecmake-gui
to enable HIP and add your desired architectures then rebuild Blender again. I would personally recommend adding more architectures than just your GPU just in case you've got the wrong number. Here is a list of GPU architectures that Brecht said compiles, but he hasn't tested all of them yet:You might also need to change some code in
intern/cycles/device/hip/util.h
for everything to work properly. You can see an example in this commit on what sort of changes should be done: 2f89ddc043It might actually be easier to test with the
cycles-hip-binaries
branch of Blender. This can be done by usinggit checkout cycles-hip-binaries
in the Blender source code directory to checkout that branch then to compile a clean build of Blender from that.On a side note. There is a version of Blender avaliable for download with the HIP binaries pre-compiled. It should recognize a wide range of GPUs, but I have no idea if it's functional, you will probably experience some bugs, and this version of Blender will quickly become outdated so we do NOT accept bug reports for it: https://builder-uatest.blender.org/download/experimental/cycles-hip-binaries/
It should also be noted that at the current point in time Vega 64 isn't "officially" supported. It may work, but with the currently avaliable official Blender code Vega 64 isn't on the list of supported GPUs. It's also possible you may experience bugs due to the HIP implementation still being under development.
We're not ready to have this tested by users, we don't know yet which architectures will work and may need to work through some bugs. When it's ready there will be build instructions.
@FogLizard In general for help building Blender, please use devtalk.blender.org. This task should stay on the topic of development, not support.
@Alaska, please don't recommend users to try that build, it's really not at a stage we want to deal with feedback from that.
Added subscriber: @MikePan
Added subscriber: @Pliou
Added subscriber: @Prodeous
Added subscriber: @SomeAB
Good to see the progress on HIP. Haven't been using 3.0 Alpha/Beta because of lack of this. Can we expect support for Vega64, 56 generation of cards before official 3.0 release?
What kind of performance numbers can be expected compared to before? OpenCL as far as I remember, was way behind even CUDA.. which is superseded by Optix on roughly equivalent hardware. As I have worked with HIP in machine learning before, I'm not very optimistic sadly.
For questions and feedback, there is this topic now:
https://devtalk.blender.org/t/cycles-amd-hip-device-feedback/21400/16
I'll answer the question there, as this task is for coordinating development.
Removed subscriber: @fire
Added subscriber: @brunnerh
If it is to resize automatically, there probably should be a warning mentioning the affected texture so it does not silently degrade the expected quality. Maybe there could be an option for it as well. E.g. In the context of a render farm it might be better to cancel with an error than render something of lesser quality the user did not want.
Added subscriber: @ephraimpauli
Added subscriber: @Zeenus
Added subscriber: @AlfredENeuman
Added subscriber: @dmlr7
Added subscriber: @Alirion-2
Cant wait when this runs on Polaris. Hopefully stable rendering again. Still stuck on 2.8 for Stability.
Added subscriber: @itf
Added subscriber: @Th3ho0d
can you share the list of the devices you working on enabling HIP for right now ? or a timeline for future devices to work on ?
RDNA and RDNA2 GPUs in linux for Blender 3.1
Other than that the only info we can give is that we plan to work backwards enabling older GPUs.
Added subscriber: @LouisLithium
Added subscriber: @hahnzhu
Added subscriber: @Caden-Mitchell
Added subscriber: @Luciddream
Added subscriber: @iain.hogg
Are you able to confirm how far backwords you are planning to work - Im running an AMD fireproW8100 - would it be likley that this would be included goinf fwd?
Note: From my interprestaion of things, ROCm is required to run HIP on Linux.
This is just my interpretation of things and I may be getting it wrong. According to some documentation for ROCm on Linux, ROCm officially supports graphics cards going back to Vega (56 and 64). ROCm is enabled, but is not officially support on graphics cards going back to the "Hawaii" chips such as AMD Radeon R9 390X and FirePro W9100.
Assuming this trend carries over to the HIP implementation in Blender, then it is unlikely your GPU (AMD fireproW8100) will be supported. But this is all just specualtion ffrom me and I may be wrong.
Cannot GPU compute in Blender 3 alpha in Linux. I have ROCm and HIP installed. I can compute render in 2.93 but my device doesn’t even show up in Blender 3. Radeon RX5700 XT.
HIP support in Linux is still being worked up. New drivers and/or a new HIP compiler is needed for it to work properly.
Added subscriber: @Hannah-Umit
Added subscriber: @not_a_boring_name
Added subscriber: @Maxzor
Added subscriber: @Jonas-Hagberth
This comment was removed by @Jonas-Hagberth
Added subscriber: @Baardaap
Added subscriber: @dvi
when is Hardware ray-tracing coming?
Regarding Linux support:
Our driver release timeline unfortunately doesn't quite line up with the dates for Blender 3.1, and there are some fixes in there that are needed. It should be out sometime after bcon3 and before bcon4, but I'm proposing Linux support gets pushed to Blender 3.2 so there is time for testing. Linux users should be able to use it under 3.2 in march though.
Ok, we can push it to 3.2 then. There will be a 3.2 daily build starting next week, so as soon as there is something working it can be available to users for testing.
Is there a branch for 3.2 or is code going to master for now? I have some changes to hipew, I'd like to push
There will be a branch next week. But code can go into master still.
Removed subscriber: @AlfredENeuman
Added subscriber: @Garek
Added subscriber: @Maxzor-1
Added subscriber: @ThomasDinges
@ThomasDinges Hello, what about dedicating some time in your next weekly interaction meeting to talk about it? My interest is to get technical on HIP support, I have been helping packaging ROCm for Debian/Ubuntu and this is practically finished.
Removed subscriber: @IyadAhmed
Could we get a legacy OpenCL pipeline option back for Linux only (or even HIP unsupported AMD cards)? I don't know if the new Cycles code is compatible with OpenCL, but I am not satisfied with the state of Blender 3.x on my AMD system currently.
Added subscriber: @CadenMitchell-3
@CadenMitchell-3 I 100% Agree with this part. OpenCL is a different story as it's very much broken but I doubt that the amount of Linux users using HIP compatible devices is as big as the current GCN userbase.
This comment was removed by @2905710881
The underlying layer of hip is rocm, the old gcn graphics card has long supported rocm, rdna graphics card support time almost and cyclesx hip is synchronized support, so gcn support hip is only a matter of time.
Please keep this task on topic! This task is for developers and should focus on code discussion. Please refrain from further user questions, including asking for a build, asking for a merge ETA, examples, comparison with other software and so on... Thank you for your understanding.
Every further off-topic comment will be removed.
Added subscriber: @Obsyden
The crash on Linux is caused by the hipDeviceGetAttribute function, which will always segfault for some mysterious reason. Fortunately, this can be replaced with hipGetDeviceProperties for the exact same information that the former fetches.
Having the above function not crashing is rather trivial, what matters is the graphics/compute interop being implemented - and between which APIs - underneath or not?
If just using hipGetDeviceProperties works that would be great, but from what I understand there are further issues.
Graphics interop is not that important, it improves viewport performance but everything still works without it.
Added subscriber: @Takuro-Shoji
Added subscriber: @mkaito
Added subscriber: @BlenderUser700
This comment was removed by @BlenderUser700
I just made a diff to fix the Linux crash due to hipDeviceGetAttribute, but there are still other crashes due to causes unknown to me. Keep in mind it's my first patch on this repo: https://developer.blender.org/D14198
After some testing I've found that cycles HIP instantly crashes when using image textures of any kind. The error thrown is
I'm running Ubuntu 20.04 LTS with a Radeon RX 6600 XT.
The only steps to reproduce this are going into any material e.g. environment or materials tab and selecting some form of image texture like environment texture or image texture. This instantly crashes Blender with the above error
Added subscriber: @Yuro
Added subscriber: @george-4
Added subscriber: @Noah-Prezant
This issue was referenced by
179100c021
Added subscriber: @Kosmita
Added subscriber: @DavidG-1
Added subscriber: @niobium93
I'm running Arch Linux with ROCm 5.1.1 installed with a Radeon RX 5700 XT and am getting the same crash whenever any image texture exists in the scene. Complex scenes render fine only as long as all image textures are removed.
blender.crash.txt
Added subscriber: @Darkhan-K
I upgraded to ROCm 5.1.3 and blender 3.3.r115176.gffa262c9f8c and now the HIP kernel fails to compile. blender hip compile fail.log
@niobium93 , please make a separate bug report for your issues rather than commenting them on this task.
Removed subscriber: @Low_Polygon42
Removed subscriber: @Hannah-Umit
Added subscriber: @CosmoHQ
Added subscriber: @Pavel_Patzelt
Removed subscriber: @FreeCX
Added subscriber: @Neil-McNair
This issue was referenced by
abfa09752f
Removed subscriber: @Baardaap
Added subscriber: @finalflasher
Added subscriber: @PoramaRuengrairatanaroj
Added subscriber: @Jonathan-61
Who actually tested and checked the box for "RDNA2" under "Linux support and stability"?
At least the viewport does not work properly on HIP+Cycles as reported here:
https://developer.blender.org/T100353
and here:
https://gitlab.freedesktop.org/drm/amd/-/issues/2145
This task is not used to track bugs, it's only for the initial development of features where RDNA2 was confirmed to work. Bugs discovered afterwards or with specific distribution/driver combinations like the one you mentioned are handled in their own task..
Added subscriber: @L-S
Apologies for responding in the incorrect task. This may be wishful thinking but it appears you to have gone out of your way to mention "specific distribution/driver combinations" in your response. By any chance are you are aware of a combination Blender and HIP that does not produce the fault in #100353. If so please let us know so we can report it to the drm/amd issue, it could be pivotal in finding a resolution. Thanks!
Added subscriber: @HowardBlandy
Added subscriber: @Cosmocrat
Using HIP SDK 5.5 to compile HIP kernels, and early 2024 GPU drivers on a RX 7800XT on Windows, it seems this issue has been fixed (assuming you modify the relevant code to use the clip mode).
I don't know when this was fixed, whether or not it was a ROCm and/or driver fix, or how to write the relevant code to detect different ROCm/driver versions in
device_impl
to switch between the working case, and the "fallback" case. So can someone else with the relevant knowledge handle this code change? CC @brecht or @salipourThanks for testing that. I'm not sure how to find out in which driver release this get fixed, @salipour, do you know? Besides installing old drivers until it breaks.
I don't know the exact driver version but the issue has been fixed for a long time now
https://github.com/ROCm/HIP/pull/2229
Ok, let's just enable it everywhere then without a check.
@Alaska feel free to make a PR, if not I can do it.
On a RX 7800XT with early 2024 drivers on Windows with the relevant code changes (Pull request: #118562), OpenGL interop appears to be working. I see none of the issues reported in #92972
Similar to the HIP Clip issue. I'm not sure when this was fixed, but it seems like it was probably over a year ago considering that AMD has OpenGL interop examples with Windows support dating back to December 2022. And I would presume AMD verify this example worked before publishing it.
Edit: Testing points to Linux being extremely unstable with graphics interop.