mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 02:38:10 +00:00
Make sorted_nodes pub function (#2780)
This commit is contained in:
@ -32,7 +32,7 @@ impl Tensor {
|
|||||||
/// elements having dependencies on the latter ones, e.g. the first element if any is the
|
/// elements having dependencies on the latter ones, e.g. the first element if any is the
|
||||||
/// argument.
|
/// argument.
|
||||||
/// This assumes that the op graph is a DAG.
|
/// 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
|
// The vec of sorted nodes is passed as an owned value rather than a mutable reference
|
||||||
// to get around some lifetime limitations.
|
// to get around some lifetime limitations.
|
||||||
fn walk<'a>(
|
fn walk<'a>(
|
||||||
|
Reference in New Issue
Block a user