You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add cuda-device support for packed bf16x2 FMA #190
cuda-featureA CUDA hardware/toolkit feature (TMA, tcgen05, WGMMA)enhancementNew feature or requestintrinsicsDevice intrinsics and libdevice math mappings
PTX supports fma.rn.bf16x2 on sm_80+, but cuda-oxide does not currently expose that packed bf16 operation through the public CUDA device API. There is also no end-to-end compiler representation for the operation across the device declaration, NVVM dialect, MIR importer, MIR lowering, and examples.
Why this matters
Packed bf16 arithmetic is a hardware feature users should be able to express without inline-PTX workarounds. On Ampere, fma.rn.bf16x2 is especially important because packed add.bf16x2 and mul.bf16x2 require sm_90+, while FMA is available on sm_80+.
Expected behavior
Device code should be able to call a repo-native cuda_device::bf16x2::fma_bf16x2(a, b, c) -> u32 intrinsic where each u32 stores two bf16 lanes. The compiler should lower that intrinsic to PTX fma.rn.bf16x2, and a focused example should prove the full path works.
This should stay focused on FMA. Adding packed bf16 add/mul would imply a common architecture contract that PTX does not provide on Ampere.
Acceptance criteria
cuda-device exposes a documented packed bf16x2 FMA intrinsic with the lane layout and architecture support stated clearly.
dialect-nvvm has a registered nvvm.fma_bf16x2 operation.
The MIR importer recognizes the public device intrinsic path.
MIR lowering emits inline PTX for fma.rn.bf16x2.
A focused rustc-codegen-cuda example includes Cargo.lock and checks a concrete packed bf16x2 result.
Tests or examples cover the dialect operation and the end-to-end intrinsic path.
cuda-featureA CUDA hardware/toolkit feature (TMA, tcgen05, WGMMA)enhancementNew feature or requestintrinsicsDevice intrinsics and libdevice math mappings
Activity
feat: add /opt/cuda to default candidates (NVIDIA#190)