From 437d90e27e0fa1d88c6475e4d47aac1c7dd2a644 Mon Sep 17 00:00:00 2001 From: Liang-Chi Hsieh Date: Fri, 21 Feb 2025 12:04:50 -0800 Subject: [PATCH] Make sorted_nodes pub function --- candle-core/src/backprop.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/candle-core/src/backprop.rs b/candle-core/src/backprop.rs index d19f099f71..d8f1b78618 100644 --- a/candle-core/src/backprop.rs +++ b/candle-core/src/backprop.rs @@ -32,7 +32,7 @@ impl Tensor { /// elements having dependencies on the latter ones, e.g. the first element if any is the /// argument. /// This assumes that the op graph is a DAG. - fn sorted_nodes(&self) -> Vec<&Tensor> { + pub fn sorted_nodes(&self) -> Vec<&Tensor> { // The vec of sorted nodes is passed as an owned value rather than a mutable reference // to get around some lifetime limitations. fn walk<'a>(