Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#77360 - [hip-runtime-amd] No symlink for hip-targets.cmake in /opt/rocm/hip/lib/cmake/hip/

Attached to Project: Community Packages
Opened by Willie Sippel (wsippel) - Thursday, 02 February 2023, 21:00 GMT
Last edited by Torsten Keßler (tpkessler) - Saturday, 18 February 2023, 14:23 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Torsten Keßler (tpkessler)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Pytorch expects to find hip-targets.cmake in the same directory hip-config.cmake is in, /opt/rocm/hip/lib/cmake/hip/. hip-config.cmake is there, and is a symlink to /opt/rocm/lib/cmake/hip/hip-targets.cmake, as is hip-config-version.cmake, but there's no symlink to hip-targets.cmake. Manually setting the link fixes the issue. I'm not sure if this might be an upstream issue, I couldn't find anything, but the fact that the other two files are linked to the expected directory makes me think it's a bug either way. Pytorch still doesn't compile, maybe because /opt/rocm/.info/version-dev is also missing, but I have no idea which ROCm package should provide that file. This issue already existed in rocm-arch and was fixed in the metapackages back then: https://github.com/rocm-arch/rocm-arch/pull/558

Steps to reproduce:
Try to compile Pytorch 1.13.1 with ROCm 5.4.2 from community-testing.
This task depends upon

Closed by  Torsten Keßler (tpkessler)
Saturday, 18 February 2023, 14:23 GMT
Reason for closing:  Implemented
Comment by Willie Sippel (wsippel) - Friday, 03 February 2023, 14:19 GMT
Managed to compile PyTorch after manually adding /opt/rocm/.info/version-info and /opt/rocm/.info/version-dev (in addition to the hip-targets.cmake symlink mentioned above), so it appears those two files are still required, and are not provided by any of the Arch packages as far as I can tell.
Comment by Torsten Keßler (tpkessler) - Saturday, 04 February 2023, 13:50 GMT
> I have no idea which ROCm package should provide that file

The info file is provided by rocm-core, a package I will hopefully add to [community-testing] soon. The problem with rocm-core is that AMD hasn't released its source code yet and the binary package doesn't include a license file.

> but there's no symlink to hip-targets.cmake

There's also no symlink in AMD's official package, so I think it's a problem with pytorch. Which version did you try to build? I was able to successfully build pytorch 1.21.1 with my local rocm-core without the symlink.
Comment by Willie Sippel (wsippel) - Saturday, 04 February 2023, 15:08 GMT
Weird. I built PyTorch 1.13.1, straight from the Github release page, and it threw dozens of errors during the configuration stage until I added the symlink. It's also strange, because the other cmake files in that directory are linked to where PyTorch expects them. There was also another issue I had to fix manually that I forgot to mention: According to the rocBLAS docs (https://rocblas.readthedocs.io/en/rocm-5.4.0/Linux_Install_Guide.html), rocblas.h should be in /opt/rocm/include/, but it's actually in /opt/rocm/include/rocblas/, so I guess that changed at some point and the manual (and PyTorch) hasn't been updated?

And don't the info files just contain the version number? I followed the old bug report and simply put "5.4.2-2" in the files, and that apparently worked. Even if you can't distribute the actual file, wouldn't echoing the version string to a file be sufficient?
Comment by Torsten Keßler (tpkessler) - Saturday, 11 February 2023, 14:26 GMT
I've added a rocm-core package to [community-testing] that includes the version files and the ROCm version header.
Comment by Torsten Keßler (tpkessler) - Saturday, 18 February 2023, 14:23 GMT
PyTorch with ROCm is now in [community].

Loading...