Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BE] use torch.amp.autocast instead of torch.cuda.amp.autocast (pytor…
…ch#134291) torch.cuda.amp.autocast / torch.cpu.amp.autocast are deprecated and spew a ton of warnings when these tests run. This PR: Update to just use torch.amp.autocast(device). Note: this uncovers a bug in the test: when `device` is CUDA, it actually shows up as "cuda:0" - so previously, this test was _always_ using `torch.cpu.amp.autocast` even for `cuda` device. This PR fixes this, and uncovers additional bugs in `pinverse` and `linalg.pinv`; `linalg.pinv` was already failing before on CPU, but now the test also catches failures on CUDA, (and this PR adds to the skipped-test list). Pull Request resolved: pytorch#134291 Approved by: https://github.com/YuqingJ
- Loading branch information