Skip to content

Add AVX10.2 Intrinsics#2045

Draft
sayantn wants to merge 13 commits intorust-lang:mainfrom
sayantn:avx10
Draft

Add AVX10.2 Intrinsics#2045
sayantn wants to merge 13 commits intorust-lang:mainfrom
sayantn:avx10

Conversation

@sayantn
Copy link
Contributor

@sayantn sayantn commented Mar 1, 2026

Tracking Issue: rust-lang/rust#153417

Note: requires rust-lang/rust#153068, contains a temporary fix in order to pass tests

  • zero-extending partial moves
  • sum of absolute differences
  • dot product
  • saturating truncating float->integer conversions
  • minmax
  • saturating float->int8 conversions
  • packing float32->float16 conversions
  • float16->float8 conversions with bias
  • float16->float8 conversions
  • float8->float16 conversions
  • SM4 intrinsics
  • Read-shared move intrinsics
  • bfloat16 instructions
    • bfloat16 minmax
    • saturating bfloat16->int8 conversions

BFloat16 intrinsics cannot be done now, because the LLVM intrinsics use bf16 vectors, and we cannot link to them directly. Requires rust-lang/rust#140763 or some other workaround.

AVX10_V1_AUX intrinsics

These instructions are supported in a subset of AVX10.2, but neither GCC nor LLVM supports this feature yet.
TODO: Modify the #[target_feature] attribute once LLVM starts supporting this.

  • integer dot product instructions
  • packing float32->float16 conversions
  • float16->float8 conversions with bias
  • float16->float8 conversions
  • float8->float16 conversions

LLVM Bugs

@sayantn sayantn force-pushed the avx10 branch 2 times, most recently from 864b294 to 1e2d57b Compare March 6, 2026 23:11
@sayantn
Copy link
Contributor Author

sayantn commented Mar 7, 2026

@Amanieu @folkertdev what do you think, can/should this be merged now, considering the LLVM bugs, or should we wait until the fixes merge?

@folkertdev
Copy link
Contributor

I don't have strong feelings about it. I'm assuming this won't really see practical usage? On the other hand we might be adding some test coverage to potentially catch regressions next LLVM upgrade.

So I guess I'm fine with merging, but I don't think it matters much really.

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