Skip to content

Commit

Permalink
Make sorted_nodes pub function (#2780)
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya authored Feb 22, 2025
1 parent 9e8bf70 commit 26c1692
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion candle-core/src/backprop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>(
Expand Down

0 comments on commit 26c1692

Please sign in to comment.