Remove allow pragma

This commit is contained in:
Ivar Flakstad
2024-01-08 06:48:33 +01:00
parent 3f04a79ada
commit ad075a5f7e
2 changed files with 2 additions and 6 deletions

View File

@ -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();

View File

@ -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"