Hello, @Simranjeet Singh !
I haven't been able to run into the issues you are describing. This is the setup I used:
- Image: NVIDIA GPU-Optimized PyTorch Image - v21.06.0 - Gen2 (Azure Marketplace link)
- VM SKU: Standard_NV12s.v3
After restarting the VM, I'm still able to see the GPU:
I would try using the same image and see if you still encounter this issue.