Hi,
The issue you linked does mention that old version of magma have memory leaks. Make sure that you use a recent enough version of magma (and if you use pytorch binaries, the latest stable version or nightly).