From 1735f7b44c1a86f5368671294df55789fe1476b5 Mon Sep 17 00:00:00 2001 From: EricLBuehler Date: Sun, 21 Jul 2024 10:05:17 -0400 Subject: [PATCH 1/2] Debugging --- mistralrs-pyo3/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mistralrs-pyo3/src/lib.rs b/mistralrs-pyo3/src/lib.rs index b6ed6646e..19f162f82 100644 --- a/mistralrs-pyo3/src/lib.rs +++ b/mistralrs-pyo3/src/lib.rs @@ -57,9 +57,11 @@ fn get_device() -> Result { fn get_device() -> Result { let mut device = METAL_DEVICE.lock().unwrap(); if let Some(device) = device.as_ref() { + dbg!(&device); return Ok(device.clone()); }; let res = Device::new_metal(0)?; + dbg!(&res); *device = Some(res.clone()); Ok(res) } From 367f55b8e62691b5f9d202e4e76485d4ff502ffb Mon Sep 17 00:00:00 2001 From: EricLBuehler Date: Mon, 22 Jul 2024 05:43:49 -0400 Subject: [PATCH 2/2] Use workspace for candle core --- mistralrs-pyo3/Cargo_template.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mistralrs-pyo3/Cargo_template.toml b/mistralrs-pyo3/Cargo_template.toml index ae85ece7d..5d93a1ea0 100644 --- a/mistralrs-pyo3/Cargo_template.toml +++ b/mistralrs-pyo3/Cargo_template.toml @@ -17,10 +17,10 @@ doc = false [dependencies] pyo3.workspace = true -mistralrs-core = { version = "0.2.0", path = "../mistralrs-core", features=["pyo3_macros","$feature_name"] } +mistralrs-core = { version = "0.2.0", path = "../mistralrs-core", features=["pyo3_macros", "$feature_name"] } serde.workspace = true serde_json.workspace = true -candle-core = { git = "https://github.com/EricLBuehler/candle.git", version = "0.6.0", rev = "c967be9", features=["$feature_name"] } +candle-core = { workspace = true, features=["$feature_name"] } indexmap.workspace = true accelerate-src = { workspace = true, optional = true } intel-mkl-src = { workspace = true, optional = true }