Skip to content

[inductor][NVGEMM] Skip operator API tests in fbcode - #192928

Closed
mlazos wants to merge 20 commits into
gh/mlazos/298/basefrom
gh/mlazos/298/head
Closed

mlazos wants to merge 20 commits into
gh/mlazos/298/basefrom
gh/mlazos/298/head

Conversation

@mlazos

@mlazos mlazos commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

doesn't run hese tests in fbcode until we add operator API internally

This skips two low-level tests only in fbcode because fbcode does not include
the optional CUTLASS package those tests use to construct and run kernel
objects directly. The tests fail while importing or creating the operator,
before they exercise the NVGEMM behavior they are intended to check.

The tests still run in the open-source build, and the higher-level
torch.compile tests remain enabled in fbcode.

Architecture

This is a test-only environment boundary. The two tests that directly import
the optional CUTLASS Operator API are skipped individually when IS_FBCODE is
true. No production lowering, provider registration, or generated-kernel
behavior changes. The tests continue running in open source, while fbcode
retains the higher-level compiler coverage.

Example

The affected tests directly compile a grouped-reduction provider and a
unit-dimension epilogue on a non-current CUDA stream. In fbcode, the required
operator-construction API is absent, so skipping those two tests avoids
reporting an environment limitation as an NVGEMM correctness failure.

@unittest.skipIf(
    IS_FBCODE,
    "CUTLASS Operator API is not available in fbcode",
)
def test_scaled_gemm_grouped_n_reduce_provider(self):
    ...

Test Plan

PYTORCH_TEST_FBCODE=1 python test/inductor/test_nv_universal_gemm.py TestNVUniversalGemm.test_scaled_gemm_grouped_n_reduce_provider TestNVUniversalGemm.test_scaled_gemm_unit_dim_epilogue_non_current_stream -v
python test/inductor/test_nv_universal_gemm.py TestNVUniversalGemm.test_scaled_gemm_grouped_n_reduce_provider TestNVUniversalGemm.test_scaled_gemm_unit_dim_epilogue_non_current_stream -v
lintrunner -a

Description drafted with an AI assistant.

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ No Failures

As of commit 30b9482 with merge base 3ee461f (image):
💚 Looks good so far! There are no failures yet. 💚

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

mlazos added a commit that referenced this pull request Aug 11, 2026
The CUTLASS Operator API package is not available in fbcode, so the two tests that directly construct, compile, and run operator objects fail before exercising NVGEMM. Keep the torch.compile integration coverage enabled and skip only these direct API tests when IS_FBCODE is set.

Test Plan:

```bash
PYTORCH_TEST_FBCODE=1 python test/inductor/test_nv_universal_gemm.py TestNVUniversalGemm.test_scaled_gemm_grouped_n_reduce_provider TestNVUniversalGemm.test_scaled_gemm_unit_dim_epilogue_non_current_stream -v
python test/inductor/test_nv_universal_gemm.py TestNVUniversalGemm.test_scaled_gemm_grouped_n_reduce_provider TestNVUniversalGemm.test_scaled_gemm_unit_dim_epilogue_non_current_stream -v
lintrunner -a
```

Authored with an AI assistant.


ghstack-source-id: 1e28809
Pull-Request: #192928
@mlazos

mlazos commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor Author

AI-Review

Automated multi-agent review (2 Claude + 2 Codex + GPT-5.6 verification). This is AI-generated — please verify findings manually.


Verified Issues

  • [medium] Incomplete fbcode guard leaves two tests failing — Location: test/inductor/test_nv_universal_gemm.py:126-127 and :405-432. Trigger: fbcode on Blackwell with cutlass_api available but cutlass.operators unavailable. Failure sequence: the class-level skip passes; one test directly imports TensorWrapper, while the other resolves cutlass.operators.metadata through mock.patch; both raise ModuleNotFoundError. Impact: the targeted internal test suite still reports two errors despite the new skips. Reviewers: Claude Bug Review (two findings merged).

