Skip to content

Commit a786a0f

Browse files
build: manually update PyTorch version (#3977) (#4013)
This commit sets the PyTorch and TorchVision version to nightly release 2025-02-10. --------- Signed-off-by: Vivek Khandelwal <[email protected]>
1 parent 7b8d0bd commit a786a0f

File tree

10 files changed

+20
-19
lines changed

10 files changed

+20
-19
lines changed

include/torch-mlir/Dialect/Torch/IR/GeneratedTorchOps.td

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13704,7 +13704,7 @@ def Torch_AtenStftOp : Torch_Op<"aten.stft", [
1370413704
HasValueSemantics,
1370513705
ReadOnly
1370613706
]> {
13707-
let summary = "Generated op for `aten::stft : (Tensor, int, int?, int?, Tensor?, bool, bool?, bool?) -> (Tensor)`";
13707+
let summary = "Generated op for `aten::stft : (Tensor, int, int?, int?, Tensor?, bool, bool?, bool?, bool?) -> (Tensor)`";
1370813708
let arguments = (ins
1370913709
AnyTorchTensorType:$self,
1371013710
Torch_IntType:$n_fft,
@@ -13713,18 +13713,19 @@ def Torch_AtenStftOp : Torch_Op<"aten.stft", [
1371313713
AnyTorchOptionalTensorType:$window,
1371413714
Torch_BoolType:$normalized,
1371513715
AnyTorchOptionalBoolType:$onesided,
13716-
AnyTorchOptionalBoolType:$return_complex
13716+
AnyTorchOptionalBoolType:$return_complex,
13717+
AnyTorchOptionalBoolType:$align_to_window
1371713718
);
1371813719
let results = (outs
1371913720
AnyTorchOptionalTensorType:$result
1372013721
);
1372113722
let hasCustomAssemblyFormat = 1;
1372213723
let extraClassDefinition = [{
1372313724
ParseResult AtenStftOp::parse(OpAsmParser &parser, OperationState &result) {
13724-
return parseDefaultTorchOp(parser, result, 8, 1);
13725+
return parseDefaultTorchOp(parser, result, 9, 1);
1372513726
}
1372613727
void AtenStftOp::print(OpAsmPrinter &printer) {
13727-
printDefaultTorchOp(printer, *this, 8, 1);
13728+
printDefaultTorchOp(printer, *this, 9, 1);
1372813729
}
1372913730
}];
1373013731
}

lib/Conversion/TorchOnnxToTorch/DefaultDomainQtoZ.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3644,8 +3644,8 @@ void mlir::torch::onnx_c::populateDefaultDomainQtoZ(
36443644
// permutation; both outputs will be equivalent.
36453645
Value stft = rewriter.create<Torch::AtenStftOp>(
36463646
binder.getLoc(), stftTy, signal, frameLengthItem, frameStepItem,
3647-
windowLen, window, falseVal, onesided ? trueVal : falseVal,
3648-
trueVal);
3647+
windowLen, window, falseVal, onesided ? trueVal : falseVal, trueVal,
3648+
falseVal);
36493649

36503650
auto permuteStftTy = complexSignalTy.getWithSizesAndDtype(
36513651
ArrayRef<int64_t>({resultShape[0], resultShape[1], resultShape[2]}),

lib/Dialect/Torch/Transforms/AbstractInterpLibrary.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11057,7 +11057,7 @@ StringRef mlir::torch::Torch::getAbstractInterpLibrary() {
1105711057
" %9 = torch.aten._set_item.t %4, %1, %8 : !torch.list<int>, !torch.int, !torch.int -> !torch.list<int>\n"
1105811058
" return %4 : !torch.list<int>\n"
1105911059
" }\n"
11060-
" func.func @\"__torch_mlir_shape_fn.aten.stft\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<list<int>>, %arg5: !torch.bool, %arg6: !torch.optional<bool>, %arg7: !torch.optional<bool>) -> !torch.list<int> {\n"
11060+
" func.func @\"__torch_mlir_shape_fn.aten.stft\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<list<int>>, %arg5: !torch.bool, %arg6: !torch.optional<bool>, %arg7: !torch.optional<bool>, %arg8: !torch.optional<bool>) -> !torch.list<int> {\n"
1106111061
" %str = torch.constant.str \"AssertionError: Expected hop_length to be greater than 0\"\n"
1106211062
" %str_0 = torch.constant.str \"AssertionError: Expected that 0 < n_fft <= len\"\n"
1106311063
" %false = torch.constant.bool false\n"
@@ -13243,7 +13243,7 @@ StringRef mlir::torch::Torch::getAbstractInterpLibrary() {
1324313243
" }\n"
1324413244
" return %3 : !torch.int\n"
1324513245
" }\n"
13246-
" func.func @\"__torch_mlir_dtype_fn.aten.stft\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<tuple<int, int>>, %arg5: !torch.bool, %arg6: !torch.optional<bool>, %arg7: !torch.optional<bool>) -> !torch.int {\n"
13246+
" func.func @\"__torch_mlir_dtype_fn.aten.stft\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<tuple<int, int>>, %arg5: !torch.bool, %arg6: !torch.optional<bool>, %arg7: !torch.optional<bool>, %arg8: !torch.optional<bool>) -> !torch.int {\n"
1324713247
" %str = torch.constant.str \"AssertionError: Unsupported dtype\"\n"
1324813248
" %int7 = torch.constant.int 7\n"
1324913249
" %int10 = torch.constant.int 10\n"

projects/pt1/python/torch_mlir/jit_ir_importer/build_tools/abstract_interp_lib_gen.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2353,7 +2353,7 @@ def aten〇fft_rfft〡shape(self: List[int], n: Optional[int] = None, dim: int =
23532353
@check_shape_function([
23542354
Invocation(TensorOfShape(1, 128), 16, None, 16, TensorOfShape(16), False, None, True) # With an explicit 1-D window.
23552355
])
2356-
def aten〇stft〡shape(self: List[int], n_fft: int, hop_length: Optional[int] = None, win_length: Optional[int] = None, window: Optional[List[int]] = None, normalized: bool = False, onesided: Optional[bool] = None, return_complex: Optional[bool] = None) -> List[int]:
2356+
def aten〇stft〡shape(self: List[int], n_fft: int, hop_length: Optional[int] = None, win_length: Optional[int] = None, window: Optional[List[int]] = None, normalized: bool = False, onesided: Optional[bool] = None, return_complex: Optional[bool] = None, align_to_window: Optional[bool] = None) -> List[int]:
23572357
assert len(self) == 1 or len(self) == 2, "Expected input tensor to be of shape (B?,L), where B is an optional batch dimension"
23582358

23592359
batch = None if len(self) == 1 else self[0]
@@ -3973,7 +3973,7 @@ def aten〇fft_rfft〡dtype(self_rank_dtype: Tuple[int, int], n: Optional[int] =
39733973
Invocation(TensorOfShape(1,128, dtype=torch.float32), n_fft=16, return_complex=True), # output dtype = torch.complex64
39743974
Invocation(TensorOfShape(1,128, dtype=torch.float32), n_fft=16, return_complex=False), # output dtype = torch.float32
39753975
])
3976-
def aten〇stft〡dtype(self_rank_dtype: Tuple[int, int], n_fft: int, hop_length: Optional[int] = None, win_length: Optional[int] = None, window_rank_dtype: Optional[Tuple[int, int]] = None, normalized: bool = False, onesided: Optional[bool] = None, return_complex: Optional[bool] = None) -> int:
3976+
def aten〇stft〡dtype(self_rank_dtype: Tuple[int, int], n_fft: int, hop_length: Optional[int] = None, win_length: Optional[int] = None, window_rank_dtype: Optional[Tuple[int, int]] = None, normalized: bool = False, onesided: Optional[bool] = None, return_complex: Optional[bool] = None, align_to_window: Optional[bool] = None) -> int:
39773977
self_rank, self_dtype = self_rank_dtype
39783978
if is_complex_dtype(self_dtype) and return_complex is not None and return_complex:
39793979
return self_dtype

projects/pt1/python/torch_mlir/jit_ir_importer/build_tools/torch_ods_gen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,7 @@ def emit_with_mutating_variants(key, **kwargs):
10021002
has_verifier=True,
10031003
)
10041004
emit(
1005-
"aten::stft : (Tensor, int, int?, int?, Tensor?, bool, bool?, bool?) -> (Tensor)"
1005+
"aten::stft : (Tensor, int, int?, int?, Tensor?, bool, bool?, bool?, bool?) -> (Tensor)"
10061006
)
10071007

10081008
# Functionalization ops

projects/pt1/python/torch_mlir_e2e_test/test_suite/rng.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def forward(self, x):
196196

197197
@register_test_case(module_factory=lambda: ExponentialModule())
198198
def ExponentialModule_basic(module, tu: TestUtils):
199-
module.forward(tu.rand(512, 512, 16).double())
199+
module.forward(tu.rand(1024, 1024, 16).double())
200200

201201

202202
# ==============================================================================

pytorch-hash.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
37626ee0e6ff5dc1d38664690bd2ff6c790aab0c
1+
5f7ce38e44791817d326467813e354fde1d01db0

pytorch-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
-f https://download.pytorch.org/whl/nightly/cpu/torch/
22
--pre
3-
torch==2.7.0.dev20250120
3+
torch==2.7.0.dev20250210

test/Conversion/TorchOnnxToTorch/simple_ops_q_to_z.mlir

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2865,7 +2865,7 @@ func.func @test_stft(%arg0: !torch.vtensor<[1,128,1],f32>, %arg1: !torch.vtensor
28652865
// CHECK: %[[SQUEEZE:.*]] = torch.aten.squeeze.dim %arg0, %[[INT2_0]] : !torch.vtensor<[1,128,1],f32>, !torch.int -> !torch.vtensor<[1,128],f32>
28662866
// CHECK: %[[FALSEVAL:.*]] = torch.constant.bool false
28672867
// CHECK: %[[TRUEVAL:.*]] = torch.constant.bool true
2868-
// CHECK: %[[STFT:.*]] = torch.aten.stft %[[SQUEEZE]], %[[FRAMELEN]], %[[FRAMESTEP]], %[[FRAMELEN]], %[[ONESLIST]], %[[FALSEVAL]], %[[TRUEVAL]], %[[TRUEVAL]] : !torch.vtensor<[1,128],f32>, !torch.int, !torch.int, !torch.int, !torch.vtensor<[?],f32>, !torch.bool, !torch.bool, !torch.bool -> !torch.vtensor<[1,9,15],complex<f32>>
2868+
// CHECK: %[[STFT:.*]] = torch.aten.stft %[[SQUEEZE]], %[[FRAMELEN]], %[[FRAMESTEP]], %[[FRAMELEN]], %[[ONESLIST]], %[[FALSEVAL]], %[[TRUEVAL]], %[[TRUEVAL]], %[[FALSEVAL]] : !torch.vtensor<[1,128],f32>, !torch.int, !torch.int, !torch.int, !torch.vtensor<[?],f32>, !torch.bool, !torch.bool, !torch.bool, !torch.bool -> !torch.vtensor<[1,9,15],complex<f32>>
28692869
// CHECK: %[[INT0:.*]] = torch.constant.int 0
28702870
// CHECK: %[[INT2_1:.*]] = torch.constant.int 2
28712871
// CHECK: %[[INT1:.*]] = torch.constant.int 1
@@ -2889,7 +2889,7 @@ func.func @test_stft_real_rank2(%arg0: !torch.vtensor<[1,128],f32>, %arg1: !torc
28892889
// CHECK: %[[ONESLIST:.*]] = torch.aten.ones %[[ONESSHAPE]], %[[NONEVAL]], %[[NONEVAL]], %[[NONEVAL]], %[[NONEVAL]] : !torch.list<int>, !torch.none, !torch.none, !torch.none, !torch.none -> !torch.vtensor<[?],f32>
28902890
// CHECK: %[[FALSEVAL:.*]] = torch.constant.bool false
28912891
// CHECK: %[[TRUEVAL:.*]] = torch.constant.bool true
2892-
// CHECK: %[[STFT:.*]] = torch.aten.stft %arg0, %[[FRAMELEN]], %[[FRAMESTEP]], %[[FRAMELEN]], %[[ONESLIST]], %[[FALSEVAL]], %[[TRUEVAL]], %[[TRUEVAL]] : !torch.vtensor<[1,128],f32>, !torch.int, !torch.int, !torch.int, !torch.vtensor<[?],f32>, !torch.bool, !torch.bool, !torch.bool -> !torch.vtensor<[1,9,15],complex<f32>>
2892+
// CHECK: %[[STFT:.*]] = torch.aten.stft %arg0, %[[FRAMELEN]], %[[FRAMESTEP]], %[[FRAMELEN]], %[[ONESLIST]], %[[FALSEVAL]], %[[TRUEVAL]], %[[TRUEVAL]], %[[FALSEVAL]] : !torch.vtensor<[1,128],f32>, !torch.int, !torch.int, !torch.int, !torch.vtensor<[?],f32>, !torch.bool, !torch.bool, !torch.bool, !torch.bool -> !torch.vtensor<[1,9,15],complex<f32>>
28932893
// CHECK: %[[INT0:.*]] = torch.constant.int 0
28942894
// CHECK: %[[INT2_1:.*]] = torch.constant.int 2
28952895
// CHECK: %[[INT1:.*]] = torch.constant.int 1
@@ -2913,7 +2913,7 @@ func.func @test_stft_with_window(%arg0: !torch.vtensor<[1,128,1],f32>, %arg1: !t
29132913
// CHECK: %[[WINDOWLEN:.*]] = torch.constant.int 16
29142914
// CHECK: %[[FALSEVAL:.*]] = torch.constant.bool false
29152915
// CHECK: %[[TRUEVAL:.*]] = torch.constant.bool true
2916-
// CHECK: %[[STFT:.*]] = torch.aten.stft %[[SQUEEZE]], %[[FRAMELEN]], %[[FRAMESTEP]], %[[WINDOWLEN]], %arg2, %[[FALSEVAL]], %[[TRUEVAL]], %[[TRUEVAL]] : !torch.vtensor<[1,128],f32>, !torch.int, !torch.int, !torch.int, !torch.vtensor<[16],f32>, !torch.bool, !torch.bool, !torch.bool -> !torch.vtensor<[1,9,15],complex<f32>>
2916+
// CHECK: %[[STFT:.*]] = torch.aten.stft %[[SQUEEZE]], %[[FRAMELEN]], %[[FRAMESTEP]], %[[WINDOWLEN]], %arg2, %[[FALSEVAL]], %[[TRUEVAL]], %[[TRUEVAL]], %[[FALSEVAL]] : !torch.vtensor<[1,128],f32>, !torch.int, !torch.int, !torch.int, !torch.vtensor<[16],f32>, !torch.bool, !torch.bool, !torch.bool, !torch.bool -> !torch.vtensor<[1,9,15],complex<f32>>
29172917
// CHECK: %[[INT0:.*]] = torch.constant.int 0
29182918
// CHECK: %[[INT2_1:.*]] = torch.constant.int 2
29192919
// CHECK: %[[INT1:.*]] = torch.constant.int 1
@@ -2936,7 +2936,7 @@ func.func @test_stft_with_window_and_framelen(%arg0: !torch.vtensor<[1,128,1],f3
29362936
// CHECK: %[[WINDOWLEN:.*]] = torch.constant.int 16
29372937
// CHECK: %[[FALSEVAL:.*]] = torch.constant.bool false
29382938
// CHECK: %[[TRUEVAL:.*]] = torch.constant.bool true
2939-
// CHECK: %[[STFT:.*]] = torch.aten.stft %[[SQUEEZE]], %[[FRAMELEN]], %[[FRAMESTEP]], %[[WINDOWLEN]], %arg2, %[[FALSEVAL]], %[[TRUEVAL]], %[[TRUEVAL]] : !torch.vtensor<[1,128],f32>, !torch.int, !torch.int, !torch.int, !torch.vtensor<[16],f32>, !torch.bool, !torch.bool, !torch.bool -> !torch.vtensor<[1,9,15],complex<f32>>
2939+
// CHECK: %[[STFT:.*]] = torch.aten.stft %[[SQUEEZE]], %[[FRAMELEN]], %[[FRAMESTEP]], %[[WINDOWLEN]], %arg2, %[[FALSEVAL]], %[[TRUEVAL]], %[[TRUEVAL]], %[[FALSEVAL]] : !torch.vtensor<[1,128],f32>, !torch.int, !torch.int, !torch.int, !torch.vtensor<[16],f32>, !torch.bool, !torch.bool, !torch.bool, !torch.bool -> !torch.vtensor<[1,9,15],complex<f32>>
29402940
// CHECK: %[[INT0:.*]] = torch.constant.int 0
29412941
// CHECK: %[[INT2_1:.*]] = torch.constant.int 2
29422942
// CHECK: %[[INT1:.*]] = torch.constant.int 1

torchvision-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
-f https://download.pytorch.org/whl/nightly/cpu/torchvision/
22
--pre
3-
torchvision==0.22.0.dev20250120
3+
torchvision==0.22.0.dev20250210

0 commit comments

Comments
 (0)