Repository navigation
[AOTI] Add MXFP4 dtype support to AOTInductor C shim - #176496
pranavsharma wants to merge 3 commits into
Conversation
Summary: Add `float8_e8m0fnu` and `float4_e2m1fn_x2` dtype accessors to the
AOTInductor C shim layer, following the existing pattern for float8
dtypes. This is a purely additive ABI-compatible change.
Test Plan: - Existing AOTI tests pass (no existing symbols modified)
- New functions follow the same `AOTI_TORCH_DTYPE_IMPL` macro pattern
as the other float8 dtypes
Reviewers:
Subscribers:
Tasks:
Tags:
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/176496
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (3 Unrelated Failures)As of commit 8c0261a with merge base b60a589 ( FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Attention! PyTorch one of the C-stable API file was changedYou MUST NOT change existing function declarations in this, as this header defines a stable C ABI. If you need to change the signature for a function, introduce a new v2 version of the function and modify code generation to target the new version of the function. Caused by: |
|
can you write a test |
Tests for these dtypes already exist. The AOTI ABI check suite at test/cpp/aoti_abi_check/test_dtype.cpp already has tests for both Float8_e8m0fnu (lines 90-93) and Float4_e2m1fn_x2 (lines 95-98), and the TestScalarType enum ordering test verifies their ordinal positions. However, those tests cover the header-only types, not the C shim functions directly. The C shim functions (aoti_torch_dtype_*()) are tested implicitly through the AOTI inference pipeline tests in test/cpp/aoti_inference/. There isn't a standalone test that calls aoti_torch_dtype_float8_e8m0fnu() and aoti_torch_dtype_float4_e2m1fn_x2() directly, but that's consistent with how all the other dtype shim functions are tested — none of them have direct unit tests either. The existing test coverage should be sufficient for this change. |
Summary: Add `float8_e8m0fnu` and `float4_e2m1fn_x2` dtype accessors to the
AOTInductor C shim layer, following the existing pattern for float8
dtypes. This is a purely additive ABI-compatible change.
Test Plan: - Existing AOTI tests pass (no existing symbols modified)
- New functions follow the same `AOTI_TORCH_DTYPE_IMPL` macro pattern
as the other float8 dtypes
Reviewers:
Subscribers:
Tasks:
Tags:
|
I dont know if I buy claude .. why didnt existing testing catch this if they were sufficient |
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
|
The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command |
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Summary: Add `float8_e8m0fnu` and `float4_e2m1fn_x2` dtype accessors to the AOTInductor C shim layer, following the existing pattern for float8 dtypes. This is a purely additive ABI-compatible change. Context is adding support for MXFP4 on AMD MI350. Test Plan: - Existing AOTI tests pass (no existing symbols modified) - New functions follow the same `AOTI_TORCH_DTYPE_IMPL` macro pattern as the other float8 dtypes Reviewers: Subscribers: Tasks: Tags: Pull Request resolved: pytorch#176496 Approved by: https://github.com/drisspg
Summary: Add
float8_e8m0fnuandfloat4_e2m1fn_x2dtype accessors to theAOTInductor C shim layer, following the existing pattern for float8
dtypes. This is a purely additive ABI-compatible change.
Context is adding support for MXFP4 on AMD MI350.
Test Plan: - Existing AOTI tests pass (no existing symbols modified)
AOTI_TORCH_DTYPE_IMPLmacro pattern as the other float8 dtypesReviewers:
Subscribers:
Tasks:
Tags: