mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Summary: Class FQN is needed when unpacking CustomObj instance. For all other Arguments, e.g. Tensor, TensorList, SymInt, we always know their exact type. However, CustomObjArgument had an opaque type. Adding this field also helps unveiling the type of this opaque object. Test Plan: CI Differential Revision: D53029847 Pull Request resolved: https://github.com/pytorch/pytorch/pull/118158 Approved by: https://github.com/zhxchen17
17 lines
296 B
Python
17 lines
296 B
Python
from dataclasses import dataclass
|
|
|
|
|
|
__all__ = ["ScriptObjectMeta"]
|
|
|
|
|
|
@dataclass
|
|
class ScriptObjectMeta:
|
|
"""
|
|
Metadata which is stored on nodes representing ScriptObjects.
|
|
"""
|
|
|
|
# Key into constants table to retrieve the real ScriptObject.
|
|
constant_name: str
|
|
|
|
class_fqn: str
|