Repository navigation
fix(hipsolver): support riscv64 LAPACK target configuration - #12529
Conversation
## Motivation `HIPSOLVER_INTERNAL_LAPACK_BUILD` builds a static OpenBLAS through `ExternalProject_Add` and forces `-DTARGET=GENERIC` so the binaries run on any CPU. OpenBLAS resolves that target by parsing `kernel/<arch>/KERNEL.<target>`, and on riscv64 that file is `kernel/riscv64/KERNEL.generic`, which does not exist. The OpenBLAS configure therefore aborts in `ParseMakefileVars` with "KERNEL.generic cannot be read" and the hipSOLVER build stops there. This is the same class of problem that was already handled for ppc64le (see OpenBLAS#5987), where the tree lacks a `KERNEL.generic` as well. ## Technical Details - Select `-DTARGET=RISCV64_GENERIC` when `CMAKE_SYSTEM_PROCESSOR` is `riscv64`. This is the portable, non-vector-extension baseline target that OpenBLAS ships for RISC-V (`TargetList.txt`, `kernel/riscv64/KERNEL.RISCV64_GENERIC`), so it plays the same role as `GENERIC` does on x86. - Preserve the existing `POWER8` and `GENERIC` selection for every other architecture. ## Test Plan Configure hipSOLVER with `HIPSOLVER_INTERNAL_LAPACK_BUILD=ON` on a riscv64 host and run the `hipsolver-static-lapack` configure step, before and after the change. ## Test Result Before: the OpenBLAS configure step fails in `kernel/CMakeLists.txt` (`ParseMakefileVars`) because `kernel/riscv64/KERNEL.generic` cannot be read. After: the step reads `kernel/riscv64/KERNEL.RISCV64_GENERIC` and configuration completes. ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests. Signed-off-by: William-Mou <william.mou@sifive.com>
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🎉 All checks passed! This PR is ready for review. |
|
Hello @benrichard-amd, We've received two approvals on this PR. Could you please help merge it? |
|
@William-Mou - I've been trying to, just having issues getting CI passing. |
|
@William-Mou - It seems "Allow edits from maintainers" is not checked, so I can't merge with the latest develop to trigger a rerun of CI. Can you check that box, in the right sidebar? |
|
Hi @mgates3, I noticed that we can't enable this option for PRs originating from an organization. Are there any other workarounds to bypass the CI? For example, by manually granting maintainer permissions within the org's repo? If that's not possible, I can try recreating a new PR from my personal account instead. This seems to be a known GitHub issue. Please refer to the link below: |
|
@William-Mou - we manually triggered CI, so let's see if everything flows through now. |
TheRock Submodule Bump ActivityNewest first
|
Motivation
HIPSOLVER_INTERNAL_LAPACK_BUILDbuilds a static OpenBLAS throughExternalProject_Addand forces-DTARGET=GENERICso the binaries run on any CPU. OpenBLAS resolves that target by parsingkernel/<arch>/KERNEL.<target>, and on riscv64 that file iskernel/riscv64/KERNEL.generic, which does not exist. The OpenBLAS configure therefore aborts inParseMakefileVarswith "KERNEL.generic cannot be read" and the hipSOLVER build stops there. This is the same class of problem that was already handled for ppc64le (see OpenBLAS#5987), where the tree lacks aKERNEL.genericas well.Technical Details
-DTARGET=RISCV64_GENERICwhenCMAKE_SYSTEM_PROCESSORisriscv64. This is the portable, non-vector-extension baseline target that OpenBLAS ships for RISC-V (TargetList.txt,kernel/riscv64/KERNEL.RISCV64_GENERIC), so it plays the same role asGENERICdoes on x86.POWER8andGENERICselection for every other architecture.Issue Tracking
ISSUE ID : ROCm/TheRock#8471
Tracked by ROCm/TheRock#8471 (riscv64 host enablement for ROCm).
Test Plan
Configure hipSOLVER with
HIPSOLVER_INTERNAL_LAPACK_BUILD=ONon a riscv64 host and run thehipsolver-static-lapackconfigure step, before and after the change.Test Result
Before: the OpenBLAS configure step fails in
kernel/CMakeLists.txt(ParseMakefileVars) becausekernel/riscv64/KERNEL.genericcannot be read. After: the step readskernel/riscv64/KERNEL.RISCV64_GENERICand configuration completes.Related
#11078 is the merged ppc64le equivalent with the same error. Fixing it in OpenBLAS was rejected in OpenMathLib/OpenBLAS#5821 — the maintainer expects callers to pass a real
TARGET, which is what this does.Submission Checklist