mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 10:38:54 +00:00
Remove allow pragma
This commit is contained in:
@ -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();
|
||||
|
@ -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"
|
Reference in New Issue
Block a user