Skip to content

Commit e4c072b

Browse files
lucylqfacebook-github-bot
authored andcommitted
Add ExtraTensorInfo to schema.py
Summary: ^ Preparation for program-data separation, to use the fully_qualified_name. Differential Revision: D64573945
1 parent 290eed9 commit e4c072b

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

exir/schema.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,24 @@ class OptionalTensorList:
3535

3636
class TensorShapeDynamism(IntEnum):
3737
"""
38-
Check schema.fbs for explanations of this enum.
38+
Check program.fbs for explanations of this enum.
3939
"""
4040

4141
STATIC = 0
4242
DYNAMIC_BOUND = 1
4343
DYNAMIC_UNBOUND = 2
4444

4545

46+
@dataclass
47+
class ExtraTensorInfo:
48+
"""
49+
Check program.fbs for explanations of this enum.
50+
"""
51+
52+
mutable_data_segments_idx: Optional[int] = None
53+
fully_qualified_name: Optional[str] = None
54+
55+
4656
@dataclass
4757
class Tensor:
4858
scalar_type: ScalarType
@@ -54,8 +64,9 @@ class Tensor:
5464
data_buffer_idx: int
5565
allocation_info: Optional[AllocationDetails]
5666

57-
# check schema.fbs for explanations
67+
# check program.fbs for explanations.
5868
shape_dynamism: TensorShapeDynamism
69+
extra_tensor_info: Optional[ExtraTensorInfo] = None
5970

6071

6172
@dataclass

0 commit comments

Comments
 (0)