Skip to content
This repository was archived by the owner on Dec 22, 2021. It is now read-only.
This repository was archived by the owner on Dec 22, 2021. It is now read-only.

Re-introduce some 64x2 instructions #101

Closed

Description

@ngzhian

In #81, we wanted some performance data to support the inclusion of 64x2 instructions. In https://github.com/ngzhian/simd-benchmarks we documented steps to run benchmarks, and the results of running those benchmarks.

I would like to suggest the inclusion of 64x2 instructions back into the spec because we see real world workloads that benefit from these 64x2 instructions.

However, we don't see all 64x2 instructions getting the same usage and exposure, as such, we might want to consider including only a subset of these instructions.

Option 1, all 64x2 instructions 👀

  • i64x2.{splat,extract_lane,replace_lane}
  • i64x2.{add,sub,mul,neg}
  • i64x2.{shl,shr_s,shr_u}
  • i64x2.{any_true,all_true}
  • i64x2.{eq,le,lts,ltu,gts,gtu,les,leu,ges,geu}
  • i64x2.{abs,min,max}
  • i64x2.trunc_{s,u}/f64x2
  • f64x2.{splat,extract_lane,replace_lane}
  • f64x2.{add,sub,mul,neg}
  • f64x2.{div,sqrt}
  • f64x2.{shl,shr_s,shr_u}
  • f64x2.{any_true,all_true}
  • f64x2.{eq,le,lt,ge,gt}
  • f64x2.{abs,min,max}
  • f64x2.convert_{s,u}/i64x2

Option 2, only f64x2 instructions 🚀

  • all the f64x2 instructions (including conversions) from Option 1

Option 3, f64x2 instructions and common i64x2 instructions 🎉

  • all the f64x2 instructions (including conversions) from Option 1
  • i64x2.{splat,extract_lane,replace_lane}
  • i64x2.{add,sub,mul,neg}
  • i64x2.{shl,shr_s,shr_u}

I can put up a PR for changes to the docs when one of these options is decided.

Feel free to vote on this issue, eyes 👀 for 1, rocket 🚀 for 2, tada 🎉 for 3.

Activity

  1. tlively commented on Sep 9, 2019

    @tlively
    Member

    I'm not sure we actually ever updated the docs to reflect that any of these instructions had been removed in the first place. The entire CG blessed the operations that were present during the in-person meeting, so I think we should make sure to go back at some point and get the CG's blessing for any operations we've added since then, including any 64x2 operations we want to get back into the proposal.

  2. arunetm commented on Sep 9, 2019

    @arunetm
    Collaborator

    @ngzhian Thanks. what kind of workloads use the newly introduced common i64x2 instructions?
    Great idea to share the newly added instructions at the CG meeting. We have a few outstanding PR's on quasi fma, load extend etc. It will be better to go to the CG after we have merged the best versions of ones we are targeting to have in initial spec.

  3. dtig commented on Sep 9, 2019

    @dtig
    Member

    It's true we didn't end up updating the Spec, I think the intent here is to remove the operations we decide should not be included as a part of v1 in the spec. Aside from these, the ones that were included after the poll were the Load and Splat instructions, and the swizzle which have direct mappings to instructions, and are ergonomic variants of operations that already exist in the current subset of operations, so I'm not sure these need an explicit CG Poll.

    It would be good to keep this issue just to polling interest for just the 64x2 options listed by @ngzhian above, so we can put this class of operations to vote at an upcoming CG meeting. I'd look at this more as a pre-poll to get consensus from the folks involved in the SIMD proposal.

  4. ngzhian commented on Sep 9, 2019

    @ngzhian
    MemberAuthor

    @arunetm the SIMD-oriented Mersenne Twister implementation uses a lot i64x2 shifts, many hash algorithms like Blake2b use a lot of i64x2 shifts and and. f64x2 instructions feature heavily in matrix operations, machine learning models, optimization/solvers (the specific workload depends on what it is doing).

  5. arunetm commented on Sep 9, 2019

    @arunetm
    Collaborator

    Got it. Thanks ngzhian!

  6. added a commit that references this issue on Oct 19, 2019
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

      Issue actions