diff --git a/candle-core/src/backprop.rs b/candle-core/src/backprop.rs index d19f099f7..d8f1b7861 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>(