Skip to content

[PyTorch] Mark the remaining columnwise-only per-tensor FP8 hybrid tests as xfail - #3933

Closed
rlaope wants to merge 1 commit into
NVIDIA:mainfrom
rlaope:sm12x-hybrid-colwise-fp8-xfail
Closed

rlaope wants to merge 1 commit into
NVIDIA:mainfrom
rlaope:sm12x-hybrid-colwise-fp8-xfail

Conversation

@rlaope

@rlaope rlaope commented Nov 24, 2026

Copy link
Copy Markdown

Description

tests/pytorch/test_hybrid_quantization.py has five tests that fail on SM 12.0 with:

NotImplementedError: Columnwise-only per-tensor FP8 quantization is not implemented; the cast-transpose kernel requires rowwise output storage.

They all build the reversed hybrid (NVFP4 rowwise + per-tensor FP8 columnwise), or use columnwise_source="rowwise_dequantized". Where non-TN FP8 GEMM is unsupported, that quantizes FP8 columnwise-only, which check_per_tensor_fp8_quantize_output() rejects on purpose (tracked in #3158). The other tests on this path already carry _XFAIL_HOPPER_COLUMNWISE_PER_TENSOR_FP8, which is xfail(condition=not is_non_tn_fp8_gemm_supported(), raises=NotImplementedError, strict=True). These five do not, so on any GPU without non-TN FP8 GEMM (Hopper, and SM 12.x, where is_non_tn_fp8_gemm_supported() is also False) they fail instead of xfailing:

  • TestHybridQuantize::test_sub_storage_types_reversed
  • TestHybridDequantize::test_dequantize_reversed_close_to_original
  • TestHybridReversedDirection::test_nvfp4_row_fp8_col_full_fwd_bwd
  • TestHybridCpuOffloadPushPop::test_push_pop_with_columnwise_only
  • TestHybridGroupedLinearValidation::test_hybrid_split_quantize_honors_rowwise_dequantized_source

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refactoring

Changes

  • Add @_XFAIL_HOPPER_COLUMNWISE_PER_TENSOR_FP8 to the five tests above.
  • Mention SM 12.x in the marker's reason, since its condition (not is_non_tn_fp8_gemm_supported()) is also true there.

The marker is strict and conditional, so on SM 10.x these tests still run and must pass. Where they xfail, they must raise exactly NotImplementedError, so any other failure still shows up.

Validation

Hardware: RTX PRO 6000 Blackwell Max-Q (SM 12.0), driver 590.48.01, CUDA 13.0.88, PyTorch 2.14.1+cu130, TE source build at a6393d0.

python -m pytest tests/pytorch/test_hybrid_quantization.py:

main this PR
result 5 failed, 185 passed, 63 skipped, 64 xfailed 185 passed, 63 skipped, 69 xfailed

All 5 failures on main are the NotImplementedError above. I have no Hopper or SM 10.x card, so I have not run it there. The strict=True marker is conditioned the same way as on the existing tests, so on SM 10.x these five run exactly as before.

Checklist:

  • I have read and followed the contributing guidelines
  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

…sts as xfail

Five hybrid quantization tests quantize per-tensor FP8 columnwise-only
(NVFP4 rowwise + FP8 columnwise, or columnwise_source=rowwise_dequantized)
but lack the _XFAIL_HOPPER_COLUMNWISE_PER_TENSOR_FP8 marker that the
other tests on this path carry. Where non-TN FP8 GEMM is unsupported
(Hopper, SM 12.x) they fail with "Columnwise-only per-tensor FP8
quantization is not implemented" instead of xfailing.

Add the marker to those tests and mention SM 12.x in its reason. The
marker is strict and conditioned on is_non_tn_fp8_gemm_supported(), so
the tests still run and must pass on SM 10.x.

Signed-off-by: rlaope <105429536+rlaope@users.noreply.github.com>
@github-actions github-actions Bot added the community-contribution PRs from external contributor outside the core maintainers, representing community-driven work. label Nov 24, 2026
@greptile-apps

greptile-apps Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

Adds the existing conditional expected-failure marker to five hybrid quantization tests.

  • Five hybrid quantization tests now expect unsupported GPU failures.

Reviews (1) · Last reviewed commit: "[PyTorch] Mark the remaining columnwise-..." · Reviewed by Greptile

@pggPL pggPL mentioned this pull request Nov 24, 2026
8 of 13 tasks
@pggPL

pggPL commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Thank you for the contribution! This fix has been included in #3935 (with original commit authorship preserved) so we can run CI and land several small community fixes together. Closing this PR in favor of #3935.

@pggPL pggPL closed this Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution PRs from external contributor outside the core maintainers, representing community-driven work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants