Skip to content

Gate RVV code on the target extension#1571

Open
catap wants to merge 1 commit into
ggml-org:masterfrom
catap:riscv64
Open

Gate RVV code on the target extension#1571
catap wants to merge 1 commit into
ggml-org:masterfrom
catap:riscv64

Conversation

@catap

@catap catap commented Jul 19, 2026

Copy link
Copy Markdown

The RISC-V vector intrinsic specification requires __riscv_v_intrinsic to be defined when the compiler supports the API, even when the vector extension is not selected. Clang therefore defines it for rv64gc, causing ggml to enter RVV branches where vector types are rejected because the required ISA extensions are absent.

Use __riscv_v for optional RVV implementations; this macro represents the selected target ISA. Retain __riscv_v_intrinsic checks in SpaceMIT sources, where they validate mandatory compiler API support rather than select optional vector code.

Closes: #1535

The RISC-V vector intrinsic specification requires __riscv_v_intrinsic
to be defined when the compiler supports the API, even when the vector
extension is not selected. Clang therefore defines it for rv64gc,
causing ggml to enter RVV branches where vector types are rejected
because the required ISA extensions are absent.

Use __riscv_v for optional RVV implementations; this macro represents
the selected target ISA. Retain __riscv_v_intrinsic checks in SpaceMIT
sources, where they validate mandatory compiler API support rather than
select optional vector code.

Closes: ggml-org#1535
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ggml-0.14.0 build fails on OpenBSD/riscv64

1 participant