How did you install magma-cuda112? If you’ve installed a conda packagge, did the install logs show that PyTorch would be downgraded to a CPU-only version?
If not, then I don’t think that magma-cuda112 should have influence in PyTorch being able to find a GPU.