Pycharm Debug Evaluate Expression display incorrect torch.cuda.memory values

The following code works properly:

test = torch.randn((10, 10), device="cuda:0")
print(torch.cuda.memory_snapshot())
del test
print(torch.cuda.memory_snapshot())
torch.cuda.empty_cache()
print(torch.cuda.memory_snapshot())

But when I enter debug mode and try to run this from Evaluate Expression. The results are incorrect. Please check if some settings are to changed or is there any guidelines to use Evaluate Expression.

1 comment
Comment actions Permalink

Could you please provide exact steps to reproduce the issue and the incorrect result that you get?

0

Please sign in to leave a comment.