Skip to content

[mx] Fix: pass scaling_mode parameter to triton_to_mxfp8_dim1#3686

Merged
danielvegamyhre merged 1 commit intopytorch:mainfrom
ugolowic:mxfp8_missing_parameter
Mar 5, 2026
Merged

[mx] Fix: pass scaling_mode parameter to triton_to_mxfp8_dim1#3686
danielvegamyhre merged 1 commit intopytorch:mainfrom
ugolowic:mxfp8_missing_parameter

Conversation

@ugolowic
Copy link
Copy Markdown
Contributor

This PR fixes a bug where the scaling_mode parameter was not being forwarded from _to_mxfp8_dim1_kernel_wrapper to triton_to_mxfp8_dim1, causing the function to always default to "rceil" scaling mode.

When triton_to_mxfp8_dim1() was called from
_to_mxfp8_dim1_kernel_wrapper(), the scale_calculation_mode
parameter was not passed, resulting in incorrect default
value.

Signed-off-by: Ula Golowicz <urszula.golowicz@intel.com>
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Jan 22, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3686

Note: Links to docs will display an error until the docs builds have been completed.

❌ 4 New Failures

As of commit 969310d with merge base 2a8714f (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 22, 2026
@karol-brejna-i
Copy link
Copy Markdown

Affected tests:

test_linear_eager_vs_hp[ScaleCalculationMode.FLOOR-MXFP8Dim1CastKernelChoice.TRITON-input_shape0-True-elem_dtype0-xpu]
test_linear_eager_vs_hp[ScaleCalculationMode.FLOOR-MXFP8Dim1CastKernelChoice.TRITON-input_shape0-False-elem_dtype0-xpu]
test_linear_eager_vs_hp[ScaleCalculationMode.FLOOR-MXFP8Dim1CastKernelChoice.TRITON-input_shape1-True-elem_dtype0-xpu]
test_linear_eager_vs_hp[ScaleCalculationMode.FLOOR-MXFP8Dim1CastKernelChoice.TRITON-input_shape1-False-elem_dtype0-xpu]
test_linear_eager_vs_hp[ScaleCalculationMode.FLOOR-MXFP8Dim1CastKernelChoice.TRITON-input_shape2-True-elem_dtype0-xpu]
test_linear_eager_vs_hp[ScaleCalculationMode.FLOOR-MXFP8Dim1CastKernelChoice.TRITON-input_shape2-False-elem_dtype0-xpu]

Test command

Validate with:

pytest test/prototype/mx_formats/test_mx_linear.py -sv -k "test_linear_eager_vs_hp and FLOOR and TRITON"

@karol-brejna-i
Copy link
Copy Markdown

karol-brejna-i commented Jan 29, 2026

This PR is part of #2326 effort.

@danielvegamyhre danielvegamyhre self-requested a review January 29, 2026 16:37
@liangan1 liangan1 added ciflow/xpu label used to trigger xpu CI jobs xpu Intel XPU related features labels Feb 2, 2026
@danielvegamyhre
Copy link
Copy Markdown
Contributor

hi @ugolowic i missed this somehow, do you still want to land this?

@ugolowic
Copy link
Copy Markdown
Contributor Author

ugolowic commented Mar 5, 2026

@danielvegamyhre, yes, I do

@danielvegamyhre danielvegamyhre added the module: training quantize_ api training flow label Mar 5, 2026
@danielvegamyhre danielvegamyhre merged commit 2a2ca04 into pytorch:main Mar 5, 2026
16 of 23 checks passed
Copy link
Copy Markdown
Contributor

@danielvegamyhre danielvegamyhre left a comment

Choose a reason for hiding this comment

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

LGTM

@danielvegamyhre
Copy link
Copy Markdown
Contributor

test failures were unrelated, landed

@ugolowic ugolowic deleted the mxfp8_missing_parameter branch March 11, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/xpu label used to trigger xpu CI jobs CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. module: training quantize_ api training flow xpu Intel XPU related features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants