pytorch
e0d26ee0 - [vulkan] Throw std::runtime_error instead of using TORCH_CHECK when creating Vulkan context/runtime fails (#83627)

Commit
3 years ago
[vulkan] Throw std::runtime_error instead of using TORCH_CHECK when creating Vulkan context/runtime fails (#83627) Currently, if unable to load the global context/runtime, an error will be thrown using `TORCH_CHECK(false, ...)`. This diff changes it to throw a `std::runtime_error` directly instead. The reason for this is that `TORCH_CHECK()` will not preserve error messages `#ifdef STRIP_ERROR_MESSAGES`. However, it is more useful for the error reason to be always present for the purpose of diagnosing driver support issues and detecting if a model load failure is related to Vulkan. Differential Revision: [D38800348](https://our.internmc.facebook.com/intern/diff/D38800348/) Pull Request resolved: https://github.com/pytorch/pytorch/pull/83627 Approved by: https://github.com/salilsdesai
Author
ssjia
Committer
Parents
Loading