Skip to content

Conversation

@thurstond
Copy link
Contributor

The tests largely cover AVX-VNNI (Vector Neural Network Instructions):

  • vpdpbusd, vpdpbusds
  • vpdpwssd, vpdpwssds

AVX-VNNI-INT8:

  • vpdpbssd, vpdpbssds
  • vpdpbsud, vpdpbsuds
  • vpdpbuud, vpdpbuuds

AVX-VNNI-INT16:

  • vpdpwsud, vpdpwsuds
  • vpdpwusd, vpdpwusds
  • vpdpwuud, vpdpwuuds

These instructions are currently heuristically handled (by OR'ing together the vectors). This is incorrect because:

  1. multiplication by a zero should result in an initialized value 2) the addition is horizontal (within vectors, not "vertically" between vectors).

Future work can improve the instrumentation by applying the updated handleVectorPmaddIntrinsic() from #152941

The tests largely cover AVX-VNNI (Vector Neural Network Instructions):
- vpdpbusd, vpdpbusds
- vpdpwssd, vpdpwssds

AVX-VNNI-INT8:
- vpdpbssd, vpdpbssds
- vpdpbsud, vpdpbsuds
- vpdpbuud, vpdpbuuds

AVX-VNNI-INT16:
- vpdpwsud, vpdpwsuds
- vpdpwusd, vpdpwusds
- vpdpwuud, vpdpwuuds

These instructions are currently heuristically handled (by OR'ing together
the vectors). This is incorrect because:
1) multiplication by a zero should result in an initialized value
2) the addition is horizontal (within vectors, not "vertically" between vectors).

Future work can improve the instrumentation by applying the updated
handleVectorPmaddIntrinsic() from llvm#152941
@thurstond thurstond requested review from fmayer and vitalybuka August 12, 2025 04:20
@github-actions
Copy link

github-actions bot commented Aug 12, 2025

✅ With the latest revision this PR passed the undef deprecator.

Copy link
Contributor

@fmayer fmayer left a comment

Choose a reason for hiding this comment

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

please change title to say "AVX-VNNI" instead of AI

@thurstond thurstond changed the title [NFCI][msan] Precommit tests for AI [NFCI][msan] Precommit tests for AVX-VNNI Aug 12, 2025
@thurstond
Copy link
Contributor Author

please change title to say "AVX-VNNI" instead of AI

Done per Title Transformation Tuesdays

@thurstond thurstond merged commit 9a17451 into llvm:main Aug 12, 2025
9 checks passed
thurstond added a commit to thurstond/llvm-project that referenced this pull request Aug 16, 2025
This extends the pmadd handler (recently improved in llvm#153353) to three-operand intrinsics (multiply-add-accumulate), and applies it to the AVX Vector Neural Network Instructions.

Updates the tests from llvm#153135
thurstond added a commit that referenced this pull request Aug 18, 2025
…work Instructions (VNNI) (#153927)

This extends the pmadd handler (recently improved in #153353) to three-operand intrinsics (multiply-add-accumulate), and applies it to the AVX Vector Neural Network Instructions.

Updates the tests from #153135
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Aug 18, 2025
… Neural Network Instructions (VNNI) (#153927)

This extends the pmadd handler (recently improved in llvm/llvm-project#153353) to three-operand intrinsics (multiply-add-accumulate), and applies it to the AVX Vector Neural Network Instructions.

Updates the tests from llvm/llvm-project#153135
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