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

Enable ukernels on remaining aarch64 targets #19901

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

bjacob
Copy link
Contributor

@bjacob bjacob commented Feb 4, 2025

As newer aarch64 targets increasingly support SVE and SME, this clause was preventing ukernels from being used in cases where they do speed things up. The reason why this logic was out of place here is that what it controls here is the enablement of ukernels, which are a detail of lowering an already tiled workload. If we wanted to use SVE with a variable vector length, or with a fixed vector length different from NEON's 128bit, that decision needed to be made earlier; conversely, if the workload at this point already has the right shaped to be matched to a NEON ukernel, then SVE is not relevant to it anymore.

FYI @ziereis , this results in substantially faster code in your test case from #19873.

Signed-off-by: Benoit Jacob <jacob.benoit.1@gmail.com>
@bjacob bjacob requested review from hanhanW and Max191 February 4, 2025 17:37
@bjacob bjacob marked this pull request as ready for review February 4, 2025 17:37
Copy link
Contributor

@hanhanW hanhanW left a comment

Choose a reason for hiding this comment

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

cc @banach-space you're able to disable the ukernels with --iree-llvmcpu-enable-ukernels=none flag. The decision of whether using data-tiling is in

static SmallVector<TileMxNxK> enumerateMatmulTileArm64(TypeRange elementTypes,
DictionaryAttr config) {
// Data-tiling for SVE is not implemented yet.
if (hasFeature(config, "+sve") || hasFeature(config, "+sve2")) {
return {};
}

@bjacob bjacob enabled auto-merge (squash) February 4, 2025 17:55
@bjacob bjacob merged commit eb19497 into iree-org:main Feb 4, 2025
42 checks passed
@banach-space
Copy link
Collaborator

cc @banach-space you're able to disable the ukernels with --iree-llvmcpu-enable-ukernels=none flag. The decision of whether using data-tiling is in

static SmallVector<TileMxNxK> enumerateMatmulTileArm64(TypeRange elementTypes,
DictionaryAttr config) {
// Data-tiling for SVE is not implemented yet.
if (hasFeature(config, "+sve") || hasFeature(config, "+sve2")) {
return {};
}

Thanks for the ping 🙏🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants