mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
fix pickling for BitwiseFn (#163571)
Summary: ran into AttributeError: Can't get local object 'make_opaque_bitwise_fn.<locals>.BitwiseFn' looks like it was fixed for UnaryFn but not BitwiseFn in https://github.com/pytorch/pytorch/pull/138395 Fixes #147841 Pull Request resolved: https://github.com/pytorch/pytorch/pull/163571 Approved by: https://github.com/jamesjwu
This commit is contained in:
@ -1411,7 +1411,10 @@ def make_opaque_bitwise_fn(name, real_op_name):
|
||||
return sympy.Integer(getattr(operator, real_op_name)(int(a), int(b)))
|
||||
return None
|
||||
|
||||
BitwiseFn.__name__ = "BitwiseFn_" + name
|
||||
nm = "BitwiseFn_" + name
|
||||
BitwiseFn.__name__ = nm
|
||||
BitwiseFn.__qualname__ = nm
|
||||
|
||||
return BitwiseFn
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user