Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

Update tensor.py -> fix severe memory leaking issue!#4

Open
HectorHHZ wants to merge 1 commit into
llmsystem:mainfrom
HectorHHZ:patch-5
Open

Update tensor.py -> fix severe memory leaking issue!#4
HectorHHZ wants to merge 1 commit into
llmsystem:mainfrom
HectorHHZ:patch-5

Conversation

@HectorHHZ
Copy link
Copy Markdown

The requires_grad_ function does not respect the input flag x. This means no matter I intend to require gradients or not, histories are preserved and gradients will be computed. This can lead to severe memory "leak" over the training process since the system never releases unnecessary tensors. bug fixed

The requires_grad_ function does not respect the input flag x. This means no matter I intend to require gradients or not, histories are preserved and gradients will be computed. This can lead to severe memory "leak" over the training process since the system never releases unnecessary tensors. bug fixed
@HectorHHZ
Copy link
Copy Markdown
Author

the bug leads to the severe memory usage in assignment 3 and assignment 2, the RAM usage will easily get hundreds of gigabytes during training.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant