summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* rocm.eclass: add rocm_use_hipcc function and update example accordinglySv. Lockal2024-09-091-6/+34
| | | | | | Bug: https://bugs.gentoo.org/936099 Signed-off-by: Sv. Lockal <lockalsash@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
* rocm.eclass: Enable ROCm 6, add gfx94{0,1,2} (MI300) supportYiyang Wu2024-05-181-1/+11
| | | | | | | | | Update the references, since the original reference does not contain MI300. The "see also" blog is also removed because it hasn't been updated for 2 years. Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com> Signed-off-by: Benda Xu <heroxbd@gentoo.org>
* rocm.eclass: remove xnack flag for broader compatibilityYiyang Wu2024-05-181-17/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initially, rocm.eclass append xnack[1,2] feature flag to gfx9 GPUs, since ROCm upstream does this in many of their math libraries, e.g. rocBLAS [3]. The list includes gfx90a:xnack+, indicating xnack is usable for MI200 series, thus rocm.eclass append :xnack+ to gfx90a. But it turns out xnack- is also common for MI200 series, restricting to xnack+ produces incompatible GPU kernel with xnack- mode. Also, community also explores using xnack on other gfx9 GPU [4,5], which is previously restricted to xnack- in rocm.eclass. By not appending xnack feature flag, GPU kernels are compiled to "xnack any" mode, which can be run in either mode, potentially scarifying some performance [6,7], with no direct evidence. rocFFT reports no performance penalty[8]. For the reason above, do not append xnack feature flag to AMDGPU_TARGETS, which is compatible with GPUs operate in both xnack mode. [1] https://wiki.gentoo.org/wiki/ROCm#XNACK_target_feature [2] https://rocm.docs.amd.com/en/latest/conceptual/gpu-memory.html#xnack [3] https://github.com/ROCm/rocBLAS/blob/release/rocm-rel-5.0/CMakeLists.txt#L201 [4] https://niconiconi.neocities.org/tech-notes/xnack-on-amd-gpus/ [5] https://arxiv.org/abs/2401.02680 [6] https://llvm.org/docs/AMDGPUUsage.html#target-features [7] https://docs.olcf.ornl.gov/systems/crusher_quick_start_guide.html#compiling-hip-kernels-for-specific-xnack-modes [8] https://github.com/ROCm/rocFFT/commit/cd2689360ba3b3579d044d8925838ff307b4b4cf Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com> Signed-off-by: Benda Xu <heroxbd@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/36254
* rocm.eclass: add ROCM_SKIP_GLOBALS for the USE-flags exposure.Benda Xu2023-12-141-2/+16
| | | | | | | | | | | Low level ebuilds such as dev-util/hip and dev-libs/rocm-opencl-runtime unconditionally supports all the AMDGPU cards. They do not need to define amdgpu_targets_* USE-flags. But their src_test() call check_amdgpu() to confirm an AMDGPU is available. Reference: https://marc.info/?l=gentoo-dev&m=170045497732286 Signed-off-by: Benda Xu <heroxbd@gentoo.org>
* rocm.eclass: support RDNA3 GPU for >=5.4, remove <5Yiyang Wu2023-01-311-6/+7
| | | | | | | | | | | | | | ROCm libraries with version <5 are cleaned up, remove version 4 support for rocm.eclass. RDNA3 has initial support in ROCm libraries starting from 5.4 releases. Enable gfx110* amdgpu_targets in rocm.eclass and add corresponding description. Closes: https://bugs.gentoo.org/891499 Closes: https://github.com/gentoo/gentoo/pull/29320 Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com> Signed-off-by: Benda Xu <heroxbd@gentoo.org>
* rocm.eclass: drop EAPI 7 supportDavid Seifert2022-12-271-5/+5
| | | | Signed-off-by: David Seifert <soap@gentoo.org>
* rocm.eclass: new eclassYiyang Wu2022-09-121-0/+223
This eclass provides utilities for ROCm libraries in https://github.com/ROCmSoftwarePlatform, e.g. rocBLAS, rocFFT. It contains a USE_EXPAND, amdgpu_targets_*, which handles the GPU architecture to compile, and keep targets coherent among dependencies. Packages that depend on ROCm libraries, like cupy, can also make use of this eclass, mainly specify GPU architecture and it's corresponding dependencies via USE_EXPAND. Closes: https://github.com/gentoo/gentoo/pull/26784 Closes: https://bugs.gentoo.org/810619 Bug: https://bugs.gentoo.org/817440 Reference: https://archives.gentoo.org/gentoo-dev/message/49b17ca059187a4b5d983a9500507158 Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com> Signed-off-by: Benda Xu <heroxbd@gentoo.org>