-
Notifications
You must be signed in to change notification settings - Fork 77
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
dialects: (vector) Add for vector.transfer_read
and vector.transfer_write
operations
#3650
base: main
Are you sure you want to change the base?
Conversation
Fixed bug in TensorOrMemrefOf.verify (?)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3650 +/- ##
==========================================
- Coverage 91.30% 91.29% -0.01%
==========================================
Files 466 466
Lines 58357 58541 +184
Branches 5624 5649 +25
==========================================
+ Hits 53283 53447 +164
- Misses 3627 3640 +13
- Partials 1447 1454 +7 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo comments
if isinstance(attr, VectorType) or isinstance(attr, TensorType): | ||
attr = cast(VectorType[Attribute] | TensorType[Attribute], attr) | ||
if isinstance(attr, MemRefType) or isinstance(attr, TensorType): | ||
attr = cast(MemRefType[Attribute] | TensorType[Attribute], attr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind moving this to a separate PR with a test case?
We seem to be lacking any verification testing on this type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing the changes, I'd still recommend doing this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will do that in the next few days
vector.transfer_read
and vector.transfer_write
operations
….transfer_write" ops This blew up and should now be several PRs
…or.transfer_write" ops
…ArrayAttr[BoolAttr] instead of a IntegerAttr
|
vector.transfer_*: Disabled mask and inferred_mask comparison for now until VectorType is fixed
…ead_transfer_write_ops
|
You can always verify what is currently here and document what deviates (as you have done), this is fine IMHO. Thanks for the work so far! |
Transferred more filecheck tests for transfer ops from MLIR
Added the (now mandatory) in_bounds property
xdsl/dialects/vector.py
Outdated
# WJOG9GVF: TODO fix: uncomment this when 7S4F0FZA has been fixed | ||
# if mask_type: | ||
# if mask_type != inferred_mask_type: | ||
# raise VerifyException( | ||
# f'"{op.name}" inferred mask type ({inferred_mask_type}) and mask operand type ({mask_type}) don\'t match' | ||
# ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as below. I will move it to a new pull request
xdsl/dialects/vector.py
Outdated
# 7S4F0FZA | ||
# TODO uncomment and test this once VectorType has been fixed, see issue #3654 | ||
# When you do this also fix all WJOG9GVF | ||
|
||
# inverse_permutation_map = affine_map.compress_dims( | ||
# affine_map.unused_dims_bit_vector() | ||
# ).inverse_permutation() | ||
|
||
# assert inverse_permutation_map | ||
|
||
# mask_shape = inverse_permutation_map.compose_with_values(vector_type.get_shape()) | ||
|
||
# scalable_dims = inverse_permutation_map.eval( | ||
# [1 if dim_scalable else 0 for dim_scalable in vector_type.get_scalable_dims()], | ||
# [], | ||
# ) | ||
|
||
# return VectorType( | ||
# i1, | ||
# mask_shape, | ||
# [dim_scalable == 1 for dim_scalable in scalable_dims], | ||
# ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is issue #3654
As soon as this is fixed the code above can be uncommented. I can remove it but then how should I document this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can move it to a new pull request and link it to the issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes do you think you have the bandwidth to fix this also? I have a feeling that this PR could be a draft until the other points are fixed, would help calibrate how pedantic the reviewers should be when looking at this one :)
xdsl/dialects/vector.py
Outdated
""" | ||
TODO test | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I will clean that up
xdsl/dialects/vector.py
Outdated
|
||
irdl_options = [AttrSizedOperandSegments(as_property=True), ParsePropInAttrDict()] | ||
|
||
# assembly_format = "$source `[` $indices `]` `,` $padding ( `,` $mask^ )? attr-dict `:` type($source) `,` type($result)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will clean that up
…ead_transfer_write_ops
…nd depend on issue xdslproject#3654 to be fixed
Added stubs for "vector.transfer_read" and "vector.transfer_write".
Verification is missing but that also seems to be a lot of work.
Also fixed a small bug in TensorOrMemrefOf.verify (?)