Skip to content

Commit 26b9224

Browse files
committed
Skip the GPT interpreter tests on Windows
Six tests intermittently kill their xdist worker on windows-latest: Windows fatal exception: code 0xc000001d [gw1] node down: Not properly terminated Always the same six, all of which interpret a whole GPT model, and on about half the runs. They fail on released and nightly torch alike, and the branch they fail on has passed with the same torch on other runs, so this is the machine the job lands on rather than anything in the tree. The previous attempt here set ATEN_CPU_CAPABILITY=default on Windows, on the theory that the wheels carry AVX-512 instructions inside kernels compiled for the AVX2 target. A diagnostic step confirmed the capability was applied, and all six still crashed, so that theory is wrong and the workflow change is reverted. The fault is in native code, below any Python frame, so it cannot be caught or retried in process: it takes the worker down and pytest only ever sees a dead channel. Skip them on Windows until the crash is understood. The same models stay covered on Linux and macOS.
1 parent 4f5a4b9 commit 26b9224

4 files changed

Lines changed: 10 additions & 18 deletions

File tree

.github/workflows/ci-testing.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,6 @@ jobs:
4545
# Timeout: https://stackoverflow.com/a/59076067/4521646
4646
timeout-minutes: 35
4747

48-
env:
49-
# torch's Windows CPU wheels carry AVX-512 instructions inside kernels compiled for the
50-
# AVX2 target, so on a runner whose CPU stops at AVX2 they fault with
51-
# STATUS_ILLEGAL_INSTRUCTION (0xc000001d) and take the xdist worker down with them. The
52-
# reported fault sits in the bfloat16 vector helpers, which is why the nanogpt and litgpt
53-
# tests are the ones that crash: they are the only ones here running a model in bfloat16.
54-
# Fall back to the unvectorized kernels on Windows until this is fixed upstream.
55-
# Ref: https://github.com/pytorch/pytorch/issues/145702
56-
ATEN_CPU_CAPABILITY: ${{ startsWith(matrix.os, 'windows') && 'default' || '' }}
57-
5848
steps:
5949
- uses: actions/checkout@v5
6050
- name: Set up Python ${{ matrix.python-version }}
@@ -111,12 +101,6 @@ jobs:
111101
--extra-index-url=${TORCH_URL}
112102
pip list
113103
114-
- name: Show CPU dispatch
115-
# So a green Windows run can be told apart from a run that happened to land on a CPU
116-
# the bad kernels do not fault on. Expect DEFAULT here, not AVX2.
117-
if: runner.os == 'Windows'
118-
run: python -c "import torch; print('cpu capability:', torch.backends.cpu.get_cpu_capability())"
119-
120104
- name: Testing Local
121105
if: matrix.suite == 'core'
122106
run: |

thunder/tests/framework.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ class NOTHING:
5858
)
5959
IS_WINDOWS = platform.system() == "Windows"
6060

61+
# NOTE Interpreting a whole GPT model intermittently kills the process on Windows with an illegal
62+
# instruction, in native code below any frame we could catch. Still covered on Linux and macOS.
63+
WINDOWS_GPT_CRASH_REASON = "intermittently crashes the test process on Windows (0xc000001d)"
64+
6165

6266
def _bitsandbytes_available():
6367
if not package_available("bitsandbytes"):

thunder/tests/test_interpreter.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import pytest
1212
import torch
1313
from torch.testing import assert_close
14-
from thunder.tests.framework import IS_WINDOWS
14+
from thunder.tests.framework import IS_WINDOWS, WINDOWS_GPT_CRASH_REASON
1515

1616
import thunder
1717
from thunder.core.interpreter import (
@@ -3413,6 +3413,7 @@ def test_nanogpt_block(jit):
34133413
assert_close(result, fn(*args, **kwargs))
34143414

34153415

3416+
@pytest.mark.skipif(IS_WINDOWS, reason=WINDOWS_GPT_CRASH_REASON)
34163417
def test_nanogpt(jit):
34173418
from thunder.benchmarks import NanoGPTBenchmark, NanoGPTConfig, _nanogpt_configs
34183419

@@ -3428,6 +3429,7 @@ def test_nanogpt(jit):
34283429
assert_close(result, fn(*args, **kwargs))
34293430

34303431

3432+
@pytest.mark.skipif(IS_WINDOWS, reason=WINDOWS_GPT_CRASH_REASON)
34313433
def test_litgpt(jit):
34323434
from thunder.benchmarks import LitGPTBenchmark
34333435
from thunder.tests.litgpt_model import Config

thunder/tests/test_jit_general.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import thunder
1616

17-
from thunder.tests.framework import requiresCUDA, IS_WINDOWS
17+
from thunder.tests.framework import requiresCUDA, IS_WINDOWS, WINDOWS_GPT_CRASH_REASON
1818
from thunder.core.options import CACHE_OPTIONS
1919
import thunder.core.prims as prims
2020
from thunder import pytorch_executor, nvfuser_executor
@@ -585,6 +585,7 @@ def h(d, c):
585585
assert args_names == ("a", "b", "c", "d")
586586

587587

588+
@pytest.mark.skipif(IS_WINDOWS, reason=WINDOWS_GPT_CRASH_REASON)
588589
def test_litgpt():
589590
from thunder.benchmarks import LitGPTBenchmark
590591
from thunder.tests.litgpt_model import Config
@@ -665,6 +666,7 @@ def test_nanogpt_mlp():
665666
assert_close(result, module(*args, **kwargs))
666667

667668

669+
@pytest.mark.skipif(IS_WINDOWS, reason=WINDOWS_GPT_CRASH_REASON)
668670
def test_nanogpt():
669671
from thunder.benchmarks import NanoGPTBenchmark, NanoGPTConfig, _nanogpt_configs
670672

0 commit comments

Comments
 (0)