Move implementation of CUDA error handling to Exceptions.cpp (#72958)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/72958
Please note, that it must not depend on any of the symbols from CUDA libraries
Test Plan: Imported from OSS
Reviewed By: gchanan
Differential Revision: D34296428
Pulled By: malfet
fbshipit-source-id: ec46f0b847db39977187a8439e941085fd1dc8f5
(cherry picked from commit 3918339e04aa9ff8ee8d18fed07633f943799978)