diff options
author | Ivar Flakstad <69173633+ivarflakstad@users.noreply.github.com> | 2024-01-08 06:48:33 +0100 |
---|---|---|
committer | Ivar Flakstad <69173633+ivarflakstad@users.noreply.github.com> | 2024-01-08 06:48:33 +0100 |
commit | ad075a5f7edb0114b820b3e99a19b17d0d25ec3b (patch) | |
tree | 71a37fc5ebc7a04a7a0c796725814b6649dcbe67 | |
parent | 3f04a79ada7ca974176a0c7c3c3306f394eae9a9 (diff) | |
download | candle-ad075a5f7edb0114b820b3e99a19b17d0d25ec3b.tar.gz candle-ad075a5f7edb0114b820b3e99a19b17d0d25ec3b.tar.bz2 candle-ad075a5f7edb0114b820b3e99a19b17d0d25ec3b.zip |
Remove allow pragma
-rw-r--r-- | candle-core/benches/matmul.rs | 5 | ||||
-rw-r--r-- | candle-core/benches/utils.rs (renamed from candle-core/benches/bench_utils.rs) | 3 |
2 files changed, 2 insertions, 6 deletions
diff --git a/candle-core/benches/matmul.rs b/candle-core/benches/matmul.rs index 4f7dfa6c..a5dba9cc 100644 --- a/candle-core/benches/matmul.rs +++ b/candle-core/benches/matmul.rs @@ -1,10 +1,9 @@ -mod bench_utils; +mod utils; -use crate::bench_utils::bench_name; -use bench_utils::{device, BenchDevice}; use candle_core::{DType, Tensor}; use criterion::{black_box, criterion_group, criterion_main, Criterion, Throughput}; use std::time::Instant; +use utils::{bench_name, device, BenchDevice}; fn run(a: &Tensor, b: &Tensor) { a.matmul(&b.t().unwrap()).unwrap(); diff --git a/candle-core/benches/bench_utils.rs b/candle-core/benches/utils.rs index 75800761..a93afc6e 100644 --- a/candle-core/benches/bench_utils.rs +++ b/candle-core/benches/utils.rs @@ -24,7 +24,6 @@ impl BenchDevice for Device { } } -#[allow(dead_code)] pub(crate) fn device() -> Result<Device> { return if cfg!(feature = "metal") { Device::new_metal(0) @@ -35,12 +34,10 @@ pub(crate) fn device() -> Result<Device> { }; } -#[allow(dead_code)] pub(crate) fn bench_name<S: Into<String>>(name: S) -> String { format!("{}_{}", device_variant(), name.into()) } -#[allow(dead_code)] const fn device_variant() -> &'static str { return if cfg!(feature = "metal") { "metal" |