-
Notifications
You must be signed in to change notification settings - Fork 42
Memory blowup #10
Comments
This seems to be some kind of circular reference between the Python Fsa object and the function object for get_tot_scores (or its ctx), whereby an Fsa and the most recent _GetTotScoresFunction used on it are not deleted. Still debugging. |
It's strange that
|
It maybe just isn't being printed for some reason. It seems the problem is that the Fsa has the attribute e.g. 'tot_scores_tropical' which has a grad_fn _GetTotScoresFunctionBackward, which has a reference to the Fsa in its ctx. |
So what if we invoke |
That's an interesting idea but I don't like the solution because it will cause a leak if someone doesn't end up calling backward, e.g. because of a problem that required abandoning the minibatch. |
I am leaning towards, in the short term, just not having the FSA cache the total scores. |
Renaming is fine with me. |
I am working on this. |
Right now we are dealing with an issue in train.py where it uses more and more memory. It seems like stuff isn't getting freed that should be getting freed.
The text was updated successfully, but these errors were encountered: