Skip to content

Commit

Permalink
build: manually update PyTorch version (#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
#3796.

---------

Signed-off-by: Vivek Khandelwal <[email protected]>
  • Loading branch information
vivekkhandelwal1 authored Dec 10, 2024
1 parent 5077090 commit d0a3cb4
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 27 deletions.
29 changes: 9 additions & 20 deletions projects/pt1/e2e_testing/xfail_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,6 @@
"ReduceMaxAlongDimUnsignedInt_basic",
"ReduceMinAlongDimUnsignedInt_basic",
"ScalarImplicitFloatModule_basic",
"SortIntListReverse_basic",
"SortIntList_basic",
"SplitDimDynamicModule_basic",
"SplitDimStaticModule_basic",
"SqrtIntModule_basic",
Expand Down Expand Up @@ -504,30 +502,21 @@
"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",
"IsInfiniteModule_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",
"ElementwiseSignbitModule_basic",
"ElementwiseCopysignModule_basic",
"BernoulliFloatModule_basic",
"BernoulliTensorModule_basic",
"UniformModule_basic",
"UniformStaticShapeModule_basic",
}

FX_IMPORTER_CRASHING_SET = LINALG_CRASHING_SET | {
Expand Down Expand Up @@ -856,8 +845,6 @@
"ScatterValueFloatModule_basic",
"ScatterValueIntModule_basic",
"SliceOutOfLowerBoundEndIndexModule_basic",
"SortIntListReverse_basic",
"SortIntList_basic",
"SortTensorDescending_basic",
"SortTensorInteger_basic",
"SortTensorNegativeDimension_basic",
Expand Down Expand Up @@ -932,7 +919,6 @@
"MeshgridIndexingXY_basic",
"Meshgrid_basic",
"MulIntModule_basic",
"OneHotModule_basic",
"ReduceFrobeniusNormComplexModule_basic",
"ScalarImplicitIntModule_basic",
"ScaledDotProductAttentionBoolMaskModule_basic",
Expand All @@ -951,10 +937,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 @@ -979,6 +966,8 @@
# 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
@@ -1,3 +1,3 @@
-f https://download.pytorch.org/whl/nightly/cpu/torch/
--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
@@ -1,3 +1,3 @@
-f https://download.pytorch.org/whl/nightly/cpu/torchvision/
--pre
torchvision==0.20.0.dev20241107
torchvision==0.20.0.dev20241201

0 comments on commit d0a3cb4

Please sign in to comment.