Skip to content

Conversation

@liqiangxl
Copy link
Collaborator

Similar to #5757

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 5, 2026

Greptile Summary

This PR updates test_cutlass_nvfp4_gemm.py to skip tests on unsupported GPU architectures, following the same pattern established in PR #5757.

  • Removes the module-level pytest.skip check that used compute capability range checking
  • Adds @pytest.mark.skipif decorators to each test function (test_nvfp4_gemm, test_nvfp4_gemm_epilogue, test_nvfp4_grouped_mm) using microarchitecture_is(10, 0) to only run tests on compute capability 10.0 (Blackwell B200/GB200)
  • Imports microarchitecture_is from python.direct_utils instead of inline compute capability check

Confidence Score: 5/5

  • This PR is safe to merge - it's a straightforward test configuration change following an established pattern.
  • The change is minimal and well-understood: it replaces module-level test skipping with per-test decorators. The pattern matches PR Skip un-supported arches test_grouped_mm #5757 exactly. The logic correctly restricts tests to compute capability 10.0 hardware, which is the intended behavior.
  • No files require special attention.

Important Files Changed

Filename Overview
tests/python/direct/test_cutlass_nvfp4_gemm.py Replaces module-level pytest.skip with per-test @pytest.mark.skipif decorators to skip tests on unsupported GPU architectures (only runs on compute capability 10.0). Follows the same pattern established in PR #5757.

Sequence Diagram

sequenceDiagram
    participant pytest as pytest
    participant test as test_cutlass_nvfp4_gemm.py
    participant utils as direct_utils
    participant torch as torch.cuda

    pytest->>test: Load test module
    pytest->>test: Discover test functions
    
    loop For each test function
        pytest->>test: Check @skipif decorator
        test->>utils: microarchitecture_is(10, 0)
        utils->>torch: get_device_properties()
        torch-->>utils: DeviceProperties(major, minor)
        utils-->>test: major==10 and minor==0
        alt GPU is compute cap 10.0
            test-->>pytest: Run test
        else GPU is not compute cap 10.0
            test-->>pytest: Skip test
        end
    end
Loading

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

Review updated until commit 33d88bf

Description

  • Move skip logic from module-level to individual test functions

  • Replace direct compute capability check with microarchitecture_is function

  • Add skipif decorators to test_nvfp4_gemm, test_nvfp4_gemm_epilogue, and test_nvfp4_grouped_mm

  • Update skip condition to only run on compute capability 10.0, excluding blackwell 12.0

Changes walkthrough

Relevant files
Tests
test_cutlass_nvfp4_gemm.py
Move skip logic to test functions with microarchitecture check

tests/python/direct/test_cutlass_nvfp4_gemm.py

  • Removed module-level compute capability skip check
  • Added import for microarchitecture_is function
  • Added @pytest.mark.skipif decorators to three test functions
  • Changed skip condition to use microarchitecture_is(10, 0) instead of
    direct compute capability check
  • +13/-8   

    PR Reviewer Guide

    Here are some key observations to aid the review process:

    🧪 PR contains tests
    ⚡ Recommended focus areas for review
    Architecture checking logic change

    The PR changes from checking compute_cap < (10, 0) or compute_cap >= (12, 0) to using not microarchitecture_is(10, 0). This changes the logic from excluding both older (< 10.0) and newer (>= 12.0) architectures to only excluding non-10.0 architectures. The new logic would allow compute capability 11.x, 13.x, etc., which may not have been intended. The reason text also changed from "Nvfp4 Requires compute capability 10" to "Does not support blackwell compute 12.0", suggesting the intent was to exclude Blackwell specifically while potentially allowing other newer architectures.

    @pytest.mark.skipif(
        not microarchitecture_is(10, 0),
        reason="Does not support blackwell compute 12.0, other arches are not tested.",
    )
    Missing import validation

    The PR adds import of microarchitecture_is from python.direct_utils but doesn't show the implementation of this function. Need to verify that this function exists and behaves correctly for the intended architecture checking logic.

    microarchitecture_is,

    @liqiangxl
    Copy link
    Collaborator Author

    !test

    @liqiangxl liqiangxl closed this Jan 6, 2026
    @liqiangxl liqiangxl deleted the llu/skip_nvfp4_gemm branch January 6, 2026 18:32
    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.

    2 participants