MCPcopy Create free account
hub / github.com/evilsocket/cake / large_tensor_encode

Function large_tensor_encode

cake-core/benches/bench_protocol.rs:120–126  ·  view source on GitHub ↗
(bencher: divan::Bencher, size: usize)

Source from the content-addressed store, hash-verified

118
119#[divan::bench(args = [1024, 4096, 16384])]
120fn large_tensor_encode(bencher: divan::Bencher, size: usize) {
121 let t = make_f16_tensor(size);
122 let msg = Message::from_tensor(&t);
123 bencher
124 .counter(divan::counter::BytesCount::new(size * 2))
125 .bench_local(|| msg.to_bytes().unwrap());
126}
127
128#[divan::bench(args = [1024, 4096, 16384])]
129fn large_tensor_decode(bencher: divan::Bencher, size: usize) {

Callers

nothing calls this directly

Calls 2

to_bytesMethod · 0.80
make_f16_tensorFunction · 0.70

Tested by

no test coverage detected