Revert "[CustomOp] Add Dispatcher error callback (#101015)"

This reverts commit c0e5d7e7fee31c332f1cf3d3e4d2305cc1d07bba.

Reverted https://github.com/pytorch/pytorch/pull/101015 on behalf of https://github.com/huydhn due to Revert this as the earlier commits in the stack have been reverted ([comment](https://github.com/pytorch/pytorch/pull/101015#issuecomment-1548476583))
This commit is contained in:
PyTorch MergeBot
2023-05-15 19:49:53 +00:00
parent 4b9bc6f2a6
commit 7912b34789
10 changed files with 0 additions and 100 deletions

View File

@ -688,14 +688,6 @@ void initDispatchBindings(PyObject* module) {
return names;
},
py::arg("dispatch_key") = static_cast<const char*>(""));
m.def(
"_dispatch_set_report_error_callback",
[](c10::OperatorHandle& handle, py::object callback) {
auto obj = callback.release().ptr();
auto callback_obj =
std::make_unique<c10::SafePyObject>(obj, getPyInterpreter());
handle.setReportErrorCallback_(std::move(callback_obj));
});
m.def(
"_dispatch_is_main_interpreter", []() { return isMainPyInterpreter(); });