[ghstack-poisoned]
mlazos added a commit that referenced this pull request Aug 11, 2026
The CUTLASS Operator API package is not available in fbcode, so the two tests that directly construct, compile, and run operator objects fail before exercising NVGEMM. Keep the torch.compile integration coverage enabled and skip only these direct API tests when IS_FBCODE is set.

Test Plan:

```bash
PYTORCH_TEST_FBCODE=1 python test/inductor/test_nv_universal_gemm.py TestNVUniversalGemm.test_scaled_gemm_grouped_n_reduce_provider TestNVUniversalGemm.test_scaled_gemm_unit_dim_epilogue_non_current_stream -v
python test/inductor/test_nv_universal_gemm.py TestNVUniversalGemm.test_scaled_gemm_grouped_n_reduce_provider TestNVUniversalGemm.test_scaled_gemm_unit_dim_epilogue_non_current_stream -v
lintrunner -a
```

Authored with an AI assistant.


ghstack-source-id: 1ecfde7
Pull-Request: #192928
[ghstack-poisoned]
mlazos added a commit that referenced this pull request Aug 12, 2026
The CUTLASS Operator API package is not available in fbcode, so the two tests that directly construct, compile, and run operator objects fail before exercising NVGEMM. Keep the torch.compile integration coverage enabled and skip only these direct API tests when IS_FBCODE is set.

Test Plan:

```bash
PYTORCH_TEST_FBCODE=1 python test/inductor/test_nv_universal_gemm.py TestNVUniversalGemm.test_scaled_gemm_grouped_n_reduce_provider TestNVUniversalGemm.test_scaled_gemm_unit_dim_epilogue_non_current_stream -v
python test/inductor/test_nv_universal_gemm.py TestNVUniversalGemm.test_scaled_gemm_grouped_n_reduce_provider TestNVUniversalGemm.test_scaled_gemm_unit_dim_epilogue_non_current_stream -v
lintrunner -a
```

Authored with an AI assistant.


ghstack-source-id: aafdd1a
Pull-Request: #192928
[ghstack-poisoned]
mlazos added a commit that referenced this pull request Aug 12, 2026
The CUTLASS Operator API package is not available in fbcode, so the two tests that directly construct, compile, and run operator objects fail before exercising NVGEMM. Keep the torch.compile integration coverage enabled and skip only these direct API tests when IS_FBCODE is set.

Test Plan:

```bash
PYTORCH_TEST_FBCODE=1 python test/inductor/test_nv_universal_gemm.py TestNVUniversalGemm.test_scaled_gemm_grouped_n_reduce_provider TestNVUniversalGemm.test_scaled_gemm_unit_dim_epilogue_non_current_stream -v
python test/inductor/test_nv_universal_gemm.py TestNVUniversalGemm.test_scaled_gemm_grouped_n_reduce_provider TestNVUniversalGemm.test_scaled_gemm_unit_dim_epilogue_non_current_stream -v
lintrunner -a
```

Authored with an AI assistant.


ghstack-source-id: f9f1c5c
Pull-Request: #192928
[ghstack-poisoned]
mlazos added a commit that referenced this pull request Aug 12, 2026
The CUTLASS Operator API package is not available in fbcode, so the two tests that directly construct, compile, and run operator objects fail before exercising NVGEMM. Keep the torch.compile integration coverage enabled and skip only these direct API tests when IS_FBCODE is set.

Test Plan:

```bash
PYTORCH_TEST_FBCODE=1 python test/inductor/test_nv_universal_gemm.py TestNVUniversalGemm.test_scaled_gemm_grouped_n_reduce_provider TestNVUniversalGemm.test_scaled_gemm_unit_dim_epilogue_non_current_stream -v
python test/inductor/test_nv_universal_gemm.py TestNVUniversalGemm.test_scaled_gemm_grouped_n_reduce_provider TestNVUniversalGemm.test_scaled_gemm_unit_dim_epilogue_non_current_stream -v
lintrunner -a
```

Authored with an AI assistant.


ghstack-source-id: dff8f52
Pull-Request: #192928
[ghstack-poisoned]
mlazos added a commit that referenced this pull request Aug 12, 2026
The CUTLASS Operator API package is not available in fbcode, so the two tests that directly construct, compile, and run operator objects fail before exercising NVGEMM. Keep the torch.compile integration coverage enabled and skip only these direct API tests when IS_FBCODE is set.

