Skip to content

[Common] Blackwell skip condition for C++ grouped FP8 block-scaling tests#3174

Merged
denera merged 1 commit into
NVIDIA:mainfrom
denera:pytorch/grouped-fp8bs-blackwell-skip
Jul 3, 2026
Merged

[Common] Blackwell skip condition for C++ grouped FP8 block-scaling tests#3174
denera merged 1 commit into
NVIDIA:mainfrom
denera:pytorch/grouped-fp8bs-blackwell-skip

Conversation

@denera

@denera denera commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Description

Corrected condition to skip grouped FP8 block-scaling tests on Blackwell+.

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

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

…n C++

Signed-off-by: Alp Dener <adener@nvidia.com>
@denera denera requested a review from vthumbe1503 July 3, 2026 02:20
@denera denera self-assigned this Jul 3, 2026
@denera denera added the bug Something isn't working label Jul 3, 2026
@greptile-apps

greptile-apps Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes the skip condition in the C++ grouped FP8 block-scaling test (test_cast_float8blockwise_grouped.cu) so the test only runs on Hopper (SM90–SM9x) architectures. Previously, only pre-Hopper hardware was excluded; the new condition also skips on Blackwell (SM100+), where the feature is not yet supported.

  • The updated guard now reads < hopperComputeCapability || >= blackwellComputeCapability, restricting execution to Hopper-class devices only.
  • The fix aligns with the identical pattern already used in the sister test test_dequantize_float8blockwise_grouped.cu (lines 82–83).

Confidence Score: 5/5

Safe to merge — the change is a one-line guard addition that prevents the test from running on Blackwell+ hardware where the feature is unsupported.

The fix is minimal, targeted, and directly mirrors the identical skip pattern already present in the sister test test_dequantize_float8blockwise_grouped.cu. The getDeviceComputeCapability() function is backed by a static cache, so calling it twice in the condition is free. No logic outside the skip guard is touched.

No files require special attention.

Important Files Changed

Filename Overview
tests/cpp/operator/test_cast_float8blockwise_grouped.cu Adds Blackwell skip condition to perform_test, matching the identical guard in the dequantize sister test and the caching-safe getDeviceComputeCapability() implementation.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[perform_test called] --> B{cc < hopperComputeCapability\ni.e., cc < 90}
    B -- Yes --> C[GTEST_SKIP\npre-Hopper hardware]
    B -- No --> D{cc >= blackwellComputeCapability\ni.e., cc >= 100}
    D -- Yes --> E[GTEST_SKIP\nBlackwell+ hardware\nnew condition added by PR]
    D -- No --> F[Run test\nHopper only: cc 90-99]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[perform_test called] --> B{cc < hopperComputeCapability\ni.e., cc < 90}
    B -- Yes --> C[GTEST_SKIP\npre-Hopper hardware]
    B -- No --> D{cc >= blackwellComputeCapability\ni.e., cc >= 100}
    D -- Yes --> E[GTEST_SKIP\nBlackwell+ hardware\nnew condition added by PR]
    D -- No --> F[Run test\nHopper only: cc 90-99]
Loading

Reviews (1): Last reviewed commit: "fixing Blackwell skip condition for grou..." | Re-trigger Greptile

@vthumbe1503 vthumbe1503 left a comment

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.

LGTM

@denera denera merged commit 7cb8b31 into NVIDIA:main Jul 3, 2026
10 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants