Skip to content

Commit

Permalink
build: manually update PyTorch version (llvm#3896)
Browse files Browse the repository at this point in the history
This commit sets the PyTorch and TorchVision version to nightly release
2024-12-01.

This commit also updates the test checks in
`test/python/fx_importer/v2.3/auto_functionalized.py`.

Failing tests are tracked through
llvm#3796.

---------

Signed-off-by: Vivek Khandelwal <vivekkhandelwal1424@gmail.com>
  • Loading branch information
vivekkhandelwal1 authored and mgehre-amd committed Jan 16, 2025
1 parent 594b0bd commit 53ef6d8
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 27 deletions.
35 changes: 15 additions & 20 deletions projects/pt1/e2e_testing/xfail_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,6 @@
"RepeatInterleaveModule_basic",
"RepeatInterleaveStaticModule_basic",
"ScalarImplicitFloatModule_basic",
"SortIntListReverse_basic",
"SortIntList_basic",
"SplitDimDynamicModule_basic",
"SplitDimStaticModule_basic",
"SqrtIntModule_basic",
Expand Down Expand Up @@ -557,27 +555,18 @@
"CrossEntropyLossNoReductionModule_basic",
"ElementwiseExpm1IntModule_basic",
"ElementwiseExpm1Module_basic",
"IndexPutImpl1DFloatAccumulateModule_basic",
"IndexPutImpl1DFloatNonAccumulateModule_basic",
"IndexPutImpl1DIntAccumulateModule_basic",
"IndexPutImpl1DIntNonAccumulateModule_basic",
"IndexPutImpl2DFloatNonAccumulateModule_basic",
"IndexPutImpl2DImplicitModule_basic",
"IndexPutImpl2DIndexModule_basic",
"IndexPutImpl2DNoneIndexStaticModule_basic",
"IndexPutImpl3DFloatNonAccumulateModule_basic",
"IndexPutImplIndexWithNoneModule_basic",
"InterpolateDynamicModule_sizes_nearest",
"IouOfModule_basic",
"MeshgridIndexingIJ_basic",
"MeshgridIndexingXY_basic",
"Meshgrid_basic",
"OneHotModule_basic",
# RuntimeError: cannot mutate tensors with frozen storage
"ElementwiseRreluTrainModule_basic",
"ElementwiseRreluTrainStaticModule_basic",
"ElementwiseRreluWithNoiseTrainModule_basic",
"ElementwiseRreluWithNoiseTrainStaticModule_basic",
"BernoulliFloatModule_basic",
"BernoulliTensorModule_basic",
"UniformModule_basic",
"UniformStaticShapeModule_basic",
}

if torch_version_for_comparison() < version.parse("2.6.0.dev"):
Expand Down Expand Up @@ -920,8 +909,6 @@
"ScatterValueFloatModule_basic",
"ScatterValueIntModule_basic",
"SliceOutOfLowerBoundEndIndexModule_basic",
"SortIntListReverse_basic",
"SortIntList_basic",
"SortTensorDescending_basic",
"SortTensorInteger_basic",
"SortTensorNegativeDimension_basic",
Expand Down Expand Up @@ -1008,7 +995,6 @@
"MeshgridIndexingXY_basic",
"Meshgrid_basic",
"MulIntModule_basic",
"OneHotModule_basic",
"ReduceFrobeniusNormComplexModule_basic",
"ScalarImplicitIntModule_basic",
"ScaledDotProductAttentionBoolMaskModule_basic",
Expand All @@ -1027,10 +1013,11 @@
"UpSampleNearest2dStaticSize_basic",
"UpSampleNearest2d_basic",
# RuntimeError: cannot mutate tensors with frozen storage
"ElementwiseRreluTrainModule_basic",
"ElementwiseRreluTrainStaticModule_basic",
"ElementwiseRreluWithNoiseTrainModule_basic",
"ElementwiseRreluWithNoiseTrainStaticModule_basic",
"BernoulliFloatModule_basic",
"UniformModule_basic",
"UniformStaticShapeModule_basic",
}

FX_IMPORTER_STABLEHLO_CRASHING_SET = {
Expand All @@ -1049,6 +1036,14 @@
# materialization callback produced value of incorrect type failed
"ReduceMaxAlongDimUnsignedInt_basic",
"ReduceMinAlongDimUnsignedInt_basic",
"Aten_TrilinearModuleSumdims_basic",
"Aten_TrilinearModuleSumAllDims_basic",
"Aten_TrilinearModuleVaryingRanksUnorderedExpands_basic",
# torch export: RuntimeError: cannot mutate tensors with frozen storage
"ElementwiseRreluWithNoiseTrainModule_basic",
"ElementwiseRreluWithNoiseTrainStaticModule_basic",
"CrossEntropyLossModule_basic",
"CrossEntropyLossNoReductionModule_basic",
}

STABLEHLO_PASS_SET = {
Expand Down
2 changes: 1 addition & 1 deletion pytorch-hash.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0d5247caf3ffd618d31cf4cf880c47b7dbd323a7
798d5b7ddd08899fb62672d56044dbf1f63a4d17
2 changes: 1 addition & 1 deletion pytorch-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# release page, and we use this page as an additional source for the wheels.
-f https://xilinx.github.io/torch-mlir/package-index/
--pre
torch==2.6.0.dev20241107
torch==2.6.0.dev20241201
10 changes: 6 additions & 4 deletions test/python/fx_importer/v2.3/auto_functionalized.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ def forward(self, x):
# AssertionError: Current active mode <torch._subclasses.functional_tensor.FunctionalTensorMode object at 0x7a1106504fd0> not registered
decomposition_table=[],
)
# CHECK: %[[TIED:.*]] = torch.operator "torch.torch_mlir_test.inplace_modify"({{.*}}) : (!torch.vtensor<[3,4],f32>) -> !torch.vtensor<[3,4],f32>
# CHECK: torch.aten.mul.Tensor %[[TIED]], %[[TIED]]
# The Torch 2.6 expects the IR to be same as the below one, while the torch versions < 2.6 does not, hence this check is kept as a "COM".
# COM: torch.operator "torch.torch_mlir_test.inplace_modify"({{.*}}) : (!torch.vtensor<[3,4],f32>) -> ()
# CHECK: torch.aten.mul.Tensor %{{.*}}, %{{.*}}
print(m)
m.operation.verify()

Expand All @@ -86,7 +87,8 @@ def forward(self, x):
# AssertionError: Current active mode <torch._subclasses.functional_tensor.FunctionalTensorMode object at 0x7a1106504fd0> not registered
decomposition_table=[],
)
# CHECK: %[[TIED:.*]]:2 = torch.operator "torch.torch_mlir_test.inplace_modify_calc"(%0) : (!torch.vtensor<[3,4],f32>) -> (!torch.vtensor<[3,4],f32>, !torch.vtensor<[3,4],f32>)
# CHECK: torch.aten.mul.Tensor %[[TIED]]#1, %[[TIED]]#0
# The Torch 2.6 expects the IR to be same as the below one, while the torch versions < 2.6 does not, hence this check is kept as a "COM".
# COM: %[[TIED:.*]] = torch.operator "torch.torch_mlir_test.inplace_modify_calc"(%arg0) : (!torch.vtensor<[3,4],f32>) -> !torch.vtensor<[3,4],f32>
# CHECK: torch.aten.mul.Tensor %{{.*}}, %{{.*}}
print(m)
m.operation.verify()
2 changes: 1 addition & 1 deletion torchvision-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# release page, and we use this page as an additional source for the wheels.
-f https://xilinx.github.io/torch-mlir/package-index/
--pre
torchvision==0.20.0.dev20241107
torchvision==0.20.0.dev20241201

0 comments on commit 53ef6d8

Please sign in to comment.