-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[mlir][vector] Decouple unrolling gather and gather to llvm lowering #132206
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1663,7 +1663,7 @@ func.func @flat_transpose(%arg0: vector<16xf32>) -> vector<16xf32> { | |
|
||
func.func @gather_with_mask(%arg0: memref<?xf32>, %arg1: vector<2x3xi32>, %arg2: vector<2x3xf32>) -> vector<2x3xf32> { | ||
%0 = arith.constant 0: index | ||
%1 = vector.constant_mask [1, 2] : vector<2x3xi1> | ||
%1 = vector.constant_mask [2, 2] : vector<2x3xi1> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this test modified? I am asking as previously one of the outer lanes was masked out and currently it isn't. Is this significant? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi, this is mentioned in the PR summary: There are still tests for 2D vector.gather, but the constant mask for these test is modified. This is because with the updated lowering, one of the unrolled vector.gather disappears because it is masked off (also demonstrating why this is a better lowering path) It's to make sure that unrolling is actually producing 2 unrolled gathers. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah ok, now I see what you meant, thanks! |
||
%2 = vector.gather %arg0[%0][%arg1], %1, %arg2 : memref<?xf32>, vector<2x3xi32>, vector<2x3xi1>, vector<2x3xf32> into vector<2x3xf32> | ||
return %2 : vector<2x3xf32> | ||
} | ||
|
@@ -1677,9 +1677,9 @@ func.func @gather_with_mask(%arg0: memref<?xf32>, %arg1: vector<2x3xi32>, %arg2: | |
func.func @gather_with_mask_scalable(%arg0: memref<?xf32>, %arg1: vector<2x[3]xi32>, %arg2: vector<2x[3]xf32>) -> vector<2x[3]xf32> { | ||
%0 = arith.constant 0: index | ||
// vector.constant_mask only supports 'none set' or 'all set' scalable | ||
// dimensions, hence [1, 3] rather than [1, 2] as in the example for fixed | ||
// dimensions, hence [2, 3] rather than [2, 2] as in the example for fixed | ||
// width vectors above. | ||
%1 = vector.constant_mask [1, 3] : vector<2x[3]xi1> | ||
%1 = vector.constant_mask [2, 3] : vector<2x[3]xi1> | ||
%2 = vector.gather %arg0[%0][%arg1], %1, %arg2 : memref<?xf32>, vector<2x[3]xi32>, vector<2x[3]xi1>, vector<2x[3]xf32> into vector<2x[3]xf32> | ||
return %2 : vector<2x[3]xf32> | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.