[Bugfix][CPU][RISC-V] Fix VLEN detection for RVV attention path (#47532)

Signed-off-by: liutong <liutong@iscas.ac.cn>
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
LiuTong
2026-07-06 05:58:03 +00:00
committed by GitHub
co-authored by Claude
parent d9c1767cd4
commit 16f8110935
3 changed files with 26 additions and 18 deletions
+2 -1
View File
@@ -13,7 +13,8 @@ static inline cpu_attention::Fp8KVCacheDataType parse_fp8_kv_dtype(
bool cpu_attn_has_isa(const std::string& isa) {
if (isa == "rvv") {
#if defined(__riscv) && defined(__riscv_v_min_vlen) && __riscv_v_min_vlen == 128
#if defined(__riscv) && defined(__riscv_v_min_vlen) && \
(__riscv_v_min_vlen == 128 || __riscv_v_min_vlen == 256)
return true;
#else
return false;