-
Notifications
You must be signed in to change notification settings - Fork 13
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
Delinearize indexing #318
Delinearize indexing #318
Conversation
test/lit_tests/raising/multidim.mlir
Outdated
// CHECK-SAME: %[[VAL_0:[^:]*]]: memref<?x5x3xi64, 1>) { | ||
// CHECK: %[[VAL_1:.*]] = arith.constant 1 : i64 | ||
// CHECK: affine.parallel (%[[VAL_2:.*]], %[[VAL_3:.*]], %[[VAL_4:.*]]) = (0, 0, 0) to (7, 5, 3) { | ||
// CHECK: affine.store %[[VAL_1]], %[[VAL_0]]{{\[}}%[[VAL_2]] + (%[[VAL_3]] + %[[VAL_4]] floordiv 3) floordiv 5, (%[[VAL_3]] + %[[VAL_4]] floordiv 3) mod 5, %[[VAL_4]] mod 3] : memref<?x5x3xi64, 1> |
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 outer one should get simplified to floordiv 15, right?
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.
we also ideally want to be able to remove val4 floordiv3 -> 0 [since its always less than 3]
1048d8e
to
37685a9
Compare
// CHECK-SAME: %[[VAL_0:[^:]*]]: memref<?x5x3xi64, 1>) { | ||
// CHECK: %[[VAL_1:.*]] = arith.constant 1 : i64 | ||
// CHECK: affine.parallel (%[[VAL_2:.*]], %[[VAL_3:.*]], %[[VAL_4:.*]]) = (0, 0, 0) to (7, 5, 3) { | ||
// CHECK: affine.store %[[VAL_1]], %[[VAL_0]]{{\[}}%[[VAL_2]], %[[VAL_3]], %[[VAL_4]]] : memref<?x5x3xi64, 1> |
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.
@wsmoses Now we manage to eliminate all floordiv and mod.
I think I fixed the crash and it should be good now |
No description provided.