Skip to content

Support mixed f8/f4 dtypes in mma_scaled - #129

Open
SycamoreQ wants to merge 1 commit into
NVIDIA:mainfrom
SycamoreQ:SycamoreQ/bug-mma-scaled-mixed-f8-f4
Open

SycamoreQ wants to merge 1 commit into
NVIDIA:mainfrom
SycamoreQ:SycamoreQ/bug-mma-scaled-mixed-f8-f4

Conversation

@SycamoreQ

Copy link
Copy Markdown

Summary

Adds cutile-python front-end support for mixed f8/f4 operands in ct.mma_scaled, matching the mxf8f6f4 constraints:

  • Allows float8_e4m3fn or float8_e5m2 with float4_e2m1fn in either operand order.
  • Requires float8_e8m0fnu scales and scaling block size B=32 on both sides.
  • Keeps same-width mixed f8 operands rejected.

The IR validation now receives pair-specific allowed block sizes from the datatype resolver, preventing mixed operands from incorrectly using the f4-only B=16 path.

Backend dependency

End-to-end execution still requires a tileiras version with mxf8f6f4 support. The current tileiras rejects the operation, so the integration test is strict-xfailed until that support lands.

Validation

  • flake8 clean.
  • Modal RTX-PRO-6000 with tileiras 13.5.37: 29 passed, 2 skipped, 2 xfailed (the two xfails are the mixed end-to-end cases).

Refs #118.

Allow float8_e4m3fn or float8_e5m2 with float4_e2m1fn operands using UE8M0 scales and a scaling block size of 32, matching mxf8f6f4 constraints.

Refs NVIDIA#118.

Signed-off-by: SycamoreQ <kaushik.80405@gmail.com>
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.

1 participant