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

Canonicalization of TTIR ops #1670

Merged
merged 27 commits into from
Jan 15, 2025
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c220d64
Canonicalizer pass
azecevicTT Dec 2, 2024
baca4ef
TTIR constant materialization
azecevicTT Dec 8, 2024
7be06fd
Refactoring of traits
azecevicTT Dec 8, 2024
b25fd4b
TransposeOp canonicalization
azecevicTT Dec 8, 2024
78df85f
GetDimensionSizeOp removed from decomp and realized through fold + ma…
azecevicTT Dec 9, 2024
0c19ed5
Refactoring of verification-folding order
azecevicTT Dec 9, 2024
45372b2
TTIR_BinaryIdempotence trait
azecevicTT Dec 9, 2024
fd1cbe5
Added tests for canonicalizer
azecevicTT Dec 9, 2024
5c00820
Refactoring of traits
azecevicTT Dec 8, 2024
a589c30
Added canonicalization for ReverseOp
azecevicTT Dec 23, 2024
8804e4e
BitwiseXor canonicalization
azecevicTT Dec 24, 2024
45eaa42
Refactoring of TTIRTraits
azecevicTT Dec 24, 2024
6ed4e83
Permute canonicalizer
azecevicTT Dec 24, 2024
22ecaa6
LinearOp canonicalization when bias is null
azecevicTT Dec 25, 2024
9a2c457
PermuteOp canononicalization bug fix
azecevicTT Dec 26, 2024
3c98ab1
ReverseOp tests
azecevicTT Dec 26, 2024
78130c4
PermuteOp composition bug fix
azecevicTT Dec 26, 2024
0cc665b
BitwiseXor tests
azecevicTT Dec 26, 2024
a505855
Removed linear -> matmul case from linear tests
azecevicTT Dec 26, 2024
b48eee1
Canonicalize pass both before and after decomposition pass
azecevicTT Dec 26, 2024
16a9531
LinearOp folder
azecevicTT Dec 26, 2024
cb83f43
Refactoring of TTIRTraits.cpp
azecevicTT Dec 26, 2024
dcf62d8
Lint fix
azecevicTT Dec 26, 2024
00d0318
Update BroadcastOp folding
azecevicTT Jan 13, 2025
941dfba
Addressing comment
azecevicTT Jan 13, 2025
8f74d24
BroadcastOp canonicalization test
azecevicTT Jan 15, 2025
265310a
Additional TransposeOp pattern with test
azecevicTT Jan 15, 2025
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
Prev Previous commit
Next Next commit
BitwiseXor tests
azecevicTT committed Jan 13, 2025
commit 0cc665b315fc00f28d6b2f7fae6ade28e553f8f3
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// RUN: ttmlir-opt -canonicalize %s | FileCheck %s
module {
func.func @bitwise_xor_integer(%arg0: tensor<64x128xui16>) -> tensor<64x128xui16> {
// CHECK-NOT: "ttir.bitwise_xor"
// CHECK: "ttir.constant"
// CHECK-SAME: value = dense<0> : tensor<64x128xui16>
// CHECK-NOT: "ttir.bitwise_xor"
%0 = tensor.empty() : tensor<64x128xui16>
%1 = "ttir.bitwise_xor"(%arg0, %arg0, %0) <{operandSegmentSizes = array<i32: 2, 1>}> : (tensor<64x128xui16>, tensor<64x128xui16>, tensor<64x128xui16>) -> tensor<64x128xui16>
return %1 : tensor<64x128xui16>
}

func.func @bitwise_xor_float(%arg0: tensor<64x128xbf16>) -> tensor<64x128xbf16> {
// CHECK-NOT: "ttir.bitwise_xor"
// CHECK: "ttir.constant"
// CHECK-SAME: value = dense<0.000000e+00> : tensor<64x128xbf16>
// CHECK-NOT: "ttir.bitwise_xor"
%0 = tensor.empty() : tensor<64x128xbf16>
%1 = "ttir.bitwise_xor"(%arg0, %arg0, %0) <{operandSegmentSizes = array<i32: 2, 1>}> : (tensor<64x128xbf16>, tensor<64x128xbf16>, tensor<64x128xbf16>) -> tensor<64x128xbf16>
return %1 : tensor<64x128xbf16>
}
}