summaryrefslogtreecommitdiff
path: root/candle-nn/examples/cpu_benchmarks.rs
diff options
context:
space:
mode:
Diffstat (limited to 'candle-nn/examples/cpu_benchmarks.rs')
-rw-r--r--candle-nn/examples/cpu_benchmarks.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/candle-nn/examples/cpu_benchmarks.rs b/candle-nn/examples/cpu_benchmarks.rs
index 68d384a6..001be116 100644
--- a/candle-nn/examples/cpu_benchmarks.rs
+++ b/candle-nn/examples/cpu_benchmarks.rs
@@ -222,7 +222,10 @@ impl Benchmark for QMatMul {
type RunResult = Tensor;
fn preprocess() -> Result<Self::PreProcessData> {
let zeros = vec![candle::quantized::k_quants::BlockQ4_0::zeros(); 4096 * 11008 / 32];
- let mm = candle::quantized::QTensor::new(zeros, (4096, 11008))?;
+ let mm = candle::quantized::QTensor::new(
+ candle::quantized::QStorage::Cpu(Box::new(zeros)),
+ (4096, 11008),
+ )?;
let mm = candle::quantized::QMatMul::from_qtensor(mm)?;
let arg = Tensor::randn(0f32, 1., (128, 11008), &Device::Cpu)?;
Ok((mm, arg))