dot() with blas backend
还没有人认领这个 Issue。
评估
调研方向
Reproduce the two matrix examples with the openblas-static backend, then compare the results with openblas-system and native ndarray::dot(). Trace the BLAS-backed multiplication entry point and verify that the 8x3 case returns the expected nonzero matrix; add a regression check if the relevant test location is identified.
由索引模型根据 Issue 内容生成。
描述
When I want to multiply two matrices that exceed a certain size with the ndarray-linalg blas backend enabled, it returns a matrix filled with zeros. With the native dot() from ndarray (without blas) it works as expected.
Example:
This works, if the size of a is 7x3:
fn main() {
let a = array![
[1., 1., 1., 1., 1., 1., 1.],
[1., 1., 1., 1., 1., 1., 1.],
[1., 1., 1., 1., 1., 1., 1.],
];
let b = array![
[1., 2., 3.],
[1., 2., 3.],
[1., 2., 3.],
[1., 2., 3.],
[1., 2., 3.],
[1., 2., 3.],
[1., 2., 3.],
];
println!("{}", a.dot(&b));
}
now but if the size of a is 8x3 (or bigger) it returns a matrix filled with zeros: (with ndarray-linalg and blas backend)
fn main() {
let a = array![
[1., 1., 1., 1., 1., 1., 1., 1.],
[1., 1., 1., 1., 1., 1., 1., 1.],
[1., 1., 1., 1., 1., 1., 1., 1.],
];
let b = array![
[1., 2., 3.],
[1., 2., 3.],
[1., 2., 3.],
[1., 2., 3.],
[1., 2., 3.],
[1., 2., 3.],
[1., 2., 3.],
[1., 2., 3.],
];
println!("{}", a.dot(&b));
}
however, the last example works as expected without the ndarray-linalg crate. (directly implemented in ndarray itself)
Edit:
The issue only occures with openblas-static, not openblas-system.
- 主要语言
- Rust
- 星标
- 452
- 派生
- 95
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rust-ndarray/ndarray-linalg 的其他 Issue
-
Thin SVD未关闭
难度 5/5 一周以上 新手友好度 38/100
rust-ndarray/ndarray-linalg#414 ·
-
难度 5/5 一周以上 新手友好度 30/100
rust-ndarray/ndarray-linalg#413 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
rust-ndarray/ndarray-linalg#404 ·
-
难度 4/5 3-5 天 新手友好度 35/100
rust-ndarray/ndarray-linalg#402 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
rust-ndarray/ndarray-linalg#401 · 2 个 reaction ·
查看 rust-ndarray/ndarray-linalg 的全部 Issue
相似的 Issue
-
backend::vllm diffusion multimodal
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
lambdaclass/ethrex#7329 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
shadowsocks/shadowsocks-rust#2186 · 1 条评论 ·
-
C-bug S-awaiting-triage
难度 1/5 1 小时以内 新手友好度 92/100
juspay/hyperswitch#14479 ·
维护者通常 1 天内回复