Skip to content

[C API] Add Relaxed SIMD operations #5482

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 1 commit into from
Feb 7, 2023

Conversation

dcodeIO
Copy link
Contributor

@dcodeIO dcodeIO commented Feb 3, 2023

Exposes the constants

Unary

  • BinaryenRelaxedTruncSVecF32x4ToVecI32x4
  • BinaryenRelaxedTruncSVecF32x4ToVecI32x4
  • BinaryenRelaxedTruncZeroSVecF64x2ToVecI32x4
  • BinaryenRelaxedTruncZeroUVecF64x2ToVecI32x4

Binary

  • BinaryenRelaxedSwizzleVecI8x16
  • BinaryenRelaxedMinVecF32x4
  • BinaryenRelaxedMaxVecF32x4
  • BinaryenRelaxedMinVecF64x2
  • BinaryenRelaxedMaxVecF64x2
  • BinaryenRelaxedQ15MulrSVecI16x8
  • BinaryenDotI8x16I7x16SToVecI16x8

SIMDTernary

  • BinaryenRelaxedFmaVecF32x4
  • BinaryenRelaxedFmsVecF32x4
  • BinaryenRelaxedFmaVecF64x2
  • BinaryenRelaxedFmsVecF64x2
  • BinaryenLaneselectI8x16
  • BinaryenLaneselectI16x8
  • BinaryenLaneselectI32x4
  • BinaryenLaneselectI64x2
  • BinaryenDotI8x16I7x16AddSToVecI32x4

so the respective instructions can be produced and inspected with the C API.

Copy link
Member

@tlively tlively left a comment

Choose a reason for hiding this comment

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

LGTM, although it's possible that some of these names may change in the future to align with the final relaxed SIMD spec. For example there is some change of "fma" becoming "mul_add." Would name changes like that be ok for your use case if they were called out in the changelog?

@dcodeIO
Copy link
Contributor Author

dcodeIO commented Feb 6, 2023

Sure, name changes shouldn't be a problem.

Perhaps a question: On the AS side, I'm currently reassigning to the naming scheme from relaxed-simd/Overview. Do you know if this scheme is somewhat final? Just wondering because it states madd (vs mul_add).

@tlively
Copy link
Member

tlively commented Feb 6, 2023

Yes, that's the most up-to-date list and its madd is more authoritative than my comment about mul_add :) However the CG voted last week to give that instruction fused semantics, so its name might go back to fma 🤷‍♂️ We expect the proposal to finally go to phase 4 at the next meeting, so we should have final answers by then.

@tlively tlively merged commit cfda51c into WebAssembly:main Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants