mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-06 17:49:07 -05:00
[PR #1123] [MERGED] Remove unused next_functions from Function class #3755
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/harvard-edge/cs249r_book/pull/1123
Author: @profvjreddi
Created: 1/20/2026
Status: ✅ Merged
Merged: 1/20/2026
Merged by: @profvjreddi
Base:
dev← Head:fix/1122-remove-unused-next-functions📝 Commits (1)
0497d10Remove unused next_functions from Function class📊 Changes
1 file changed (+0 additions, -10 deletions)
View changed files
📝
tinytorch/src/06_autograd/06_autograd.py(+0 -10)📄 Description
Summary
Removes the unused next_functions attribute from the Function class in the autograd module. This attribute was declared and populated but never actually used in the backward pass.
Context
This addresses the question raised in #1122 by @AmirAlasady, who correctly identified that self.next_functions is declared but never used. The backward() method uses saved_tensors directly to propagate gradients, making next_functions dead code.
Why remove it
Testing
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.