Add SIMD operations that use f16 and f128
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Eventually we will want to be able to make use of simd operations for f16 and f128, now that we have primitives to represent them. Possibilities that I know of:
- Aarch64 neon supports
float16x{4,8}https://developer.arm.com/architectures/instruction-sets/intrinsics/#f:@navigationhierarchiessimdisa=[Neon]&f:@navigationhierarchiesreturnbasetype=[float]&f:@navigationhierarchieselementbitsize=[16]&q=.- Implementation: https://github.com/rust-lang/stdarch/pull/1726
- Tracking issue: https://github.com/rust-lang/rust/issues/136306
- Arm sve supports
float16x{1,2}https://developer.arm.com/architectures/instruction-sets/intrinsics/#f:@navigationhierarchiesreturnbasetype=[float]&f:@navigationhierarchieselementbitsize=[16]&f:@navigationhierarchiessimdisa=[sve2,sve]&q=- We probably can't support this until our runtime-sized types story is better
- RISC-V apparently has both f16 and f128 https://five-embeddev.com/riscv-user-isa-manual/riscv-user-2.2/v.html
- Similarly relies on the "V" extension which has runtime-sized types https://github.com/rust-lang/rust/issues/114544
- NVIDIA PTX has f16 SIMD
- Implementation: https://github.com/rust-lang/stdarch/pull/1626
- Submodule https://github.com/rust-lang/rust/pull/128866
- Tracking issue: https://github.com/rust-lang/rust/issues/111199
- x86 with +avx512fp16
- Implementation: https://github.com/rust-lang/stdarch/pull/1605
- Submodule: https://github.com/rust-lang/rust/pull/128466
- Tracking issue: https://github.com/rust-lang/rust/issues/127213
- Portable SIMD should eventually be able to support these operations
Probably some work/research overlap with adding assembly https://github.com/rust-lang/rust/issues/125398
Tracking issue: https://github.com/rust-lang/rust/issues/116909
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with tracking issue #116909 and review the linked stdarch and Rust submodule pull requests for AArch64, NVIDIA PTX, and x86. Compare those approaches with the runtime-sized type constraints and the related assembly issue #125398; the work is complete when a specific target scope and implementation path for f16 or f128 SIMD operations is established and implemented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100