Skip to content
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

fix ArgAnnotation with boolean flag which instructs value semantics #3238

Merged
merged 2 commits into from
Apr 27, 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
8 changes: 4 additions & 4 deletions projects/pt1/python/torch_mlir_e2e_test/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def export(fn):
return fn


ArgAnnotation = Tuple[List[int], torch.dtype]
ArgAnnotation = Tuple[List[int], torch.dtype, bool]


# TODO: Replace with py3 extended argument annotations when available.
Expand All @@ -55,9 +55,9 @@ def annotate_args(annotations: List[Optional[ArgAnnotation]]):
The `annotations` should be a list of the same length as the number of
argument to the method (including `self`). Each list entry is either:
- None, corresponding to providing the compiler with no information.
- A 2-tuple consisting of a shape and a dtype, such as
`([2, 3, 4], torch.float32)`. A dimension with an unknown size can be
indicated by using `-1` as the size. This provides the compiler a
- A 3-tuple consisting of a shape, a dtype and a flag of value semantics,
such as `([2, 3, 4], torch.float32, True)`. A dimension with an unknown size
can be indicated by using `-1` as the size. This provides the compiler a
guarantee that the argument will always dynamically have the described
shape and dtype.
"""
Expand Down
Loading