Test Plan:

```bash
PYTORCH_TEST_FBCODE=1 python test/inductor/test_nv_universal_gemm.py TestNVUniversalGemm.test_scaled_gemm_grouped_n_reduce_provider TestNVUniversalGemm.test_scaled_gemm_unit_dim_epilogue_non_current_stream -v
python test/inductor/test_nv_universal_gemm.py TestNVUniversalGemm.test_scaled_gemm_grouped_n_reduce_provider TestNVUniversalGemm.test_scaled_gemm_unit_dim_epilogue_non_current_stream -v
lintrunner -a
```

Authored with an AI assistant.


ghstack-source-id: 42639c2
Pull-Request: #192928
@mlazos
mlazos requested review from drisspg and eellison August 12, 2026 09:50
[ghstack-poisoned]
mlazos added a commit that referenced this pull request Aug 12, 2026
The CUTLASS Operator API package is not available in fbcode, so the two tests that directly construct, compile, and run operator objects fail before exercising NVGEMM. Keep the torch.compile integration coverage enabled and skip only these direct API tests when IS_FBCODE is set.

Test Plan:

```bash
PYTORCH_TEST_FBCODE=1 python test/inductor/test_nv_universal_gemm.py TestNVUniversalGemm.test_scaled_gemm_grouped_n_reduce_provider TestNVUniversalGemm.test_scaled_gemm_unit_dim_epilogue_non_current_stream -v
python test/inductor/test_nv_universal_gemm.py TestNVUniversalGemm.test_scaled_gemm_grouped_n_reduce_provider TestNVUniversalGemm.test_scaled_gemm_unit_dim_epilogue_non_current_stream -v
lintrunner -a
```

Authored with an AI assistant.

ghstack-source-id: c14d42f
Pull-Request: #192928
mlazos added a commit that referenced this pull request Aug 12, 2026
The CUTLASS Operator API package is not available in fbcode, so the two tests that directly construct, compile, and run operator objects fail before exercising NVGEMM. Keep the torch.compile integration coverage enabled and skip only these direct API tests when IS_FBCODE is set.

Test Plan:

```bash
PYTORCH_TEST_FBCODE=1 python test/inductor/test_nv_universal_gemm.py TestNVUniversalGemm.test_scaled_gemm_grouped_n_reduce_provider TestNVUniversalGemm.test_scaled_gemm_unit_dim_epilogue_non_current_stream -v
python test/inductor/test_nv_universal_gemm.py TestNVUniversalGemm.test_scaled_gemm_grouped_n_reduce_provider TestNVUniversalGemm.test_scaled_gemm_unit_dim_epilogue_non_current_stream -v
lintrunner -a
```

Authored with an AI assistant.

ghstack-source-id: c14d42f
Pull-Request: #192928
[ghstack-poisoned]
[ghstack-poisoned]
mlazos added 2 commits August 28, 2026 14:08
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@mlazos mlazos added the ciflow/trunk Trigger trunk jobs on your pull request label Sep 1, 2026
[ghstack-poisoned]
mlazos added 2 commits August 31, 2026 21:56
[ghstack-poisoned]
[ghstack-poisoned]
@mlazos

mlazos commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge failed

Reason: Merge rule check failed for stacked PR #192298:

1 mandatory check(s) failed. The first few are:

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised by workflow job

Failing merge rule: Core Maintainers

@mlazos

mlazos commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge -f "Added skip sanity checks for a cleanup pr but not taken into account"

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Sanskaaar1 pushed a commit to Sanskaaar1/pytorch that referenced this pull request Sep 8, 2026
doesn't run hese tests in fbcode until we add operator API internally

