mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 13:44:15 +08:00
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:
@ -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(); });
|
||||
|
Reference in New Issue
Block a user