Skip to content

Autodiff Memory Management: BFS #4019

Autodiff Memory Management: BFS

Autodiff Memory Management: BFS #4019

Triggered via pull request April 30, 2024 18:06
Status Cancelled
Total duration 19m 9s
Artifacts

test.yml

on: pull_request
check-typos
21s
check-typos
Matrix: tests
Fit to window
Zoom out
Zoom in

Annotations

6 errors
check-typos
Process completed with exit code 2.
[clippy] crates/burn-autodiff/src/runtime/memory_management.rs#L130: crates/burn-autodiff/src/runtime/memory_management.rs#L130
error: this `else { if .. }` block can be collapsed --> crates/burn-autodiff/src/runtime/memory_management.rs:130:24 | 130 | } else { | ________________________^ 131 | | if let Some(caller_id) = caller_id { 132 | | let caller_status = self 133 | | .statuses ... | 140 | | } 141 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if = note: `-D clippy::collapsible-else-if` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::collapsible_else_if)]` help: collapse nested if block | 130 ~ } else if let Some(caller_id) = caller_id { 131 + let caller_status = self 132 + .statuses 133 + .get(&caller_id) 134 + .expect("Caller should have status"); 135 + if let NodeMemoryStatus::Useful = caller_status { 136 + self.statuses.insert(node_id, NodeMemoryStatus::Useful); 137 + visited_as_useful.insert(node_id); 138 + } 139 + } |
[clippy] crates/burn-autodiff/src/runtime/memory_management.rs#L151: crates/burn-autodiff/src/runtime/memory_management.rs#L151
error: this `if` statement can be collapsed --> crates/burn-autodiff/src/runtime/memory_management.rs:151:17 | 151 | / if !visited_as_useful.contains(&parent) { 152 | | if Some(&NodeMemoryStatus::Useful) == self.statuses.get(&node_id) 153 | | || !visited_as_unknown.contains(&parent) 154 | | { 155 | | to_visit.push((parent, Some(node_id))); 156 | | } 157 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if = note: `-D clippy::collapsible-if` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::collapsible_if)]` help: collapse nested if block | 151 ~ if !visited_as_useful.contains(&parent) && (Some(&NodeMemoryStatus::Useful) == self.statuses.get(&node_id) || !visited_as_unknown.contains(&parent)) { 152 + to_visit.push((parent, Some(node_id))); 153 + } |
[clippy] crates/burn-autodiff/src/runtime/memory_management.rs#L114: crates/burn-autodiff/src/runtime/memory_management.rs#L114
error: using `clone` on type `NodeID` which implements the `Copy` trait --> crates/burn-autodiff/src/runtime/memory_management.rs:114:39 | 114 | leaves.iter().map(|leaf| (leaf.clone(), None)).collect(); | ^^^^^^^^^^^^ help: try dereferencing it: `*leaf` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy = note: `-D clippy::clone-on-copy` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::clone_on_copy)]`
tests (ubuntu-22.04, stable, std)
Canceling since a higher priority waiting request for 'test-refs/pull/1710/merge' exists
tests (ubuntu-22.04, stable, std)
The operation was canceled.