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

[midend/lib/Conversion/ConvVectorization] add poolingnhwcmax vectorization pass and add relevant examples and tests. #430

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

FloatingcloudKnight
Copy link
Contributor

@FloatingcloudKnight FloatingcloudKnight commented Nov 8, 2024

Add poolingnhwcmax vectorization pass and add relevant examples and tests.

examples/BuddyConvolution/:
linalg-pooling-nhwc-max.mlir: Linalg Dialect handwritten mlir;
conv2d-nhwc-fhwc-vec.mlir: Vector Dialect handwritten mlir file;
makefile update related commands.

midend/lib/Conversion/ConvVectorizationn/: PoolingNhwcMaxVectorization.cpp implements vectorisation.

tests/Conversion/:
pooling-nhwc-max-vectorisation.mlir: a test file.

Before vectorisation optimization: 1.71661e-05, after vectorization optimization: 1.09673e-05 (vectorization size is 32), speedup ratio is 0.565. The amount of data in the example is small and the optimization effect is not obvious.

…ation pass and add relevant examples and tests.
linalg-pooling-nhwc-max.mlir: Linalg Dialect handwritten mlir;
conv2d-nhwc-fhwc-vec.mlir: Vector Dialect handwritten mlir file;
makefile update related commands.

midend/lib/Conversion/ConvVectorizationn/: PoolingNhwcMaxVectorization.cpp implements vectorisation.

tests/Conversion/:
pooling-nhwc-max-vectorisation.mlir: a test file.

Before vectorisation optimization: 1.71661e-05, after vectorization optimization: 1.09673e-05 (vectorization size is 32), speedup ratio is 0.454. The amount of data in the example is small and the optimization effect is not obvious.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants