mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Revert "Python Dispatcher integration with C++ dispatcher (#84826)"
This reverts commit 35f6a69191ef762cf22b6cbfe94b8d9406e16674.
Reverted https://github.com/pytorch/pytorch/pull/84826 on behalf of https://github.com/malfet due to Broke dynamo, see 35f6a69191
This commit is contained in:
@ -1713,11 +1713,13 @@ void initJITBindings(PyObject* module) {
|
||||
return _get_operation_for_overload_or_packet(
|
||||
{op}, symbol, args, kwargs, /*is_overload*/ true);
|
||||
});
|
||||
auto func_dk = py::cpp_function(
|
||||
[op, symbol, allow_numbers_as_tensors](
|
||||
c10::DispatchKey dk_, py::args args, py::kwargs kwargs) {
|
||||
auto func_dk =
|
||||
py::cpp_function([op, symbol, allow_numbers_as_tensors](
|
||||
const std::string& str_dk,
|
||||
py::args args,
|
||||
py::kwargs kwargs) {
|
||||
c10::optional<c10::DispatchKey> dk =
|
||||
c10::make_optional(dk_);
|
||||
c10::make_optional(c10::parseDispatchKey(str_dk));
|
||||
ToIValueAllowNumbersAsTensors g(allow_numbers_as_tensors);
|
||||
return _get_operation_for_overload_or_packet(
|
||||
{op}, symbol, args, kwargs, /*is_overload*/ true, dk);
|
||||
|
Reference in New Issue
Block a user