Skip to content

Commit 8a6176d

Browse files
Copilotjustinchuby
andcommitted
Add test cases with negative dimension indices for FFT
Co-authored-by: justinchuby <11205048+justinchuby@users.noreply.github.com>
1 parent 26bd575 commit 8a6176d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/function_libs/torch_lib/extra_opinfo.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,10 @@ def sample_inputs__fft_r2c(self, device, dtype, requires_grad=False, **_):
736736
(1, 2),
737737
(0, 1),
738738
(0, 1, 2),
739+
# Test negative indices to ensure dimension adjustment after unsqueeze works correctly
740+
(-1,),
741+
(-2,),
742+
(-1, -2),
739743
]:
740744
yield opinfo_core.SampleInput(
741745
nd_tensor(), dim=dim, normalization=normalization, onesided=one_sided

0 commit comments

Comments
 (0)