pytorch
ced9edba - [Torch Device][c10] Fix the expected torch device error message (#36446)

Commit
4 years ago
[Torch Device][c10] Fix the expected torch device error message (#36446) Summary: This PR made the expected torch device string error message to include `xla` as the acceptable torch device prefix string. Pull Request resolved: https://github.com/pytorch/pytorch/pull/36446 Test Plan: No Logic changed, and made sure `xla` is acceptable in `torch.device`. ``` import torch device = torch.device("xla") ``` ``` device = torch.device("unrecognized") RuntimeError: Expected one of cpu, cuda, mkldnn, opengl, opencl, ideep, hip, msnpu, xla device type at start of device string: unrecognized ``` Differential Revision: D20993449 Pulled By: dahsh fbshipit-source-id: 83afe4f913a650a655bfda9c2a64bf9e5aa27e16
Author
Parents
Loading