Skip to content

osx-arm64 optimal code generation #41128

Open

Description

@sdmaclea

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

Activity

  1. added
    area-CodeGen-coreclr
    on Aug 20, 2020
  2. added this to the 6.0.0 milestone on Aug 20, 2020
  3. added
    untriaged
    on Aug 20, 2020
  4. removed
    untriaged
    on Aug 24, 2020
  5. BruceForstall commented on Oct 10, 2020

    @BruceForstall
    Contributor

    @echesakovMSFT Arm64 intrinsics and Apple silicon

  6. echesakov commented on Oct 10, 2020

    @echesakov
    Contributor

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

  7. sdmaclea commented on Oct 10, 2020

    @sdmaclea
    ContributorAuthor

    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.

  8. added
    JitUntriaged
    on Oct 28, 2020
  9. removed
    JitUntriaged
    on Nov 10, 2020
  10. added
    needs-further-triage
    on Mar 23, 2021
  11. removed
    needs-further-triage
    on Jun 7, 2021
  12. modified the milestones: 6.0.0, 7.0.0 on Jul 19, 2021
  13. JulieLeeMSFT commented on Jun 14, 2022

    @JulieLeeMSFT
    Member

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

  14. kunalspathak commented on Jun 14, 2022

    @kunalspathak
    Contributor

    Yes. I will update this with my work.

  15. kunalspathak commented on Jul 8, 2022

    @kunalspathak
    Contributor

    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

  16. modified the milestones: 7.0.0, 8.0.0 on Jul 8, 2022
  17. neon-sunset commented on Jul 12, 2022

    @neon-sunset
    Contributor

    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)

  18. kunalspathak commented on Jun 5, 2023

    @kunalspathak
    Contributor

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

  19. modified the milestones: 8.0.0, Future on Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    arch-arm64area-CodeGen-coreclros-macos-bigsur (macOS11)

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions