Cycles HIP device missing driver version check #93109

Closed
opened 2021-11-16 00:51:21 +01:00 by brunnerh · 35 comments

System Information
Operating system: Windows-10-10.0.19042-SP0 64 Bits
Graphics card: AMD Radeon RX 5700 XT ATI Technologies Inc. 4.5.14742 Core Profile Context 21.8.2 27.20.22025.1006

Blender Version
Broken: version: 3.1.0 Alpha, branch: master, commit date: 2021-11-14 00:26, hash: 7e82c840b7
Worked: Unknown

Short description of error
When using the new HIP GPU rendering with cycles I currently get this error (using the graphics card listed above):

Invalid value in hipDeviceGetAttribute(&pitch_alignment, hipDeviceAttributeTexturePitchAlignment, hipDevice) (C:\Users\blender\git\blender-vdev\blender.git\intern\cycles\device\hip\device_impl.cpp:115)

Exact steps for others to reproduce the error
Just tried to render the default cube, setting engine to Cycles and device to GPU Compute.

Logs:
blender_debug_output.txt
blender_system_info.txt

**System Information** Operating system: Windows-10-10.0.19042-SP0 64 Bits Graphics card: AMD Radeon RX 5700 XT ATI Technologies Inc. 4.5.14742 Core Profile Context 21.8.2 27.20.22025.1006 **Blender Version** Broken: version: 3.1.0 Alpha, branch: master, commit date: 2021-11-14 00:26, hash: `7e82c840b7` Worked: Unknown **Short description of error** When using the new HIP GPU rendering with cycles I currently get this error (using the graphics card listed above): > Invalid value in hipDeviceGetAttribute(&pitch_alignment, hipDeviceAttributeTexturePitchAlignment, hipDevice) (C:\Users\blender\git\blender-vdev\blender.git\intern\cycles\device\hip\device_impl.cpp:115) **Exact steps for others to reproduce the error** Just tried to render the default cube, setting engine to `Cycles` and device to `GPU Compute`. Logs: [blender_debug_output.txt](https://archive.blender.org/developer/F11811664/blender_debug_output.txt) [blender_system_info.txt](https://archive.blender.org/developer/F11811665/blender_system_info.txt)
Author

Added subscriber: @brunnerh

Added subscriber: @brunnerh

Added subscriber: @deadpin

Added subscriber: @deadpin

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

Are you using the very latest AMD driver - it seems your driver version is a little older? https://www.amd.com/en/support/kb/release-notes/rn-rad-win-21-40-beta-blender-3-0

Are you using the very latest AMD driver - it seems your driver version is a little older? https://www.amd.com/en/support/kb/release-notes/rn-rad-win-21-40-beta-blender-3-0

Added subscribers: @leesonw, @BrianSavery, @brecht

Added subscribers: @leesonw, @BrianSavery, @brecht

I thought that older AMD drivers don't even have the HIP library, so there would be no need to check the driver version, since there exists no older HIP driver.

However I think 21.8.2 is an Adrenalin driver from August so I'm not sure what is going on. Maybe we do need that driver version check?

CC @BrianSavery @leesonw.

I thought that older AMD drivers don't even have the HIP library, so there would be no need to check the driver version, since there exists no older HIP driver. However I think 21.8.2 is an Adrenalin driver from August so I'm not sure what is going on. Maybe we do need that driver version check? CC @BrianSavery @leesonw.

Yes I think we do need to check unfortunately.

Yes I think we do need to check unfortunately.

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'

Ok, I'll consider this a confirm to be fixed for 3.0 then.

It should be pretty simple to add a check using hipDriverGetVersion I guess.

Ok, I'll consider this a confirm to be fixed for 3.0 then. It should be pretty simple to add a check using `hipDriverGetVersion` I guess.
Brian Savery (AMD) self-assigned this 2021-11-16 19:27:20 +01:00

I'll make that fix right now.

I'll make that fix right now.
Author

In #93109#1254095, @deadpin wrote:
Are you using the very latest AMD driver - it seems your driver version is a little older? https://www.amd.com/en/support/kb/release-notes/rn-rad-win-21-40-beta-blender-3-0

I did an automatic driver update to v21.10.2 (as my card is not listed as supported for the drivers you linked) and rendering the default cube and some other scenes worked.

However, one of my complex scenes lead to this error:

Invalid value in hipTexObjectCreate(&cmem->texobject, &resDesc, &texDesc, 0) (C:\Users\blender\git\blender-vdev\blender.git\intern\cycles\device\hip\device_impl.cpp:1100)

I then tried installing the linked beta driver, but the error remained.

Should I try to track down what element is causing the error or is my GPU simply not really supported?

blender_system_info.txt
blender_debug_output.txt

> In #93109#1254095, @deadpin wrote: > Are you using the very latest AMD driver - it seems your driver version is a little older? https://www.amd.com/en/support/kb/release-notes/rn-rad-win-21-40-beta-blender-3-0 I did an automatic driver update to v21.10.2 (as my card is not listed as supported for the drivers you linked) and rendering the default cube and some other scenes worked. However, one of my complex scenes lead to this error: > Invalid value in hipTexObjectCreate(&cmem->texobject, &resDesc, &texDesc, 0) (C:\Users\blender\git\blender-vdev\blender.git\intern\cycles\device\hip\device_impl.cpp:1100) I then tried installing the linked beta driver, but the error remained. Should I try to track down what element is causing the error or is my GPU simply not really supported? [blender_system_info.txt](https://archive.blender.org/developer/F11816019/blender_system_info.txt) [blender_debug_output.txt](https://archive.blender.org/developer/F11816018/blender_debug_output.txt)
Author

I was curious and tried to find the source, it looks like the issue is a little texture I made that has the dimensions 32,768 px x 864 px

book.blend

I was curious and tried to find the source, it looks like the issue is a little texture I made that has the dimensions 32,768 px x 864 px [book.blend](https://archive.blender.org/developer/F11816077/book.blend)

Perhaps that exceeds current hardware capability. Per your system info file:

hipDeviceAttributeMaxTexture1DWidth			16384
hipDeviceAttributeMaxTexture2DWidth			16384
hipDeviceAttributeMaxTexture2DHeight			16384
Perhaps that exceeds current hardware capability. Per your system info file: ``` hipDeviceAttributeMaxTexture1DWidth 16384 hipDeviceAttributeMaxTexture2DWidth 16384 hipDeviceAttributeMaxTexture2DHeight 16384 ```

With OpenCL we did our own texture filtering, with CUDA and HIP we use the textures and so are also limited by them.

With CUDA on a RTX A6000 I see this:

    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH     131072
    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH     131072
    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT      65536

I'm not sure if 16384 is an AMD hardware limitaton or if HIP is being too conservative?

With OpenCL we did our own texture filtering, with CUDA and HIP we use the textures and so are also limited by them. With CUDA on a RTX A6000 I see this: ``` CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH 131072 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH 131072 CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT 65536 ``` I'm not sure if 16384 is an AMD hardware limitaton or if HIP is being too conservative?

Actually, it turns out hipDriverGetVersion does not give the info we need. we'd have to do something here like looking up the driver version in the registry.

Actually, it turns out `hipDriverGetVersion` does not give the info we need. we'd have to do something here like looking up the driver version in the registry.
Author

Incidentally 16384 is exactly half the size of the texture, so I tried scaling by 0.5 but it still error'd.
(Could there be an off-by-one error here that rejects the texture even though it should work in my case?).

After scaling by 0.5 again to 8192 x 216 it started working.

Incidentally 16384 is exactly half the size of the texture, so I tried scaling by 0.5 but it still error'd. (Could there be an off-by-one error here that rejects the texture even though it should work in my case?). After scaling by 0.5 again to 8192 x 216 it started working.
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker
Member

Max texture size should not be seen as an exact number. It depends on type of texture and other attributes. If I recall correctly most textured allocations work from 12k and lower.

Max texture size should not be seen as an exact number. It depends on type of texture and other attributes. If I recall correctly most textured allocations work from 12k and lower.

I added the texture size issue to #91571. We should at a minimum give an error to the user, but could also resize since we already have code for that.

I added the texture size issue to #91571. We should at a minimum give an error to the user, but could also resize since we already have code for that.
Brecht Van Lommel changed title from Invalid value error for HIP device rendering to Cycles HIP device missing driver version check 2021-11-17 16:46:45 +01:00

Added subscriber: @ThomasDinges

Added subscriber: @ThomasDinges
@BrianSavery Would `hipRuntimeGetVersion `give relevant info? https://rocm-developer-tools.github.io/HIP/group__Driver.html#gae8b7ba34d2e11e334650aa51a4dd87ee

Added subscriber: @Sayak-Biswas

Added subscriber: @Sayak-Biswas

@BrianSavery, @Sayak-Biswas, is there any update on this from your side? We really like to have all high priority bugs fixed at least a week before the release, which means by next Wednesday.

We could probably figure out an appropriate driver check ourselves, but would like to know as soon as possible then if this is something we should work on.

@BrianSavery, @Sayak-Biswas, is there any update on this from your side? We really like to have all high priority bugs fixed at least a week before the release, which means by next Wednesday. We could probably figure out an appropriate driver check ourselves, but would like to know as soon as possible then if this is something we should work on.
Member

hipRuntimeGetVersion doesn't really provide the correct info. We can get the relevant driver version string from the Windows registry. I will add this to give out an error in case the driver < 21.40.

`hipRuntimeGetVersion` doesn't really provide the correct info. We can get the relevant driver version string from the Windows registry. I will add this to give out an error in case the driver < 21.40.
Member

Added subscriber: @LazyDodo

Added subscriber: @LazyDodo
Member

Is there any chance we can trust the version info of the shared amdhip64.dll file? i'd rather query that than go rummage around in the registry, should be pretty straight forward, example in bli_windows_get_module_version

Is there any chance we can trust the version info of the shared `amdhip64.dll` file? i'd rather query that than go rummage around in the registry, should be pretty straight forward, example in `bli_windows_get_module_version`
Member

We should be able to use it, I am confirming with the driver packaging team. The drawback would be that this dll version info will not the same number as the Radeon Software package version (i.e not 21.40 etc) so we won't be able to provide a more user friendly message other than maybe "Please upgrade driver to 21.40 or later".

We should be able to use it, I am confirming with the driver packaging team. The drawback would be that this dll version info will not the same number as the Radeon Software package version (i.e not 21.40 etc) so we won't be able to provide a more user friendly message other than maybe "Please upgrade driver to 21.40 or later".

That's already the only message we provide to users in the preferences. We don't use the detected driver version number in the message to users, only the debug logs have more detail. So it doesn't really matter.

That's already the only message we provide to users in the preferences. We don't use the detected driver version number in the message to users, only the debug logs have more detail. So it doesn't really matter.
Member

Submitted patch checking for file version of amdhip64.dll

Submitted patch checking for file version of amdhip64.dll

Added subscriber: @2905710881

Added subscriber: @2905710881

In #93109#1258377, @Sayak-Biswas wrote:
Submitted patch checking for file version of amdhip64.dll

Is there any built-in hip support in 21.Q3.1? Is there a chance for future Adrenalin to join as well?

> In #93109#1258377, @Sayak-Biswas wrote: > Submitted patch checking for file version of amdhip64.dll Is there any built-in hip support in 21.Q3.1? Is there a chance for future Adrenalin to join as well?

You need the 21.40 driver. HIP will come to the Adrenalin driver in the future, see https://devtalk.blender.org/t/2021-11-9-blender-rendering-meeting/21326/14

Please don't use this tracker for user questions though!

You need the 21.40 driver. HIP will come to the Adrenalin driver in the future, see https://devtalk.blender.org/t/2021-11-9-blender-rendering-meeting/21326/14 Please don't use this tracker for user questions though!

This issue was referenced by blender/cycles@8f81c6dfd8

This issue was referenced by blender/cycles@8f81c6dfd87069e1b444734bc9d3e268cb163f34

This issue was referenced by 3bb8d173e7

This issue was referenced by 3bb8d173e70c1ec80612733c63efedc5e1d854e5

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
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
10 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#93109
No description provided.