You might have allocations outside the PyTorch memory allocator. I think the cuda context itself isn’t showing as a PyTorch allocation 2, if I interpret @ptrblck’s comment correctly.
Best regards
Thomas