build: manually update PyTorch version and fix CI failure (#3830)

This commit sets the PyTorch and TorchVision version to nightly release
2024-10-29.

This commit also fixes the CI failure after this commit
54d9e24013
got merged. The issue was that the CI checks in the PR were run before
the previous roll pytorch update but the PR was actually merged after
the roll pytorch update. Hence, the failure was not caught before
merging the PR.

While exporting the fx_graph through fx_importer for `rrelu` and
`rrelu_with_noise` op for train mode, it decomposes the
`aten.rrelu_with_noise` op based on the PyTorch decomposition which is
the default behavior. However, the decomposition contains an input
mutation specifically here
9bbe4a67ad/torch/_decomp/decompositions.py (L325),
resulting in the runtime failure. This issue would probably be fixed by
https://github.com/pytorch/pytorch/pull/138503. Until then, the failing
tests are added to the xfail set.

Also, after the roll pytorch update following tests started passing for
fx_importer, and fx_importer_stablehlo config.

- "ElementwiseRreluTrainModule_basic"
- "ElementwiseRreluTrainStaticModule_basic"
- "ElementwiseRreluWithNoiseTrainModule_basic"
- "ElementwiseRreluWithNoiseTrainStaticModule_basic"

This commit also updates the dtype check for the `aten.linear` op since
the op now expects both the input tensors to have the same dtype.

Signed-Off By: Vivek Khandelwal <vivekkhandelwal1424@gmail.com>
pull/3837/head
Vivek Khandelwal 2024-10-30 18:56:01 +05:30 committed by GitHub
parent 9ab2a150f2
commit 16b3bd6e6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 14 additions and 12 deletions

View File

@ -420,7 +420,6 @@ FX_IMPORTER_XFAIL_SET = {
"DeformConv2D_basic", "DeformConv2D_basic",
"DivFloatModule_basic", "DivFloatModule_basic",
"DivIntModule_basic", "DivIntModule_basic",
"ElementwiseAddScalar_NumToTensorFloat_Module_basic",
"ElementwiseDequantizePerChannelModule_basic", "ElementwiseDequantizePerChannelModule_basic",
"ElementwiseDequantizePerTensorModule_basic", "ElementwiseDequantizePerTensorModule_basic",
"ElementwiseQuantizePerTensorModule_basic", "ElementwiseQuantizePerTensorModule_basic",
@ -446,8 +445,6 @@ FX_IMPORTER_XFAIL_SET = {
"NllLossModuleBackward1DSum_basic", "NllLossModuleBackward1DSum_basic",
"NllLossModuleBackward1DWeight_basic", "NllLossModuleBackward1DWeight_basic",
"NllLossModuleBackward1D_basic", "NllLossModuleBackward1D_basic",
"NumToTensorFloatModule_basic",
"NumToTensorIntModule_basic",
"NumelModule_basic", "NumelModule_basic",
"NumelZeroRankModule_basic", "NumelZeroRankModule_basic",
"PowIntFloatModule_basic", "PowIntFloatModule_basic",
@ -464,7 +461,6 @@ FX_IMPORTER_XFAIL_SET = {
"QuantizedSingleLayer_basic", "QuantizedSingleLayer_basic",
"ReduceMaxAlongDimUnsignedInt_basic", "ReduceMaxAlongDimUnsignedInt_basic",
"ReduceMinAlongDimUnsignedInt_basic", "ReduceMinAlongDimUnsignedInt_basic",
"RsubInt0d_NumToTensor_Module_basic",
"ScalarImplicitFloatModule_basic", "ScalarImplicitFloatModule_basic",
"SortIntListReverse_basic", "SortIntListReverse_basic",
"SortIntList_basic", "SortIntList_basic",
@ -523,6 +519,11 @@ FX_IMPORTER_XFAIL_SET = {
"MeshgridIndexingXY_basic", "MeshgridIndexingXY_basic",
"Meshgrid_basic", "Meshgrid_basic",
"OneHotModule_basic", "OneHotModule_basic",
# RuntimeError: cannot mutate tensors with frozen storage
"ElementwiseRreluTrainModule_basic",
"ElementwiseRreluTrainStaticModule_basic",
"ElementwiseRreluWithNoiseTrainModule_basic",
"ElementwiseRreluWithNoiseTrainStaticModule_basic",
} }
FX_IMPORTER_CRASHING_SET = LINALG_CRASHING_SET | { FX_IMPORTER_CRASHING_SET = LINALG_CRASHING_SET | {
@ -690,7 +691,6 @@ FX_IMPORTER_STABLEHLO_XFAIL_SET = {
"DiagonalModule_with_offset", "DiagonalModule_with_offset",
"DivFloatModule_basic", "DivFloatModule_basic",
"DivIntModule_basic", "DivIntModule_basic",
"ElementwiseAddScalar_NumToTensorFloat_Module_basic",
"ElementwiseDequantizePerChannelModule_basic", "ElementwiseDequantizePerChannelModule_basic",
"ElementwiseDequantizePerTensorModule_basic", "ElementwiseDequantizePerTensorModule_basic",
"ElementwiseErfIntModule_basic", "ElementwiseErfIntModule_basic",
@ -792,8 +792,6 @@ FX_IMPORTER_STABLEHLO_XFAIL_SET = {
"NormScalarComplexModule_basic", "NormScalarComplexModule_basic",
"NormScalarModule_basic", "NormScalarModule_basic",
"NormalFunctionalModule_basic", "NormalFunctionalModule_basic",
"NumToTensorFloatModule_basic",
"NumToTensorIntModule_basic",
"NumelModule_basic", "NumelModule_basic",
"NumelZeroRankModule_basic", "NumelZeroRankModule_basic",
"PowIntFloatModule_basic", "PowIntFloatModule_basic",
@ -829,7 +827,6 @@ FX_IMPORTER_STABLEHLO_XFAIL_SET = {
"ReplicationPad2dModule_left0", "ReplicationPad2dModule_left0",
"ReplicationPad2dModule_right0", "ReplicationPad2dModule_right0",
"ReplicationPad2dModule_top0", "ReplicationPad2dModule_top0",
"RsubInt0d_NumToTensor_Module_basic",
"ScalarImplicitFloatModule_basic", "ScalarImplicitFloatModule_basic",
# REMOVE WHEN ENABLE_GQA IS ADDED # REMOVE WHEN ENABLE_GQA IS ADDED
"ScatterReduceFloatMaxModule", "ScatterReduceFloatMaxModule",
@ -964,6 +961,11 @@ FX_IMPORTER_STABLEHLO_XFAIL_SET = {
"UpSampleNearest2dStaticFactor_basic", "UpSampleNearest2dStaticFactor_basic",
"UpSampleNearest2dStaticSize_basic", "UpSampleNearest2dStaticSize_basic",
"UpSampleNearest2d_basic", "UpSampleNearest2d_basic",
# RuntimeError: cannot mutate tensors with frozen storage
"ElementwiseRreluTrainModule_basic",
"ElementwiseRreluTrainStaticModule_basic",
"ElementwiseRreluWithNoiseTrainModule_basic",
"ElementwiseRreluWithNoiseTrainStaticModule_basic",
} }
FX_IMPORTER_STABLEHLO_CRASHING_SET = { FX_IMPORTER_STABLEHLO_CRASHING_SET = {

View File

@ -5371,7 +5371,7 @@ def atenatanh〡dtype(self_rank_dtype: Tuple[int, int]) -> int:
return torch.float32 return torch.float32
return self_dtype return self_dtype
@check_dtype_function(_check_two_tensor_op()) @check_dtype_function(_check_tensors_with_the_same_dtype(num_of_tensors=2))
def atenlinear〡dtype(input_rank_dtype: Tuple[int, int], weight_rank_dtype: Tuple[int, int], bias_rank_dtype: Optional[Tuple[int, int]] = None) -> int: def atenlinear〡dtype(input_rank_dtype: Tuple[int, int], weight_rank_dtype: Tuple[int, int], bias_rank_dtype: Optional[Tuple[int, int]] = None) -> int:
input_rank, input_dtype = input_rank_dtype input_rank, input_dtype = input_rank_dtype
weight_rank, weight_dtype = weight_rank_dtype weight_rank, weight_dtype = weight_rank_dtype

View File

@ -1 +1 @@
160d421a40e934ac8183e47f9cbc8618a4bd97dd c787213d413e85c66bdad0d8c9cde1c5ced34b1b

View File

@ -1,3 +1,3 @@
-f https://download.pytorch.org/whl/nightly/cpu/torch/ -f https://download.pytorch.org/whl/nightly/cpu/torch/
--pre --pre
torch==2.6.0.dev20241020 torch==2.6.0.dev20241029

View File

@ -1,3 +1,3 @@
-f https://download.pytorch.org/whl/nightly/cpu/torchvision/ -f https://download.pytorch.org/whl/nightly/cpu/torchvision/
--pre --pre
torchvision==0.20.0.dev20241020 torchvision==0.20.0.dev20241029