Skip to content

Add scalar autograd tests for functions requiring 'special' Variables… - #4953

Merged
gchanan merged 17 commits into
pytorch:masterfrom
gchanan:scalar_multi3
Feb 1, 2018
Merged

gchanan merged 17 commits into
pytorch:masterfrom
gchanan:scalar_multi3

Conversation

@gchanan

@gchanan gchanan commented Jan 31, 2018

Copy link
Copy Markdown
Contributor

… on LHS.

Comment thread torch/autograd/gradcheck.py Outdated
continue
if not i.grad.data.eq(0).all():
return fail_test('backward not multiplied by grad_output')
if type(i.grad) != type(i):

This comment was marked as off-topic.

There are a couple of hacks here:
1) We need to squeeze the backward result because of implicit broadcast of the arguments to match behavior of ger.
2) The broadcast_dims code doesn't work for scalars; I added support for adding '.scalar' onto the end of the broadcast
   specification, but really this should just be a native function with _out support.
There is no dot_out, so the lack of _out isn't an issue.
@colesbury

Copy link
Copy Markdown
Contributor

I don't think we should allow scalars in addr unless we're going to add support for N-dimensional tensors.

@gchanan

gchanan commented Jan 31, 2018

Copy link
Copy Markdown
Contributor Author

That same logic should apply to ger and should be easy to do assuming we are willing to get rid of the out variants -- do you want to do that?

@gchanan

gchanan commented Feb 1, 2018

Copy link
Copy Markdown
Contributor Author

ok, I'm going to back out the contentious stuff; anything we do would probably be done as a native function, where we would want out support; I'll add that in a separate PR and we'll decide what to do after that.

@gchanan

gchanan commented Feb 1, 2018

Copy link
Copy Markdown
Contributor Author

@pytorchbot retest this please.

@gchanan

gchanan commented Feb 1, 2018

Copy link
Copy Markdown
Contributor Author

Onnx failure looks unrelated.

