From ddee9dc1dd14c2fb424ce93be595cafae091a85f Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Thu, 9 Nov 2023 19:41:08 +0100 Subject: [PATCH] Remove tracing. --- candle-core/Cargo.toml | 1 - candle-core/src/device.rs | 10 +++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/candle-core/Cargo.toml b/candle-core/Cargo.toml index f717e206..c5521c92 100644 --- a/candle-core/Cargo.toml +++ b/candle-core/Cargo.toml @@ -12,7 +12,6 @@ readme = "README.md" [dependencies] accelerate-src = { workspace = true, optional = true } byteorder = { workspace = true } -tracing = { workspace = true } candle-kernels = { path = "../candle-kernels", version = "0.3.0", optional = true } metal = { workspace = true, optional = true} cudarc = { workspace = true, optional = true } diff --git a/candle-core/src/device.rs b/candle-core/src/device.rs index 2665f243..de57c03a 100644 --- a/candle-core/src/device.rs +++ b/candle-core/src/device.rs @@ -1,6 +1,6 @@ use crate::backend::BackendDevice; use crate::cpu_backend::CpuDevice; -use crate::{bail, CpuStorage, DType, Result, Shape, Storage, WithDType}; +use crate::{CpuStorage, DType, Result, Shape, Storage, WithDType}; /// A `DeviceLocation` represents a physical device whereas multiple `Device` /// can live on the same location (typically for cuda devices). @@ -105,14 +105,14 @@ impl NdArray for Vec { fn shape(&self) -> Result { if self.is_empty() { - bail!("empty array") + crate::bail!("empty array") } let shape0 = self[0].shape()?; let n = self.len(); for v in self.iter() { let shape = v.shape()?; if shape != shape0 { - bail!("two elements have different shapes {shape:?} {shape0:?}") + crate::bail!("two elements have different shapes {shape:?} {shape0:?}") } } Ok(Shape::from([[n].as_slice(), shape0.dims()].concat())) @@ -203,11 +203,7 @@ impl Device { Device::Metal(_device) => { // let storage = device.rand_uniform(shape, dtype, lo, up)?; // Ok(Storage::Metal(storage)) -<<<<<<< HEAD crate::bail!("Metal rand_uniform not implemented") -======= - bail!("Metal rand_uniform not implemented") ->>>>>>> 8cf39d27 (Metal part 1 - Scaffolding for metal.) } } }