Skip to content

[compiler-rt][AArch64][FMV] Use the hw.optional.arm.caps fast path #95275

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

Merged
merged 5 commits into from
Jun 14, 2024

Conversation

jroelofs
Copy link
Contributor

MacOS 15.0 and iOS 18.0 added a new sysctl to fetch a bitvector of all the hw.optional.arm.FEAT_*'s in one go. Using this has a perf advantage over doing multiple round-trips to the kernel and back, but since it's not present in older oses, we still need the slow fallback.

…en available.

MacOS 15.0 and iOS 18.0 added a new sysctl to fetch a bitvector of all the
hw.optional.arm.FEAT_*'s in one go.  Using this has a perf advantage over doing
multiple round-trips to the kernel and back, but since it's not present in
older oses, we still need the slow fallback.
Copy link

github-actions bot commented Jun 12, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

CHECK_BIT(CAP_BIT_FEAT_I8MM, FEAT_I8MM);
CHECK_BIT(CAP_BIT_FEAT_DIT, FEAT_DIT);
CHECK_BIT(CAP_BIT_FEAT_FP16, FEAT_FP16);
CHECK_BIT(CAP_BIT_FEAT_SSBS, FEAT_SSBS2);
Copy link
Collaborator

Choose a reason for hiding this comment

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

As I said on the other review SSBS2 implies SSBS.

Copy link
Collaborator

@labrinea labrinea left a comment

Choose a reason for hiding this comment

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

Looks good. I noticed MTE/2 are missing, perhaps other features too? Is that deliberate?

@jroelofs jroelofs merged commit 4f8c961 into llvm:main Jun 14, 2024
4 of 5 checks passed
@jroelofs jroelofs deleted the jroelofs/fmv-fast-path branch June 14, 2024 01:06
@saagarjha
Copy link
Contributor

Note that CAP_BIT_FEAT_SME/CAP_BIT_FEAT_SME2/CAP_BIT_FEAT_SME_F64F64/CAP_BIT_FEAT_SME_I16I64 are still stripped out of the public SDK, which breaks the build of compiler-rt :( I've filed FB13964283 to get those added but until then I'd also check for e.g. CAP_BIT_FEAT_SME before trying to use these.

@jroelofs
Copy link
Contributor Author

Oops. Thanks. I'll put up another PR.

@jroelofs
Copy link
Contributor Author

0c02811

AlexisPerry pushed a commit to llvm-project-tlp/llvm-project that referenced this pull request Jul 9, 2024
EthanLuisMcDonough pushed a commit to EthanLuisMcDonough/llvm-project that referenced this pull request Aug 13, 2024
…lvm#95275)

MacOS 15.0 and iOS 18.0 added a new sysctl to fetch a bitvector of all
the hw.optional.arm.FEAT_*'s in one go. Using this has a perf advantage
over doing multiple round-trips to the kernel and back, but since it's
not present in older oses, we still need the slow fallback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants