Skip to content

Add ExtraTensorInfo to schema.py #6418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions exir/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,24 @@ class OptionalTensorList:

class TensorShapeDynamism(IntEnum):
"""
Check schema.fbs for explanations of this enum.
Check program.fbs for explanations of this enum.
"""

STATIC = 0
DYNAMIC_BOUND = 1
DYNAMIC_UNBOUND = 2


@dataclass
class ExtraTensorInfo:
"""
Check program.fbs for explanations of this enum.
"""

mutable_data_segments_idx: Optional[int] = None
fully_qualified_name: Optional[str] = None


@dataclass
class Tensor:
scalar_type: ScalarType
Expand All @@ -54,8 +64,9 @@ class Tensor:
data_buffer_idx: int
allocation_info: Optional[AllocationDetails]

# check schema.fbs for explanations
# check program.fbs for explanations.
shape_dynamism: TensorShapeDynamism
extra_tensor_info: Optional[ExtraTensorInfo] = None


@dataclass
Expand Down
Loading