Thanks a lot @Ashwin_Raju. I can reproduce the issue on PyTorch 1.0.0 and on PyTorch master.
And indeed, it’s the same error as https://github.com/pytorch/pytorch/issues/11732 186 (I checked the stack-trace).
I’m going to file it as a blocker for 1.0.1 which is due in ~15 days, and fix the issue.