Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Template
Checklist
cargo run-checkscommand has been executed.Related Issues/PRs
Changes
graph_cleanupmethod to theburn::tensor::backend::AutodiffBackendtrait.Testing
Example of usage:
Then by accompanying the system's ram usage, the memory usage doesn't grow (in case it's in the loop). Also, the are no vector/hashmaps/hashsets re-allocations, possibly improving runtime by a little.
I recently rebased the
graph-sweepbranch tomain, as I'm using it locally.In the current
main, the "hot loop stress test" (increased to 10 million iterations) eventually still has the ram going up to around ~1GB, whereasgraph-sweepleaves it limited at ~138kB. I haven't looked much into it why some nodes are missed onmain, but I suspect it could be related to Arc counting (but I'm not sure).Well, the reason why I created another PR is because all updates to the
graph-sweepbranch are ignored on the previous PR, because it is closed. And If the PR was already closed and if I rebased the branch (i.e. force-pushed the branch), I can no longer re-open it (-.-)', it appears to be a Github thing. So if it is ok, and contrary to what I did, I'd like to leave this PR open, even if it's open-ended.