Skip to content

test(ci): skip the group_norm samples torch 2.14 rejects [7/n] - #2844

Open
bhimrazy wants to merge 1 commit into
bhimrazy/torch-fx-interpreterfrom
bhimrazy/group-norm-torch-214
Open

bhimrazy wants to merge 1 commit into
bhimrazy/torch-fx-interpreterfrom
bhimrazy/group-norm-torch-214

Conversation

@bhimrazy

@bhimrazy bhimrazy commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

Skips the group_norm samples that torch 2.14 no longer accepts.

Problem: torch 2.14 rejects group_norm inputs with an empty channel or spatial dim (Expected number of channels to be greater than 0). The sample generator builds shapes from (0, 2), so torch's reference now fails on some samples. Thunder's group_norm is fine.

Fix: skip those samples on torch 2.14+, gated on a new _TORCH_GREATER_EQUAL_2_14 in thunder/constants.py. Older torch still covers them, and empty-batch samples stay.

Related CI: the only failure in all eight grads and ops jobs:

  • pytester (ubuntu-22.04 / macOS-15, 3.10, latest / nightly, grads): test_vjp_correctness_group_norm
  • pytester (ubuntu-22.04 / macOS-15, 3.10, latest / nightly, ops): test_core_vs_torch_consistency_group_norm
CI log (pytester (ubuntu-22.04, 3.10, latest, ops), on #2842)
FAILED thunder/tests/test_ops.py::test_core_vs_torch_consistency_group_norm_torch_cpu_thunder.dtypes.bfloat16 - RuntimeError: Expected number of channels to be greater than 0, got 0
FAILED thunder/tests/test_ops.py::test_core_vs_torch_consistency_group_norm_torch_cpu_thunder.dtypes.float32 - RuntimeError: Expected number of channels to be greater than 0, got 0
FAILED thunder/tests/test_ops.py::test_core_vs_torch_consistency_group_norm_torch_cpu_thunder.dtypes.float64 - RuntimeError: Expected number of channels to be greater than 0, got 0
= 3 failed, 2209 passed, 508 skipped, 50 xfailed, 87 xpassed, 92075 warnings in 695.56s (0:11:35) =

Part 7 of the breakdown of #2832.

@bhimrazy
bhimrazy added this pull request to stack #2839 September 24, 2026 08:31
@bhimrazy
bhimrazy force-pushed the bhimrazy/group-norm-torch-214 branch from cdeb573 to 6f40e6f Compare September 24, 2026 08:47
@bhimrazy
bhimrazy force-pushed the bhimrazy/group-norm-torch-214 branch from 6f40e6f to 5131b42 Compare September 24, 2026 11:10
@bhimrazy
bhimrazy removed this pull request from stack #2839 September 24, 2026 11:11
@bhimrazy
bhimrazy added this pull request to stack #2849 September 24, 2026 11:12
@bhimrazy
bhimrazy force-pushed the bhimrazy/group-norm-torch-214 branch from 5131b42 to 321fb2c Compare September 24, 2026 12:29
torch 2.14 rejects group_norm inputs with an empty channel or spatial
extent ("Expected number of channels to be greater than 0", "Expected HxW
to be greater than 0"); 2.13 and earlier accepted them. The sample
generator builds shapes from (0, 2) in every dim, so the torch reference
failed on inputs it now refuses. An empty batch is still accepted, so only
channels and the spatial dims are filtered.

The boundary is 2.14, not 2.13, hence the new constant.
@bhimrazy
bhimrazy force-pushed the bhimrazy/group-norm-torch-214 branch from 321fb2c to 74d1cb5 Compare September 24, 2026 13:44
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