mirror of
https://github.com/huggingface/candle.git
synced 2025-06-18 11:37:11 +00:00
Add a benchmark for the matmul slowness.
This commit is contained in:
@ -185,8 +185,8 @@ impl Benchmark for Matmul {
|
|||||||
type PreProcessData = (Tensor, Tensor);
|
type PreProcessData = (Tensor, Tensor);
|
||||||
type RunResult = Tensor;
|
type RunResult = Tensor;
|
||||||
fn preprocess() -> Result<Self::PreProcessData> {
|
fn preprocess() -> Result<Self::PreProcessData> {
|
||||||
let lhs = Tensor::randn(0f32, 1., (1024, 1024), &Device::Cpu)?;
|
let lhs = Tensor::randn(0f32, 1., (1024 * 4, 1024 * 4), &Device::Cpu)?;
|
||||||
let rhs = Tensor::randn(0f32, 1., (1024, 1024), &Device::Cpu)?;
|
let rhs = Tensor::randn(0f32, 1., (1024 * 4, 1), &Device::Cpu)?;
|
||||||
Ok((lhs, rhs))
|
Ok((lhs, rhs))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user