-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
When I tried to execute this simple program it segfaults in the MKL function, which does not happen when I do the same operation in C. So I'm confused, it also segfaults with dgemm.
extern crate cblas;
extern crate intel_mkl_src;
use cblas::*;
fn main() {
let (m, n, k) = (1024, 1024, 1024);
let a: Vec<f32> = (0..(m * k)).map(|i| i as f32).collect();
let b: Vec<f32> = (0..(k * n)).map(|i| i as f32).collect();
let mut c: Vec<f32> = (0..(m * n)).map(|_| 0.0).collect();
unsafe {
sgemm(
Layout::RowMajor,
Transpose::None,
Transpose::None,
m,
n,
k,
1.0,
&a,
k,
&b,
n,
0.0,
&mut c,
n,
)
}
}My Cargo.toml file is containing only those dependencies which should work (both static and dynamic produces the segfault):
cblas = "0.4"
intel-mkl-src = {version = "0.8", features = ["mkl-dynamic-ilp64-seq"]}Does anyone encounter this issue ?
Metadata
Metadata
Assignees
Labels
No labels