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

Function large_tensor_decode

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

Source from the content-addressed store, hash-verified

127
128#[divan::bench(args = [1024, 4096, 16384])]
129fn large_tensor_decode(bencher: divan::Bencher, size: usize) {
130 let t = make_f16_tensor(size);
131 let msg = Message::from_tensor(&t);
132 let bytes = msg.to_bytes().unwrap();
133 bencher
134 .counter(divan::counter::BytesCount::new(bytes.len()))
135 .bench_local(|| Message::from_bytes(&bytes).unwrap());
136}
137
138#[divan::bench(args = [3, 8, 14])]
139fn batch_layers_encode(bencher: divan::Bencher, num_layers: usize) {

Callers

nothing calls this directly

Calls 2

to_bytesMethod · 0.80
make_f16_tensorFunction · 0.70

Tested by

no test coverage detected