Faster matmul when we can fall back to gemv.

This commit is contained in:
laurent
2023-08-04 22:44:30 +01:00
parent f7b2a0391d
commit 3fa3623135
3 changed files with 14 additions and 5 deletions

View File

@ -5,6 +5,8 @@ use anyhow::Result;
use candle_core::{Device, Tensor};
fn main() -> Result<()> {
let mut file = std::fs::File::open("ggml.bin")?;
let data = candle_core::ggml::Content::read(&mut file, &Device::Cpu)?;
let a = Tensor::randn(0f32, 1., (2, 3), &Device::Cpu)?;
let b = Tensor::randn(0f32, 1., (3, 4), &Device::Cpu)?;
let c = a.matmul(&b)?;