mirror of
https://github.com/huggingface/candle.git
synced 2025-06-17 02:58:50 +00:00
Faster matmul when we can fall back to gemv.
This commit is contained in:
@ -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)?;
|
||||
|
Reference in New Issue
Block a user