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 vectorization pass for pooling max and update related files #448

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
fea9c50
[midend/lib/Conversion/ConvVectorization] add poolingnhwcmax vectoriz…
FloatingcloudKnight Nov 8, 2024
333625f
[examples/BuddyConvolution] update pooling-max-related tests
FloatingcloudKnight Nov 21, 2024
8dba4f0
[midend/lib/Conversion/ConvVectorization] Fix pooling max vectorizati…
FloatingcloudKnight Nov 24, 2024
87606d7
[midend/lib/Conversion/ConvVectorization] Fix pooling max vectorizati…
FloatingcloudKnight Nov 25, 2024
a4bc24f
Merge branch 'main' of https://github.com/buddy-compiler/buddy-mlir i…
FloatingcloudKnight Nov 25, 2024
cb9aeaa
[midend/lib/Conversion/ConvVectorization] Fix poolingnhwcmax vectoriz…
FloatingcloudKnight Nov 26, 2024
df98dd0
[midend/lib/Conversion/ConvVectorization] Fix poolingnhwcmax vectoriz…
FloatingcloudKnight Dec 2, 2024
7838000
[midend/lib/Conversion/ConvVectorization] Add poolingnhwcmax vectoriz…
FloatingcloudKnight Dec 19, 2024
899bba4
[midend/lib/Conversion/ConvVectorization] fix poolingnhwcmax vectoriz…
FloatingcloudKnight Dec 19, 2024
330b2bb
examples/BuddyConvolution/:
FloatingcloudKnight Dec 25, 2024
c08cdc6
[examples/BuddyNext] fixing pooling-nhwc-max-vec.mlir and adding make…
FloatingcloudKnight Dec 27, 2024
b48655f
[examples/BuddyNext] fixing pooling-nhwc-max-vec.mlir and adding make…
FloatingcloudKnight Dec 27, 2024
5131c79
Merge branch 'main' into poolingnhwcmax
FloatingcloudKnight Dec 27, 2024
40c48a0
[midend/lib/Conversion/ConvVectorization] fix some code style
FloatingcloudKnight Dec 27, 2024
35d4de3
Fix vectorization pass for pooling max and update related files
FloatingcloudKnight Jan 7, 2025
f2161e3
Merge branch 'buddy-compiler:main' into poolingnhwcmax
FloatingcloudKnight Jan 7, 2025
9233ea7
Merge branch 'poolingnhwcmax' of https://github.com/FloatingcloudKnig…
FloatingcloudKnight Jan 7, 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
6 changes: 3 additions & 3 deletions examples/BuddyNext/pooling-nhwc-max-vec.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ module {
}
affine.yield %6 : vector<32xf32>
}
vector.store %5, %arg2[%arg3, %arg4, %arg5, %arg6] : memref<?x?x?x?xf32>, vector<32xf32>
%dim_4_next = arith.addi %dim_4, %vl_step : index
scf.yield %dim_4_next : index
vector.store %5, %arg2[%arg3, %arg4, %arg5, %arg6] : memref<?x?x?x?xf32>, vector<32xf32>
%idx_next = arith.addi %arg6, %vl_step : index
scf.yield %idx_next : index
}
// Compute the tail size and Process the remaining elements
// using masked vector operations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class PoolingNhwcMaxVectorizationPattern : public ConversionPattern {
loc, tmp0.getResult(0), output,
ValueRange{ivs[0], ivs[1], ivs[2], iv});
Value idx =
builder.create<arith::AddIOp>(loc, itrArgs[0], vlStep);
builder.create<arith::AddIOp>(loc, iv, vlStep);
builder.create<scf::YieldOp>(loc, idx);
});
// Compute the tail size and Process the remaining elements
Expand Down
2 changes: 1 addition & 1 deletion tests/Conversion/pooling-nhwc-max-vectorization.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// CHECK-NEXT: affine.yield %12 : vector<16xf32>
// CHECK-NEXT: }
// CHECK-NEXT: vector.store %9, %arg2[%arg3, %arg4, %arg5, %arg6] : memref<?x?x?x?xf32>, vector<16xf32>
// CHECK-NEXT: %10 = arith.addi %arg7, %c16 : index
// CHECK-NEXT: %10 = arith.addi %arg6, %c16 : index
// CHECK-NEXT: scf.yield %10 : index
// CHECK-NEXT: }

Expand Down