> This skips two low-level tests only in fbcode because fbcode does not include
> the optional CUTLASS package those tests use to construct and run kernel
> objects directly. The tests fail while importing or creating the operator,
> before they exercise the NVGEMM behavior they are intended to check.
>
> The tests still run in the open-source build, and the higher-level
> `torch.compile` tests remain enabled in fbcode.
>
> ## Architecture
>
> This is a test-only environment boundary. The two tests that directly import
> the optional CUTLASS Operator API are skipped individually when `IS_FBCODE` is
> true. No production lowering, provider registration, or generated-kernel
> behavior changes. The tests continue running in open source, while fbcode
> retains the higher-level compiler coverage.
>
> ## Example
>
> The affected tests directly compile a grouped-reduction provider and a
> unit-dimension epilogue on a non-current CUDA stream. In fbcode, the required
> operator-construction API is absent, so skipping those two tests avoids
> reporting an environment limitation as an NVGEMM correctness failure.
>
>
> ```python
> @unittest.skipIf(
>     IS_FBCODE,
>     "CUTLASS Operator API is not available in fbcode",
> )
> def test_scaled_gemm_grouped_n_reduce_provider(self):
>     ...
> ```
>
> ## Test Plan
>
> ```bash
> PYTORCH_TEST_FBCODE=1 python test/inductor/test_nv_universal_gemm.py TestNVUniversalGemm.test_scaled_gemm_grouped_n_reduce_provider TestNVUniversalGemm.test_scaled_gemm_unit_dim_epilogue_non_current_stream -v
> python test/inductor/test_nv_universal_gemm.py TestNVUniversalGemm.test_scaled_gemm_grouped_n_reduce_provider TestNVUniversalGemm.test_scaled_gemm_unit_dim_epilogue_non_current_stream -v
> lintrunner -a
> ```
>
> Description drafted with an AI assistant.

Pull Request resolved: pytorch#192928
Approved by: https://github.com/karthickai
ghstack dependencies: pytorch#192298, pytorch#190822, pytorch#191514, pytorch#191515, pytorch#190825
pytorchmergebot pushed a commit that referenced this pull request Sep 10, 2026
Orient generated reduction geometry, output layouts, and runtime tensors when NVGEMM swaps GEMM operands. Dense and block-scaled epilogues continue to use the shared generated source, combine, and finalizer callbacks.

Keep the kernel reduction mechanism unchanged. Candidate validation filters physical tile layouts that cross CTA or warp ownership, leaving valid configurations in the normal autotuning set and falling back safely when a layout cannot implement the reduction.

## Test Plan

```bash
PYTHONPATH=/data/users/mlazos/pytorch/agent_space/runtime_overlay PYTORCH_BOUNDARY_ROOT=$PWD python test/inductor/test_nv_universal_gemm.py -k swap_ab
PYTHONPATH=/data/users/mlazos/pytorch/agent_space/runtime_overlay PYTORCH_BOUNDARY_ROOT=$PWD python test/inductor/test_nv_universal_gemm.py -k grouped_reduce
spin quicklint
lintrunner -a
```

Authored with an AI assistant.

Pull Request resolved: #195538
Approved by: https://github.com/karthickai
ghstack dependencies: #192298, #190822, #191514, #191515, #190825, #192928
pytorchmergebot pushed a commit that referenced this pull request Sep 10, 2026
Generate vendored dense EFC variants for the validated SM100 N-tile widths through 256, including 160, 192, and 224. This makes the configurations available to nvMatmulHeuristics without retaining them unconditionally.

Keep the existing supplemented benchmark space unchanged. Wider candidates enter autotuning only when nvMatmulHeuristics selects them, avoiding additional profiling by default.

## Test Plan

```bash
PYTHONPATH=/data/users/mlazos/pytorch/agent_space/runtime_overlay PYTORCH_BOUNDARY_ROOT=$PWD python test/inductor/test_nv_universal_gemm.py TestNVUniversalGemm.test_vendored_dense_efc_exposes_wide_n_tiles -v
lintrunner -a
```

Authored with an AI assistant.

Pull Request resolved: #195539
Approved by: https://github.com/karthickai
ghstack dependencies: #192298, #190822, #191514, #191515, #190825, #192928, #195538
@github-actions
github-actions Bot deleted the gh/mlazos/298/head branch November 14, 2026 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants