Skip to content

Stabilize existing neon instrinsics #1125

Open
@jrmuizel

Description

@jrmuizel
Contributor

Having to use nightly for NEON is pain. Is there any reason we can stabilize the intrinsics that we already have implemented? If not, what's needed to do this?

Activity

Amanieu

Amanieu commented on Apr 19, 2021

@Amanieu
Member

One thing that would make me more comfortable with partial stabilization is a test that checks that the stdarch intrinsics behave identically to the C versions with random inputs.

jrmuizel

jrmuizel commented on Apr 19, 2021

@jrmuizel
ContributorAuthor
Amanieu

Amanieu commented on Apr 19, 2021

@Amanieu
Member

No. Ideally we would want a solution that can auto-generate tests for both ARM and x86.

SparrowLii

SparrowLii commented on Apr 21, 2021

@SparrowLii
Member

One thing that would make me more comfortable with partial stabilization is a test that checks that the stdarch intrinsics behave identically to the C versions with random inputs.

How should we get the behavior of these instructions in Clang? I think this requires disassembling the corresponding Clang program and putting the result into the tests. Could it be a way to get them from llvm's document?

JamieCunliffe

JamieCunliffe commented on Apr 21, 2021

@JamieCunliffe
Contributor

As mentioned on zulip, we had been looking at alternative ways to generate the intrinsics, one of the things we did could be repurposed to compare c and rust intrinsics. What we did was basically generate C programs and compile them to LLVM IR so it wouldn't be much more to actually run them to get the results.

I can change the input source to be the spreadsheet that is currently tracking intrinsics, that should make it fairly generic.

My initial thoughts were this would be a binary that was run that would generate some C and rust that calls the intrinsic with the same random inputs and then print the results of the intrinsic call, we can then diff the two programs outputs and see if anything differs. If that's the case I should hopefully be able to share something soon.

Amanieu

Amanieu commented on Apr 21, 2021

@Amanieu
Member

My initial thoughts were this would be a binary that was run that would generate some C and rust that calls the intrinsic with the same random inputs and then print the results of the intrinsic call, we can then diff the two programs outputs and see if anything differs. If that's the case I should hopefully be able to share something soon.

Yes that's exactly what I had in mind.

fzyzcjy

fzyzcjy commented on Oct 27, 2021

@fzyzcjy

Hi, is there any updates? NEON is very much needed with Rust! Thanks.

bartelsielski

bartelsielski commented on Feb 9, 2022

@bartelsielski

#1266 stabilized the neon intrinsics for aarch64. Are there plans to also stabilize neon on 32-bit arm?

Amanieu

Amanieu commented on Feb 19, 2022

@Amanieu
Member

There are many intrinsics that are still buggy or missing on ARM: https://github.com/rust-lang/stdarch/blob/master/crates/intrinsic-test/missing_arm.txt

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Amanieu@jrmuizel@fzyzcjy@Lokathor@JamieCunliffe

        Issue actions

          Stabilize existing neon instrinsics · Issue #1125 · rust-lang/stdarch