mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[Export] Add math module for deserialization (#154643)
Summary: As title Test Plan: ci Differential Revision: D75580646 Pull Request resolved: https://github.com/pytorch/pytorch/pull/154643 Approved by: https://github.com/yushangdi
This commit is contained in:
parent
fc0135ca11
commit
802ffd06c8
|
|
@ -1713,6 +1713,9 @@ class GraphModuleDeserializer(metaclass=Final):
|
|||
elif serialized_target.startswith("torch"):
|
||||
module = torch # type: ignore[misc]
|
||||
serialized_target_names = serialized_target.split(".")[1:]
|
||||
elif serialized_target.startswith("math"):
|
||||
module = math # type: ignore[misc]
|
||||
serialized_target_names = serialized_target.split(".")[1:]
|
||||
elif serialized_target.startswith("#"):
|
||||
return self.deserialize_extension_operator(serialized_target)
|
||||
else: # TODO(zhxchen17) Don't catch all here.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user