@gchanan
gchanan merged commit d183f23 into pytorch:master Feb 1, 2018
tszulist-hbn added a commit to tszulist-hbn/pytorch that referenced this pull request Oct 11, 2026
The previous commits skip 19 fft/stft ops on XPU in every functorch transform
test, because in August they segfaulted workers at random on a local Data
Center GPU Max 1550 (intel/torch-xpu-ops#4953). The skips date from the first
commit of this stack, so XPU CI has never run these tests and the crash has not
been seen on a CI machine (Data Center GPU Max 1100).

With the skips removed, all 266 tests pass on an Arc B580 across four runs, one
of them with two xdist workers as CI uses, with no crash. Intel's CI runs its
fork of this file (test/xpu/functorch/test_ops_xpu.py) with no fft/stft skips.
Removing them here lets XPU CI settle whether the crash is still there; if it
is, the job log is the evidence pytorch#4953 lacks and the skips come back with it.

xpu_unsupported now holds only the grid_sample xfail and stays the single name
every XPU entry goes through.

Test Plan: on an Arc B580:

```
cd test
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and (fft_ or stft)"
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and grid_sample"
```

fft/stft: 290 passed, 4 xfailed (the existing all-device has_batch_rule xfails
of fft.ihfft2 and fft.ihfftn), 0 failed. The 290 include the 28 fftshift and
ifftshift tests, which were never skipped. grid_sample: 9 passed, 20 skipped,
13 xfailed, 0 xpassed, unchanged by this commit.

lintrunner test/functorch/test_ops.py is clean.

Authored with assistance from an AI coding assistant (Claude Code).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
pytorchmergebot pushed a commit to tszulist-hbn/pytorch that referenced this pull request Oct 12, 2026
The previous commits skip 19 fft/stft ops on XPU in every functorch transform
test, because in August they segfaulted workers at random on a local Data
Center GPU Max 1550 (intel/torch-xpu-ops#4953). The skips date from the first
commit of this stack, so XPU CI has never run these tests and the crash has not
been seen on a CI machine (Data Center GPU Max 1100).

With the skips removed, all 266 tests pass on an Arc B580 across four runs, one
of them with two xdist workers as CI uses, with no crash. Intel's CI runs its
fork of this file (test/xpu/functorch/test_ops_xpu.py) with no fft/stft skips.
Removing them here lets XPU CI settle whether the crash is still there; if it
is, the job log is the evidence pytorch#4953 lacks and the skips come back with it.

xpu_unsupported now holds only the grid_sample xfail and stays the single name
every XPU entry goes through.

Test Plan: on an Arc B580:

```
cd test
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and (fft_ or stft)"
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and grid_sample"
```

fft/stft: 290 passed, 4 xfailed (the existing all-device has_batch_rule xfails
of fft.ihfft2 and fft.ihfftn), 0 failed. The 290 include the 28 fftshift and
ifftshift tests, which were never skipped. grid_sample: 9 passed, 20 skipped,
13 xfailed, 0 xpassed, unchanged by this commit.

lintrunner test/functorch/test_ops.py is clean.

Authored with assistance from an AI coding assistant (Claude Code).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
pytorchmergebot pushed a commit to tszulist-hbn/pytorch that referenced this pull request Oct 15, 2026
The previous commits skip 19 fft/stft ops on XPU in every functorch transform
test, because in August they segfaulted workers at random on a local Data
Center GPU Max 1550 (intel/torch-xpu-ops#4953). The skips date from the first
commit of this stack, so XPU CI has never run these tests and the crash has not
been seen on a CI machine (Data Center GPU Max 1100).

With the skips removed, all 266 tests pass on an Arc B580 across four runs, one
of them with two xdist workers as CI uses, with no crash. Intel's CI runs its
fork of this file (test/xpu/functorch/test_ops_xpu.py) with no fft/stft skips.
Removing them here lets XPU CI settle whether the crash is still there; if it
is, the job log is the evidence pytorch#4953 lacks and the skips come back with it.

xpu_unsupported now holds only the grid_sample xfail and stays the single name
every XPU entry goes through.

Test Plan: on an Arc B580:

```
cd test
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and (fft_ or stft)"
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and grid_sample"
```

fft/stft: 290 passed, 4 xfailed (the existing all-device has_batch_rule xfails
of fft.ihfft2 and fft.ihfftn), 0 failed. The 290 include the 28 fftshift and
ifftshift tests, which were never skipped. grid_sample: 9 passed, 20 skipped,
13 xfailed, 0 xpassed, unchanged by this commit.

lintrunner test/functorch/test_ops.py is clean.

Authored with assistance from an AI coding assistant (Claude Code).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
pytorchmergebot pushed a commit to tszulist-hbn/pytorch that referenced this pull request Oct 15, 2026
The previous commits skip 19 fft/stft ops on XPU in every functorch transform
test, because in August they segfaulted workers at random on a local Data
Center GPU Max 1550 (intel/torch-xpu-ops#4953). The skips date from the first
commit of this stack, so XPU CI has never run these tests and the crash has not
been seen on a CI machine (Data Center GPU Max 1100).

With the skips removed, all 266 tests pass on an Arc B580 across four runs, one
of them with two xdist workers as CI uses, with no crash. Intel's CI runs its
fork of this file (test/xpu/functorch/test_ops_xpu.py) with no fft/stft skips.
Removing them here lets XPU CI settle whether the crash is still there; if it
is, the job log is the evidence pytorch#4953 lacks and the skips come back with it.

xpu_unsupported now holds only the grid_sample xfail and stays the single name
every XPU entry goes through.

Test Plan: on an Arc B580:

```
cd test
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and (fft_ or stft)"
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and grid_sample"
```

fft/stft: 290 passed, 4 xfailed (the existing all-device has_batch_rule xfails
of fft.ihfft2 and fft.ihfftn), 0 failed. The 290 include the 28 fftshift and
ifftshift tests, which were never skipped. grid_sample: 9 passed, 20 skipped,
13 xfailed, 0 xpassed, unchanged by this commit.

lintrunner test/functorch/test_ops.py is clean.

Authored with assistance from an AI coding assistant (Claude Code).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
pytorchmergebot pushed a commit to tszulist-hbn/pytorch that referenced this pull request Oct 16, 2026
The previous commits skip 19 fft/stft ops on XPU in every functorch transform
test, because in August they segfaulted workers at random on a local Data
Center GPU Max 1550 (intel/torch-xpu-ops#4953). The skips date from the first
commit of this stack, so XPU CI has never run these tests and the crash has not
been seen on a CI machine (Data Center GPU Max 1100).

With the skips removed, all 266 tests pass on an Arc B580 across four runs, one
of them with two xdist workers as CI uses, with no crash. Intel's CI runs its
fork of this file (test/xpu/functorch/test_ops_xpu.py) with no fft/stft skips.
Removing them here lets XPU CI settle whether the crash is still there; if it
is, the job log is the evidence pytorch#4953 lacks and the skips come back with it.

xpu_unsupported now holds only the grid_sample xfail and stays the single name
every XPU entry goes through.

Test Plan: on an Arc B580:

```
cd test
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and (fft_ or stft)"
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and grid_sample"
```

fft/stft: 290 passed, 4 xfailed (the existing all-device has_batch_rule xfails
of fft.ihfft2 and fft.ihfftn), 0 failed. The 290 include the 28 fftshift and
ifftshift tests, which were never skipped. grid_sample: 9 passed, 20 skipped,
13 xfailed, 0 xpassed, unchanged by this commit.

lintrunner test/functorch/test_ops.py is clean.

Authored with assistance from an AI coding assistant (Claude Code).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
pytorchmergebot pushed a commit to tszulist-hbn/pytorch that referenced this pull request Oct 17, 2026
The previous commits skip 19 fft/stft ops on XPU in every functorch transform
test, because in August they segfaulted workers at random on a local Data
Center GPU Max 1550 (intel/torch-xpu-ops#4953). The skips date from the first
commit of this stack, so XPU CI has never run these tests and the crash has not
been seen on a CI machine (Data Center GPU Max 1100).

With the skips removed, all 266 tests pass on an Arc B580 across four runs, one
of them with two xdist workers as CI uses, with no crash. Intel's CI runs its
fork of this file (test/xpu/functorch/test_ops_xpu.py) with no fft/stft skips.
Removing them here lets XPU CI settle whether the crash is still there; if it
is, the job log is the evidence pytorch#4953 lacks and the skips come back with it.

xpu_unsupported now holds only the grid_sample xfail and stays the single name
every XPU entry goes through.

Test Plan: on an Arc B580:

```
cd test
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and (fft_ or stft)"
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and grid_sample"
```

fft/stft: 290 passed, 4 xfailed (the existing all-device has_batch_rule xfails
of fft.ihfft2 and fft.ihfftn), 0 failed. The 290 include the 28 fftshift and
ifftshift tests, which were never skipped. grid_sample: 9 passed, 20 skipped,
13 xfailed, 0 xpassed, unchanged by this commit.

lintrunner test/functorch/test_ops.py is clean.

Authored with assistance from an AI coding assistant (Claude Code).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
tszulist-hbn added a commit to tszulist-hbn/pytorch that referenced this pull request Oct 19, 2026
The previous commits skip 19 fft/stft ops on XPU in every functorch transform
test, because in August they segfaulted workers at random on a local Data
Center GPU Max 1550 (intel/torch-xpu-ops#4953). The skips date from the first
commit of this stack, so XPU CI has never run these tests and the crash has not
been seen on a CI machine (Data Center GPU Max 1100).

With the skips removed, all 266 tests pass on an Arc B580 across four runs, one
of them with two xdist workers as CI uses, with no crash. Intel's CI runs its
fork of this file (test/xpu/functorch/test_ops_xpu.py) with no fft/stft skips.
Removing them here lets XPU CI settle whether the crash is still there; if it
is, the job log is the evidence pytorch#4953 lacks and the skips come back with it.

xpu_unsupported now holds only the grid_sample xfail and stays the single name
every XPU entry goes through.

Test Plan: on an Arc B580:

```
cd test
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and (fft_ or stft)"
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and grid_sample"
```

fft/stft: 290 passed, 4 xfailed (the existing all-device has_batch_rule xfails
of fft.ihfft2 and fft.ihfftn), 0 failed. The 290 include the 28 fftshift and
ifftshift tests, which were never skipped. grid_sample: 9 passed, 20 skipped,
13 xfailed, 0 xpassed, unchanged by this commit.

lintrunner test/functorch/test_ops.py is clean.

Authored with assistance from an AI coding assistant (Claude Code).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
tszulist-hbn added a commit to tszulist-hbn/pytorch that referenced this pull request Oct 19, 2026
The previous commits skip 19 fft/stft ops on XPU in every functorch transform
test, because in August they segfaulted workers at random on a local Data
Center GPU Max 1550 (intel/torch-xpu-ops#4953). The skips date from the first
commit of this stack, so XPU CI has never run these tests and the crash has not
been seen on a CI machine (Data Center GPU Max 1100).

With the skips removed, all 266 tests pass on an Arc B580 across four runs, one
of them with two xdist workers as CI uses, with no crash. Intel's CI runs its
fork of this file (test/xpu/functorch/test_ops_xpu.py) with no fft/stft skips.
Removing them here lets XPU CI settle whether the crash is still there; if it
is, the job log is the evidence pytorch#4953 lacks and the skips come back with it.

xpu_unsupported now holds only the grid_sample xfail and stays the single name
every XPU entry goes through.

Test Plan: on an Arc B580:

```
cd test
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and (fft_ or stft)"
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and grid_sample"
```

fft/stft: 290 passed, 4 xfailed (the existing all-device has_batch_rule xfails
of fft.ihfft2 and fft.ihfftn), 0 failed. The 290 include the 28 fftshift and
ifftshift tests, which were never skipped. grid_sample: 9 passed, 20 skipped,
13 xfailed, 0 xpassed, unchanged by this commit.

lintrunner test/functorch/test_ops.py is clean.

Authored with assistance from an AI coding assistant (Claude Code).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
pytorchmergebot pushed a commit to tszulist-hbn/pytorch that referenced this pull request Oct 20, 2026
The previous commits skip 19 fft/stft ops on XPU in every functorch transform
test, because in August they segfaulted workers at random on a local Data
Center GPU Max 1550 (intel/torch-xpu-ops#4953). The skips date from the first
commit of this stack, so XPU CI has never run these tests and the crash has not
been seen on a CI machine (Data Center GPU Max 1100).

With the skips removed, all 266 tests pass on an Arc B580 across four runs, one
of them with two xdist workers as CI uses, with no crash. Intel's CI runs its
fork of this file (test/xpu/functorch/test_ops_xpu.py) with no fft/stft skips.
Removing them here lets XPU CI settle whether the crash is still there; if it
is, the job log is the evidence pytorch#4953 lacks and the skips come back with it.

xpu_unsupported now holds only the grid_sample xfail and stays the single name
every XPU entry goes through.

Test Plan: on an Arc B580:

```
cd test
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and (fft_ or stft)"
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and grid_sample"
```

fft/stft: 290 passed, 4 xfailed (the existing all-device has_batch_rule xfails
of fft.ihfft2 and fft.ihfftn), 0 failed. The 290 include the 28 fftshift and
ifftshift tests, which were never skipped. grid_sample: 9 passed, 20 skipped,
13 xfailed, 0 xpassed, unchanged by this commit.

lintrunner test/functorch/test_ops.py is clean.

Authored with assistance from an AI coding assistant (Claude Code).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
tszulist-hbn added a commit to tszulist-hbn/pytorch that referenced this pull request Oct 20, 2026
The previous commits skip 19 fft/stft ops on XPU in every functorch transform
test, because in August they segfaulted workers at random on a local Data
Center GPU Max 1550 (intel/torch-xpu-ops#4953). The skips date from the first
commit of this stack, so XPU CI has never run these tests and the crash has not
been seen on a CI machine (Data Center GPU Max 1100).

With the skips removed, all 266 tests pass on an Arc B580 across four runs, one
of them with two xdist workers as CI uses, with no crash. Intel's CI runs its
fork of this file (test/xpu/functorch/test_ops_xpu.py) with no fft/stft skips.
Removing them here lets XPU CI settle whether the crash is still there; if it
is, the job log is the evidence pytorch#4953 lacks and the skips come back with it.

xpu_unsupported now holds only the grid_sample xfail and stays the single name
every XPU entry goes through.

Test Plan: on an Arc B580:

```
cd test
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and (fft_ or stft)"
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and grid_sample"
```

fft/stft: 290 passed, 4 xfailed (the existing all-device has_batch_rule xfails
of fft.ihfft2 and fft.ihfftn), 0 failed. The 290 include the 28 fftshift and
ifftshift tests, which were never skipped. grid_sample: 9 passed, 20 skipped,
13 xfailed, 0 xpassed, unchanged by this commit.

lintrunner test/functorch/test_ops.py is clean.

Authored with assistance from an AI coding assistant (Claude Code).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
tszulist-hbn added a commit to tszulist-hbn/pytorch that referenced this pull request Oct 20, 2026
The previous commits skip 19 fft/stft ops on XPU in every functorch transform
test, because in August they segfaulted workers at random on a local Data
Center GPU Max 1550 (intel/torch-xpu-ops#4953). The skips date from the first
commit of this stack, so XPU CI has never run these tests and the crash has not
been seen on a CI machine (Data Center GPU Max 1100).

With the skips removed, all 266 tests pass on an Arc B580 across four runs, one
of them with two xdist workers as CI uses, with no crash. Intel's CI runs its
fork of this file (test/xpu/functorch/test_ops_xpu.py) with no fft/stft skips.
Removing them here lets XPU CI settle whether the crash is still there; if it
is, the job log is the evidence pytorch#4953 lacks and the skips come back with it.

xpu_unsupported now holds only the grid_sample xfail and stays the single name
every XPU entry goes through.

Test Plan: on an Arc B580:

```
cd test
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and (fft_ or stft)"
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and grid_sample"
```

fft/stft: 290 passed, 4 xfailed (the existing all-device has_batch_rule xfails
of fft.ihfft2 and fft.ihfftn), 0 failed. The 290 include the 28 fftshift and
ifftshift tests, which were never skipped. grid_sample: 9 passed, 20 skipped,
13 xfailed, 0 xpassed, unchanged by this commit.

lintrunner test/functorch/test_ops.py is clean.

Authored with assistance from an AI coding assistant (Claude Code).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
tszulist-hbn added a commit to tszulist-hbn/pytorch that referenced this pull request Oct 20, 2026
The previous commits skip 19 fft/stft ops on XPU in every functorch transform
test, because in August they segfaulted workers at random on a local Data
Center GPU Max 1550 (intel/torch-xpu-ops#4953). The skips date from the first
commit of this stack, so XPU CI has never run these tests and the crash has not
been seen on a CI machine (Data Center GPU Max 1100).

With the skips removed, all 266 tests pass on an Arc B580 across four runs, one
of them with two xdist workers as CI uses, with no crash. Intel's CI runs its
fork of this file (test/xpu/functorch/test_ops_xpu.py) with no fft/stft skips.
Removing them here lets XPU CI settle whether the crash is still there; if it
is, the job log is the evidence pytorch#4953 lacks and the skips come back with it.

xpu_unsupported now holds only the grid_sample xfail and stays the single name
every XPU entry goes through.

Test Plan: on an Arc B580:

```
cd test
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and (fft_ or stft)"
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and grid_sample"
```

fft/stft: 290 passed, 4 xfailed (the existing all-device has_batch_rule xfails
of fft.ihfft2 and fft.ihfftn), 0 failed. The 290 include the 28 fftshift and
ifftshift tests, which were never skipped. grid_sample: 9 passed, 20 skipped,
13 xfailed, 0 xpassed, unchanged by this commit.

lintrunner test/functorch/test_ops.py is clean.

Authored with assistance from an AI coding assistant (Claude Code).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
tszulist-hbn added a commit to tszulist-hbn/pytorch that referenced this pull request Oct 20, 2026
The previous commits skip 19 fft/stft ops on XPU in every functorch transform
test, because in August they segfaulted workers at random on a local Data
Center GPU Max 1550 (intel/torch-xpu-ops#4953). The skips date from the first
commit of this stack, so XPU CI has never run these tests and the crash has not
been seen on a CI machine (Data Center GPU Max 1100).

With the skips removed, all 266 tests pass on an Arc B580 across four runs, one
of them with two xdist workers as CI uses, with no crash. Intel's CI runs its
fork of this file (test/xpu/functorch/test_ops_xpu.py) with no fft/stft skips.
Removing them here lets XPU CI settle whether the crash is still there; if it
is, the job log is the evidence pytorch#4953 lacks and the skips come back with it.

xpu_unsupported now holds only the grid_sample xfail and stays the single name
every XPU entry goes through.

Test Plan: on an Arc B580:

```
cd test
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and (fft_ or stft)"
PYTORCH_TESTING_DEVICE_ONLY_FOR=xpu python -m pytest functorch/test_ops.py \
  -p no:randomly -n 2 -q -rfEX -k "TestOperatorsDeviceXPU and grid_sample"
```

fft/stft: 290 passed, 4 xfailed (the existing all-device has_batch_rule xfails
of fft.ihfft2 and fft.ihfftn), 0 failed. The 290 include the 28 fftshift and
ifftshift tests, which were never skipped. grid_sample: 9 passed, 20 skipped,
13 xfailed, 0 xpassed, unchanged by this commit.

lintrunner test/functorch/test_ops.py is clean.

Authored with assistance from an AI coding assistant (Claude Code).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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