Bug 2279335 - Mismatch in LLVM dependencies
Summary: Mismatch in LLVM dependencies
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rocm-compilersupport
Version: 40
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jeremy Newton
QA Contact:
URL:
Whiteboard:
Depends On: 2292870
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-05-06 15:26 UTC by Miloš Komarčević
Modified: 2024-07-28 02:00 UTC (History)
5 users (show)

Fixed In Version: rocm-compilersupport-17.3-4.rocm6.1.2.fc40
Clone Of:
Environment:
Last Closed: 2024-07-28 02:00:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Miloš Komarčević 2024-05-06 15:26:10 UTC
rocm-comgr and rocm-opencl have been bumped for F40 to build w/ 'compat_build', but rocm-device-libs has not and the dependency chain and issued OpenCL compilation commands no longer match.

As a result OpenCL kernels in darktable no longer compile at runtime OOTB on F40:

fatal error: malformed or corrupted AST file: 
'could not find file '/usr/lib64/llvm17/bin/../../../lib/clang/17/include/opencl-c-base.h' referenced by AST file '/tmp/comgr-00ca7b/include/opencl1.2-c.pch''
Error: Failed to compile source (from CL or HIP source to LLVM IR).

I guess it's just a matter of forwarding the f40 branch to https://src.fedoraproject.org/rpms/rocm-device-libs/c/a9a34d2e64eb9c984e6eec3cbabda11c580afada?branch=rawhide to match the related rocm-comgr and rocclr changes...

Reproducible: Always

Comment 1 Jeremy Newton 2024-05-07 19:22:03 UTC
Thanks for the report, I'm just catching up on bugs after some time off.

I need to review a lot of the compat work, as there's a few issues needing fixes and some simplifications needed.

Comment 2 Steve 2024-06-08 13:32:22 UTC
Not sure whether this has been fixed in the meantime...

However, I noticed that 
/usr/lib64/llvm17/
does not contain a bin directory and hence the above command could not find the header file...
Adding just the bin directory so that the path 
/usr/lib64/llvm17/bin
exists, fixed the darktable issue for me.

Comment 3 Steve 2024-06-09 15:15:38 UTC
Just to add...

While darktable was able to compile the OpenCL kernels with the above hack of adding the bin directory, when enabling OpenCL in darktable the darkroom view of images within darktable has artefacts.

I ended up disabling OpenCL again.

With rocm 6.1.2 now out and darktable 4.8 due for release soon (21/06/24), hopefully, this will get fixed properly as part of those updates.

Comment 4 killermilind 2024-06-23 07:36:02 UTC
When I try to build and run ROCmExamples, I get an error 

    clang++: error: cannot find ROCm device library; provide its path via '--rocm-path' or '--rocm-device-lib-path', or pass '-nogpulib' to build without ROCm device library

I am unable to find rocm-device-libs package on Fedora 40. Is it pulled from the repository? Do I have to wait?

Comment 5 killermilind 2024-06-23 07:38:45 UTC
Apologies, the package is already installed, but I still get the error. Any ideas on how to proceed?

Comment 6 killermilind 2024-06-23 07:48:42 UTC
Solved it with

export HIP_DEVICE_LIB_PATH=/usr/lib/clang/17/amdgcn/bitcode

I guess some path config somewhere is wrong.

Comment 7 Jeremy Newton 2024-07-04 16:50:14 UTC
Hey we're going to just solve this by upgrading to 6.1, which doesn't have the bug.

Comment 8 Fedora Update System 2024-07-12 00:58:51 UTC
FEDORA-2024-2a06d36b71 (hipblas-6.1.1-1.fc40, hipcub-6.1.1-2.fc40, and 24 more) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-2a06d36b71

Comment 9 Fedora Update System 2024-07-13 03:04:57 UTC
FEDORA-2024-2a06d36b71 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-2a06d36b71`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-2a06d36b71

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Steve 2024-07-20 20:28:33 UTC
Hi Jeremy,

I have updated both my systems tonight (AMD Ryzen 7 PRO 7840U w/ Radeon 780M Graphics and AMD Ryzen 9 5900HX with Radeon Graphics), Darktable 4.8 compiles the rocm kernels and runs as expected.

So all seems to be working here.

Thanks a lot for sorting it (at least for this user :) )

Comment 11 Fedora Update System 2024-07-28 02:00:20 UTC
FEDORA-2024-2a06d36b71 (hipblas-6.1.1-1.fc40, hipcub-6.1.1-2.fc40, and 24 more) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.