From a2cb2edead523f9ee65ddac34f6e1946d52236b3 Mon Sep 17 00:00:00 2001 From: Laurent Mazare Date: Tue, 20 Feb 2024 19:54:13 +0100 Subject: [PATCH] Add a couple backtraces on cpu errors. (#1738) --- candle-core/src/cpu_backend.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/candle-core/src/cpu_backend.rs b/candle-core/src/cpu_backend.rs index 05e8c979a6..8ae39020fd 100644 --- a/candle-core/src/cpu_backend.rs +++ b/candle-core/src/cpu_backend.rs @@ -2575,7 +2575,7 @@ impl BackendStorage for CpuStorage { Self::U8(ids) => IndexSelect { ids, ids_l, dim }.map(self, l), Self::U32(ids) => IndexSelect { ids, ids_l, dim }.map(self, l), Self::I64(ids) => IndexSelect { ids, ids_l, dim }.map(self, l), - _ => Err(Error::UnsupportedDTypeForOp(self.dtype(), "index-select")), + _ => Err(Error::UnsupportedDTypeForOp(self.dtype(), "index-select").bt()), } } @@ -2584,7 +2584,7 @@ impl BackendStorage for CpuStorage { Self::U8(ids) => Gather { ids, ids_l, dim }.map(self, l), Self::U32(ids) => Gather { ids, ids_l, dim }.map(self, l), Self::I64(ids) => Gather { ids, ids_l, dim }.map(self, l), - _ => Err(Error::UnsupportedDTypeForOp(self.dtype(), "gather")), + _ => Err(Error::UnsupportedDTypeForOp(self.dtype(), "gather").bt()), } } @@ -2601,7 +2601,7 @@ impl BackendStorage for CpuStorage { Self::U8(ids) => ScatterAdd { ids, ids_l, dim }.map(self, l, src, src_l), Self::U32(ids) => ScatterAdd { ids, ids_l, dim }.map(self, l, src, src_l), Self::I64(ids) => ScatterAdd { ids, ids_l, dim }.map(self, l, src, src_l), - _ => Err(Error::UnsupportedDTypeForOp(self.dtype(), "scatter-add")), + _ => Err(Error::UnsupportedDTypeForOp(self.dtype(), "scatter-add").bt()), } }