Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 911400 - Guideline of ROCm headers
Summary: Guideline of ROCm headers
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-29 02:02 UTC by Benda Xu
Modified: 2023-07-30 04:39 UTC (History)
1 user (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 Benda Xu gentoo-dev 2023-07-29 02:02:44 UTC
We need guidelines for where to put the ROCm headers properly.  At present it is a mess.

dev-libs/rocm-comgr-5.1.3 installs headers into /usr/include

and dev-libs/rocm-comgr-5.4.2 installs headers into both

/usr/include/amd_comgr.h        
/usr/include/amd_comgr/amd_comgr.h

sci-libs/rocBLAS-5.4.3

/usr/include/rocblas
/usr/include/rocblas/internal
/usr/include/rocblas/internal/rocblas-auxiliary.h
/usr/include/rocblas/internal/rocblas-complex-types.h
/usr/include/rocblas/internal/rocblas-export.h
/usr/include/rocblas/internal/rocblas-exported-proto.hpp
/usr/include/rocblas/internal/rocblas-functions.h
/usr/include/rocblas/internal/rocblas-types.h
/usr/include/rocblas/internal/rocblas-version.h
/usr/include/rocblas/internal/rocblas_bfloat16.h
/usr/include/rocblas/internal/rocblas_block_sizes.h
/usr/include/rocblas/internal/rocblas_device_malloc.hpp
/usr/include/rocblas/rocblas
/usr/include/rocblas/rocblas.h
/usr/include/rocblas/rocblas/rocblas_module.f90

Reproducible: Always
Comment 1 Benda Xu gentoo-dev 2023-07-29 02:15:24 UTC
We should set up rules of the header locations and stick to it. The easiest way to move on is to replace /opt/rocm by EPREFIX/usr with the upstream FHS reorganization[1].

1. https://rocm.docs.amd.com/en/latest/understand/file_reorg.html
Comment 2 Yiyang Wu 2023-07-29 02:18:37 UTC
> We need guidelines for where to put the ROCm headers properly.  At present it is a mess.

I think the current location is already following the FHS standard? If we change it, then we have to make more patches around those packages and revdeps.

> and dev-libs/rocm-comgr-5.4.2 installs headers into both
> /usr/include/amd_comgr.h
> /usr/include/amd_comgr/amd_comgr.h

We can remove the "/usr/include/amd_comgr.h" which is deprecated by upstream.
Comment 3 Yiyang Wu 2023-07-29 02:21:57 UTC
(In reply to Benda Xu from comment #1)
> We should set up rules of the header locations and stick to it. The easiest
> way to move on is to replace /opt/rocm by EPREFIX/usr with the upstream FHS
> reorganization[1].
> 
> 1. https://rocm.docs.amd.com/en/latest/understand/file_reorg.html

This is already down in the >=5.3 ebuilds by setting cmake variable -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF
Comment 4 Yiyang Wu 2023-07-29 02:25:31 UTC
> This is already down in the >=5.3 ebuilds by setting cmake variable
> -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF

OK, I see that dev-libs/rocm-comgr is not using this flag. Let's switch this on.
Comment 5 Larry the Git Cow gentoo-dev 2023-07-29 02:56:21 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=781f83d7790d50472c14e9baee71d89f83679dfc

commit 781f83d7790d50472c14e9baee71d89f83679dfc
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2023-07-29 02:36:44 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2023-07-29 02:54:56 +0000

    sci-libs/rocSOLVER: disable all the non-FHS symlinks.
    
    Bug: https://bugs.gentoo.org/911400
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 sci-libs/rocSOLVER/rocSOLVER-5.4.2.ebuild | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2b4cbc54fa45e1145ecc7d91d5545a90391de62

commit c2b4cbc54fa45e1145ecc7d91d5545a90391de62
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2023-07-28 14:39:31 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2023-07-29 02:54:52 +0000

    sci-libs/hipBLAS: add 5.4.2 to stick to FHS header locations.
    
    Bug: https://bugs.gentoo.org/911400
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 sci-libs/hipBLAS/Manifest             |  1 +
 sci-libs/hipBLAS/hipBLAS-5.4.2.ebuild | 35 +++++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+)
Comment 6 Larry the Git Cow gentoo-dev 2023-07-30 04:39:01 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=483694a8aaec6a222930e0070a583df1a8ecc4fe

commit 483694a8aaec6a222930e0070a583df1a8ecc4fe
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2023-07-30 03:16:10 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2023-07-30 04:35:39 +0000

    dev-util/rocm-cmake: drop 5.1.3, 5.3.3, 9999
    
    Version >=5.4 of rocm-cmake plays well with Gentoo baselayout.
    
    Closes: https://bugs.gentoo.org/842366
    Closes: https://bugs.gentoo.org/911400
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 dev-util/rocm-cmake/Manifest                |  2 --
 dev-util/rocm-cmake/metadata.xml            |  4 ++++
 dev-util/rocm-cmake/rocm-cmake-5.1.3.ebuild | 31 -----------------------------
 dev-util/rocm-cmake/rocm-cmake-5.3.3.ebuild | 31 -----------------------------
 dev-util/rocm-cmake/rocm-cmake-9999.ebuild  | 26 ------------------------
 5 files changed, 4 insertions(+), 90 deletions(-)