From ad075a5f7edb0114b820b3e99a19b17d0d25ec3b Mon Sep 17 00:00:00 2001 From: Ivar Flakstad <69173633+ivarflakstad@users.noreply.github.com> Date: Mon, 8 Jan 2024 06:48:33 +0100 Subject: [PATCH] Remove allow pragma --- candle-core/benches/matmul.rs | 5 ++--- candle-core/benches/{bench_utils.rs => utils.rs} | 3 --- 2 files changed, 2 insertions(+), 6 deletions(-) rename candle-core/benches/{bench_utils.rs => utils.rs} (96%) 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 similarity index 96% rename from candle-core/benches/bench_utils.rs rename to 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 { return if cfg!(feature = "metal") { Device::new_metal(0) @@ -35,12 +34,10 @@ pub(crate) fn device() -> Result { }; } -#[allow(dead_code)] pub(crate) fn bench_name>(name: S) -> String { format!("{}_{}", device_variant(), name.into()) } -#[allow(dead_code)] const fn device_variant() -> &'static str { return if cfg!(feature = "metal") { "metal"