Skip to content

Update fp4fp6_helpers.py - #810

Open
devalshahamd wants to merge 4 commits into
mainfrom
fix/fp4_avail_check
Open

Update fp4fp6_helpers.py#810
devalshahamd wants to merge 4 commits into
mainfrom
fix/fp4_avail_check

Conversation

@devalshahamd

Copy link
Copy Markdown
Contributor

This pull request introduces a new utility function to check for the availability of block-scaled MX GEMM paths, improving the usability and clarity of hardware support checks in the codebase.

Hardware support detection:

  • Added the mx_available() function in fp4fp6_helpers.py to determine if any block-scaled MX GEMM path (Triton tl.dot_scaled for MXFP4/MXFP6 or aiter's CK gemm_a4w4 for MXFP4) is usable.

@devalshahamd
devalshahamd force-pushed the fix/fp4_avail_check branch from efb0f66 to 3200e27 Compare July 14, 2026 23:08
Covers the Triton ``tl.dot_scaled`` MXFP4/MXFP6 path as well as aiter's
gfx950 CK ``gemm_a4w4`` MXFP4 path
"""
if triton_available() and (_MXFP4_SUPPORTED or bool(_MXFP6_DTYPE)):

@gabeweisz gabeweisz Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Probably not worth changing but this could also be:

return (triton_available() and (_MXFP4_SUPPORTED or bool(_MXFP6_DTYPE))) or _aiter_mxfp4_ready()

Either way is fine if you don't want to make another update

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@gabeweisz Thanks fir the suggestion. I made the edit. Could you please reapprove?

@devalshahamd
devalshahamd requested a review from gabeweisz July 29, 2026 19:39
@devalshahamd
devalshahamd enabled auto-merge (squash) July 29, 2026 19:43
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.

3 participants