Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mem leak when updates P #13

Open
CXianRen opened this issue Dec 21, 2024 · 0 comments
Open

Mem leak when updates P #13

CXianRen opened this issue Dec 21, 2024 · 0 comments

Comments

@CXianRen
Copy link

Test environment:
A100-40G
Cuda: 12.1
Torch: 2.1.2

We found memory increases linearly when updates Pl in our environment.

A fix works for me:

              with torch.no_grad():
                  self.Pl = torch.sub(self.Pl, torch.mm(k, torch.t(k)) / (alpha + torch.mm(k, r)))
                  pnorm2 = torch.norm(self.Pl.data, p='fro')
                  self.Pl.data = self.Pl.data / pnorm2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant