From 15e2d4a77f96da6098fb2db3f3865ce8a831afdc Mon Sep 17 00:00:00 2001 From: rahul shrivastava Date: Thu, 2 Jan 2025 19:55:01 -0800 Subject: [PATCH] Revert "build: manually update PyTorch version (#3896)" This reverts commit d0a3cb45971634e35cb421e319ed30b038ce95ba. --- projects/pt1/e2e_testing/xfail_sets.py | 29 +++++++++++++------ pytorch-hash.txt | 2 +- pytorch-requirements.txt | 2 +- .../fx_importer/v2.3/auto_functionalized.py | 10 +++---- torchvision-requirements.txt | 2 +- 5 files changed, 27 insertions(+), 18 deletions(-) diff --git a/projects/pt1/e2e_testing/xfail_sets.py b/projects/pt1/e2e_testing/xfail_sets.py index 9f832cb9e033..7430ad89c2c2 100644 --- a/projects/pt1/e2e_testing/xfail_sets.py +++ b/projects/pt1/e2e_testing/xfail_sets.py @@ -464,6 +464,8 @@ "ReduceMaxAlongDimUnsignedInt_basic", "ReduceMinAlongDimUnsignedInt_basic", "ScalarImplicitFloatModule_basic", + "SortIntListReverse_basic", + "SortIntList_basic", "SplitDimDynamicModule_basic", "SplitDimStaticModule_basic", "SqrtIntModule_basic", @@ -502,21 +504,30 @@ "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 | { @@ -845,6 +856,8 @@ "ScatterValueFloatModule_basic", "ScatterValueIntModule_basic", "SliceOutOfLowerBoundEndIndexModule_basic", + "SortIntListReverse_basic", + "SortIntList_basic", "SortTensorDescending_basic", "SortTensorInteger_basic", "SortTensorNegativeDimension_basic", @@ -919,6 +932,7 @@ "MeshgridIndexingXY_basic", "Meshgrid_basic", "MulIntModule_basic", + "OneHotModule_basic", "ReduceFrobeniusNormComplexModule_basic", "ScalarImplicitIntModule_basic", "ScaledDotProductAttentionBoolMaskModule_basic", @@ -937,11 +951,10 @@ "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 = { @@ -966,8 +979,6 @@ # torch export: RuntimeError: cannot mutate tensors with frozen storage "ElementwiseRreluWithNoiseTrainModule_basic", "ElementwiseRreluWithNoiseTrainStaticModule_basic", - "CrossEntropyLossModule_basic", - "CrossEntropyLossNoReductionModule_basic", } STABLEHLO_PASS_SET = { diff --git a/pytorch-hash.txt b/pytorch-hash.txt index ae415d496d6d..ad873201dbba 100644 --- a/pytorch-hash.txt +++ b/pytorch-hash.txt @@ -1 +1 @@ -798d5b7ddd08899fb62672d56044dbf1f63a4d17 +0d5247caf3ffd618d31cf4cf880c47b7dbd323a7 diff --git a/pytorch-requirements.txt b/pytorch-requirements.txt index 83ecc622c492..c18413eacec9 100644 --- a/pytorch-requirements.txt +++ b/pytorch-requirements.txt @@ -1,3 +1,3 @@ -f https://download.pytorch.org/whl/nightly/cpu/torch/ --pre -torch==2.6.0.dev20241201 +torch==2.6.0.dev20241107 diff --git a/test/python/fx_importer/v2.3/auto_functionalized.py b/test/python/fx_importer/v2.3/auto_functionalized.py index 7fb0eeb3b67f..ab7401dcc2fb 100644 --- a/test/python/fx_importer/v2.3/auto_functionalized.py +++ b/test/python/fx_importer/v2.3/auto_functionalized.py @@ -59,9 +59,8 @@ def forward(self, x): # AssertionError: Current active mode not registered decomposition_table=[], ) - # 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 %{{.*}}, %{{.*}} + # 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]] print(m) m.operation.verify() @@ -87,8 +86,7 @@ def forward(self, x): # AssertionError: Current active mode not registered decomposition_table=[], ) - # 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 %{{.*}}, %{{.*}} + # 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 print(m) m.operation.verify() diff --git a/torchvision-requirements.txt b/torchvision-requirements.txt index e0583c31e56c..8c8d45bea8a9 100644 --- a/torchvision-requirements.txt +++ b/torchvision-requirements.txt @@ -1,3 +1,3 @@ -f https://download.pytorch.org/whl/nightly/cpu/torchvision/ --pre -torchvision==0.20.0.dev20241201 +torchvision==0.20.0.dev20241107