Running Pytorch on Azure GPU VM NV12ads_V12

Hello All,
I am facing issue on trying to run Pytorch on Windows GPU VM (Azure NV12ads_V12).
Which has GPU Partition 1/3 (8GB out of 24 GB is allocated to that VM).

Attaching a screenshot where I do very simple calculation.

But facing this error.

I have tried all the things that internet suggested,
With various pytorch versions and cuda versions as well but no luck.

Does anybody face the similar issue ?
What can be done to solve the issue ?

Thanks in Advance.

Your Windows driver seems to kill long running kernels as explained here. I don’t know if and how these thresholds can be changed as I’m not using Windows.