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

Function conv1d

cake-core/benches/bench_backend_ops.rs:141–149  ·  view source on GitHub ↗
(bencher: divan::Bencher, channels: usize)

Source from the content-addressed store, hash-verified

139
140#[divan::bench(args = [16, 64, 256])]
141fn conv1d(bencher: divan::Bencher, channels: usize) {
142 let b = backend();
143 let w = Tensor::randn(0f32, 0.1, (channels, channels, 3), &Device::Cpu).unwrap();
144 let bias = Tensor::randn(0f32, 0.1, (channels,), &Device::Cpu).unwrap();
145 let x = Tensor::randn(0f32, 1.0, (1, channels, 64), &Device::Cpu).unwrap();
146 bencher.bench_local(|| {
147 let _ = b.conv1d(&x, &w, Some(&bias), 1, 1, 1, 1).unwrap();
148 });
149}
150
151// ── conv_transpose1d ───────────────────────────────────────────────────
152

Callers

nothing calls this directly

Calls 2

conv1dMethod · 0.80
backendFunction · 0.70

Tested by

no test coverage detected