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

osx-arm64 optimal code generation #41128

Open
sdmaclea opened this issue Aug 20, 2020 · 8 comments
Open

osx-arm64 optimal code generation #41128

sdmaclea opened this issue Aug 20, 2020 · 8 comments
Assignees
Labels
arch-arm64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI os-macos-bigsur (macOS11)
Milestone

Comments

@sdmaclea
Copy link
Contributor

sdmaclea commented Aug 20, 2020

The Apple Silicon dev kit reports the following hardware features.

$ sysctl-a | grep hw.optional
hw.optional.floatingpoint: 1                                                   
hw.optional.watchpoint: 4           
hw.optional.breakpoint: 6                                                      
hw.optional.neon: 1                
hw.optional.neon_hpfp: 1              
hw.optional.neon_fp16: 1                                                       
hw.optional.armv8_1_atomics: 1  
hw.optional.armv8_crc32: 1                                                     
hw.optional.armv8_2_fhm: 0                                                     
hw.optional.amx_version: 0           
hw.optional.ucnormal_mem: 0                                                    
hw.optional.arm64: 1                                                           

I believe there is at least draft support for armv8_1_atomics, but given these are performance critical we should try to make sure we have used them in any perf critical code.

I believe we have enabled armv8_crc32 intrinsics

@tannergooding was looking for half precision floating point for AI work. Given that it is supported here it might be good to at least add the intrinsics. Maybe consider higher level support too.

category:cq
theme:vector-codegen
skill-level:expert
cost:large
impact:large

@sdmaclea sdmaclea added arch-arm64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI os-macos-bigsur (macOS11) labels Aug 20, 2020
@sdmaclea sdmaclea added this to the 6.0.0 milestone Aug 20, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Aug 20, 2020
@BruceForstall BruceForstall removed the untriaged New issue has not been triaged by the area owner label Aug 24, 2020
@BruceForstall
Copy link
Member

@echesakovMSFT Arm64 intrinsics and Apple silicon

@echesakov
Copy link
Contributor

@sdmaclea Does it support ARMv8.3-CompNum ? I was planning to work on these too.

@sdmaclea
Copy link
Contributor Author

The above list was unabridged. It is not on the list on the Apple Silicon prototype. We will have to see what is on the commercial hardware.

@BruceForstall BruceForstall added the JitUntriaged CLR JIT issues needing additional triage label Oct 28, 2020
@BruceForstall BruceForstall removed the JitUntriaged CLR JIT issues needing additional triage label Nov 10, 2020
@JulieLeeMSFT JulieLeeMSFT added the needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration label Mar 23, 2021
@JulieLeeMSFT JulieLeeMSFT removed the needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration label Jun 7, 2021
@sandreenko sandreenko modified the milestones: 6.0.0, 7.0.0 Jul 19, 2021
@JulieLeeMSFT
Copy link
Member

@kunalspathak this is related to atomics. Please feel free to move to .NET 8.

@kunalspathak
Copy link
Member

Yes. I will update this with my work.

@kunalspathak
Copy link
Member

We have handled atomics in #71512. But I would like to keep this issue open for more features enable. I will move this to 8.0

@kunalspathak kunalspathak modified the milestones: 7.0.0, 8.0.0 Jul 8, 2022
@neon-sunset
Copy link
Contributor

neon-sunset commented Jul 12, 2022

We have handled atomics in #71512. But I would like to keep this issue open for more features enable. I will move this to 8.0

If it helps, other features are detected on osx-arm64 since 3580ba7
While it doesn't cover everything reported like Sha3 and Sha512, which might get support in JIT similar to other cryptography intrinsics, I guess all existing ARM-specific features are taken advantage of more or less since xplat Vector64/128/256 changes.

p.s.: Since 12.0, now in 13.0 Beta 3, the only new sysctl -a hw.optional line is hw.optional.arm.FEAT_DIT: 1 which is security specific and seems to be untouched for now (see https://lore.kernel.org/all/20210211125900.22777-5-peter.maydell@linaro.org/ and golang/go#49702)

@kunalspathak
Copy link
Member

Don't think anything actionable will be done in .NET 8.

@kunalspathak kunalspathak modified the milestones: 8.0.0, Future Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-arm64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI os-macos-bigsur (macOS11)
Projects
None yet
Development

No branches or pull requests

9 participants