Closed phdenzel closed 5 months ago
Thanks for the additions. The code looks good to me, will test it tomorrow.
Note: I had problems running multiple test functions with MPS... I had to cache the MPSMemoryAllocationVisitor
instance and access it via pytest.fixture
, otherwise the 2nd instance wouldn't fetch any stats.
If you have an idea why this happens, let me know...
Note: I had problems running multiple test functions with MPS... I had to cache the
MPSMemoryAllocationVisitor
instance and access it viapytest.fixture
, otherwise the 2nd instance wouldn't fetch any stats. If you have an idea why this happens, let me know...
I think that's related to how PyTorch hooks work. I have also noticed similar issues in other projects.
Added a few more lines in the
debug
module:visitor.Visitor.report
: instances can now use.report()
to retrieve a memory report printout of visited modulesVisitor
class to avoid code duplicationMPSMemoryAllocationVisitor
classCudaMemoryStatsVisitor
class