FS#76772 - [blender] HIP acceleration requires which

Attached to Project: Community Packages
Opened by Spencer Baumann (spbmnn) - Wednesday, 07 December 2022, 22:20 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Friday, 30 December 2022, 08:04 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
freswa (frederik)
Filipe Laíns (FFY00)
Torsten Keßler (tpkessler)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Hello! I just had a very interesting problem trying to get HIP acceleration to work via opencl-amd-dev and the rest. I had gotten all of the packages installed, but Blender refused to use it, saying the hipcc compiler couldn't be found.

When I ran blender on the command line to see the errors, it would spit out one particular line about 'which' not being found.

This confused me as 'which' works fine in my terminal. Turns out, with the help of 'which which', I discovered zsh has a built-in 'which' utility that isn't present in sh and bash by default -- this must be installed with the 'which' command, which I somehow hadn't installed up until now. Installing the package let everything work fine, so perhaps it should be listed as a dependency.

Installed package version:
blender 17:3.3.1-7

Steps to reproduce:
1. Uninstall 'which' package if present
2. Attempt to use HIP acceleration with an AMD card present
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Friday, 30 December 2022, 08:04 GMT
Reason for closing:  No response
Comment by Toolybird (Toolybird) - Thursday, 08 December 2022, 00:19 GMT
Please post the command line log so we can see exactly where the requirement is coming from.
Comment by Spencer Baumann (spbmnn) - Sunday, 11 December 2022, 07:42 GMT
Sorry for the delay, since installing which let them compile I had to wait for the next update to reset it.

Running blender from the command line and trying to render gives the following:

Read prefs: /home/s/.config/blender/3.4/config/userpref.blend
/run/user/1000/gvfs/ non-existent directory
Read blend: /home/s/Documents/void/void.blend
sh: line 1: which: command not found
HIP hipcc compiler not found. Install HIP toolkit in default location.

Refer to the Cycles GPU rendering documentation for possible solutions:
https://docs.blender.org/manual/en/latest/render/cycles/gpu_rendering.html

Saved session recovery to '/tmp/quit.blend'

Blender quit
Comment by Toolybird (Toolybird) - Sunday, 11 December 2022, 22:22 GMT
Ok, thanks for that. But I still can't determine where the `which' call is coming from. It's probably not in blender but in the AUR ROCm/HIP stack...but I'm not downloading 11GB of bloat to find out...maybe @Svenstaro has some insight?
Comment by Torsten Keßler (tpkessler) - Monday, 12 December 2022, 16:33 GMT
opencl-amd ships a collection of binary ROCm packages compiled for Ubuntu (simply unpacks the deb files), so it's not surprising that it only works after some tweaking.
@spbmnn: All you need for HIP support in blender is hip-runtime-amd [1] (I'm the maintainer of this package). Currently, you will need to build it from source but you will find it in [community] soon.

[1] https://aur.archlinux.org/packages/hip-runtime-amd
Comment by Sven-Hendrik Haase (Svenstaro) - Monday, 26 December 2022, 02:39 GMT
Can we close this?

Loading...