Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 693200 - media-gfx/blender should use llvm.eclass / add rocm use flag
Summary: media-gfx/blender should use llvm.eclass / add rocm use flag
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement with 1 vote (vote)
Assignee: Adrian
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-31 13:20 UTC by Luke A. Guest
Modified: 2020-03-07 17:10 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke A. Guest 2019-08-31 13:20:37 UTC
Currently the blender ebuild's just find the latest installed when it should be possible to enable a specific llvm.

Add a rocm use flag so that the llvm-roc / llvm:roc can be built against.
Comment 1 Adrian 2019-09-14 12:52:02 UTC
I do not have access to an AMD GPU and would be unable to develop this myself. However I would be happy to review a patch.
Comment 2 Luke A. Guest 2019-09-14 15:08:33 UTC
You don't need access to a AMD GPU to test it, you need access to a USE flag! This is a ebuild problem.
Comment 3 Adrian 2019-09-15 03:37:28 UTC
If a straight swap of sys-devel/llvm for sys-devel/llvm-roc is all that is required, it might be possible to add this feature by putting
llvm? ( rocm? ( sys-devel/llvm-roc:= ) !rocm? ( sys-devel/llvm:= ) ) in RDEPEND and rocm? ( llvm opencl ) in REQUIRED_USE

My concern is whether llvm-roc might used during rendering for creating the opencl kernel or for compiling the OSL shaders. Looking at the github page there are also a lot of rocm libraries and I don't know whether some of these might be required as well.

Without hardware I can only test whether emerge blender is successful, not whether blender crashes during rendering. This should be developed and tested by someone with hardware so I can be sure it works prior to integration.

The main advantage of the llvm eclass seems to be the ability to limit the maximum version of llvm to use when several are installed, however blender can use all versions of llvm from the tree. It seems that it is not possible to specify use of llvm-roc using it yet, pending bug #693198.
Comment 4 Johannes Hirte 2019-12-23 18:48:37 UTC
(In reply to Adrian from comment #3)
> If a straight swap of sys-devel/llvm for sys-devel/llvm-roc is all that is
> required, it might be possible to add this feature by putting
> llvm? ( rocm? ( sys-devel/llvm-roc:= ) !rocm? ( sys-devel/llvm:= ) ) in
> RDEPEND and rocm? ( llvm opencl ) in REQUIRED_USE
>

Sadly no, blender doesn't work with rocm and amdgpu. When activating cycles-useflag with rocm-opencl, the system-llvm and rocm-llvm will be mixed. The system-llvm is pulled in by mesa and interferes with the rocm-llvm for opencl. I've tried to get it work, but always get this error:

mesa: CommandLine Error: Option 'help-list' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options

I'm afraid, as long as rocm is independent from upstream llvm, this doesn't really work.
Comment 5 Johannes Hirte 2019-12-27 10:26:55 UTC
llvm upstream bugreports:

https://bugs.llvm.org/show_bug.cgi?id=30587
https://bugs.llvm.org/show_bug.cgi?id=22952