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

Make VNNI more robust #1001

Merged
merged 26 commits into from
Jan 17, 2025
Merged

Make VNNI more robust #1001

merged 26 commits into from
Jan 17, 2025

Conversation

adam-smnk
Copy link
Contributor

@adam-smnk adam-smnk commented Jan 16, 2025

Improves VNNI validation and lit tests to be target independent w.r.t. VNNI blocking factor.

VNNI infrastructure is extended with DLTI support that allows to override target's default VNNI factor.
This allows to fix VNNI shape for lit testing to ensure that general pass logic works fine. This is primarily applied to tests that use prepacked VNNI shapes.

When possible, tests' checks are generalized to account for varying packing factor.
Test shapes are adjusted to prevent failure due to incompatible VNNI packing sizes compared to dimension size used for verification.

BF16 integration tests are now disabled on non-x86 systems to avoid runtime mismatch between prepacked shapes and microkernel requirements.

@adam-smnk adam-smnk added the benchmark Benchmark base targets label Jan 16, 2025
@adam-smnk
Copy link
Contributor Author

No performance regression.
Manually verified check-tpp passing on graviton.

lib/TPP/Dialect/Xsmm/XsmmOps.cpp Outdated Show resolved Hide resolved
include/TPP/Transforms/Utils/VNNIUtils.h Outdated Show resolved Hide resolved
lib/TPP/Transforms/Utils/VNNIUtils.cpp Outdated Show resolved Hide resolved
lib/TPP/Transforms/Utils/VNNIUtils.cpp Outdated Show resolved Hide resolved
lib/TPP/Transforms/Utils/VNNIUtils.cpp Outdated Show resolved Hide resolved
lib/TPP/Transforms/Utils/VNNIUtils.cpp Outdated Show resolved Hide resolved
lib/TPP/Transforms/Utils/VNNIUtils.cpp Outdated Show resolved Hide resolved
test/BF16/Integration/lit.local.cfg Show resolved Hide resolved
test/BF16/Integration/tpp-run-splat-shape.mlir Outdated Show resolved Hide resolved
@adam-smnk adam-smnk added benchmark Benchmark base targets and removed benchmark Benchmark base targets labels Jan 16, 2025
Copy link
Contributor

@rengolin rengolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make sure we resolve all comments, but LGTM. Thanks!

@adam-smnk
Copy link
Contributor Author

The API has been improved as suggested. Well, we'll still see in practice if it's good but already works better after this cleanup.

I will follow up with further cleanup to reenable integration tests. That might require more relaxed verification and probably improvements to some test cases. But let's do it separately to weigh tradeoffs properly.

Otherwise, should be fine.

@adam-smnk adam-smnk merged commit 815ce3f into libxsmm:main Jan 17, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
benchmark Benchmark base targets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants