File tree 2 files changed +2
-20
lines changed
function_libs/torch_aten/ops
tests/function_libs/torch_aten
2 files changed +2
-20
lines changed Original file line number Diff line number Diff line change @@ -5053,20 +5053,10 @@ def aten_square(self: TensorType) -> TensorType:
5053
5053
raise NotImplementedError ()
5054
5054
5055
5055
5056
- @torch_op ("aten::squeeze" , trace_only = True )
5057
- def aten_squeeze (self : TTensor , dim : Optional [int ] = None ) -> TTensor :
5056
+ def aten_squeeze (self : TensorType ) -> TensorType :
5058
5057
"""squeeze(Tensor(a) self) -> Tensor(a)"""
5059
5058
5060
- if op .OptionalHasElement (dim ):
5061
- rank = op .Size (op .Shape (self ))
5062
- if rank == 0 :
5063
- self = op .Reshape (self , op .Constant (value_ints = [- 1 ]))
5064
- dims = op .Reshape (dim , op .Constant (value_ints = [- 1 ]))
5065
- result = op .Squeeze (self , dims )
5066
- else :
5067
- result = op .Squeeze (self )
5068
-
5069
- return result
5059
+ raise NotImplementedError ()
5070
5060
5071
5061
5072
5062
def aten_squeeze_copy (self : TensorType ) -> TensorType :
Original file line number Diff line number Diff line change @@ -412,7 +412,6 @@ def _where_input_wrangler(
412
412
),
413
413
"ones_like" : core_ops .aten_ones_like ,
414
414
"slice" : core_ops .aten_slice ,
415
- "squeeze" : core_ops .aten_squeeze ,
416
415
"sum" : (core_ops .aten_sum_dim_IntList , _sum_input_wrangler ),
417
416
"transpose" : core_ops .aten_transpose ,
418
417
"zeros_like" : core_ops .aten_zeros_like ,
@@ -557,13 +556,6 @@ def _where_input_wrangler(
557
556
matcher = lambda sample : len (sample .args [0 ]) == 0 ,
558
557
reason = "Empty perm is not supported" ,
559
558
),
560
- skip (
561
- "squeeze" ,
562
- matcher = lambda sample : len (sample .args ) > 0
563
- and len (sample .input .shape ) > 0
564
- and sample .input .shape [sample .args [0 ]] != 1 ,
565
- reason = "Cannot select an axis to squeeze out which has size not equal to one" ,
566
- ),
567
559
)
568
560
569
561
duplicate_opinfo (
You can’t perform that action at this time.
0 commit comments