File tree Expand file tree Collapse file tree 2 files changed +2
-20
lines changed
function_libs/torch_aten/ops
tests/function_libs/torch_aten Expand file tree Collapse file tree 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:
50535053 raise NotImplementedError ()
50545054
50555055
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 :
50585057 """squeeze(Tensor(a) self) -> Tensor(a)"""
50595058
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 ()
50705060
50715061
50725062def aten_squeeze_copy (self : TensorType ) -> TensorType :
Original file line number Diff line number Diff line change @@ -412,7 +412,6 @@ def _where_input_wrangler(
412412 ),
413413 "ones_like" : core_ops .aten_ones_like ,
414414 "slice" : core_ops .aten_slice ,
415- "squeeze" : core_ops .aten_squeeze ,
416415 "sum" : (core_ops .aten_sum_dim_IntList , _sum_input_wrangler ),
417416 "transpose" : core_ops .aten_transpose ,
418417 "zeros_like" : core_ops .aten_zeros_like ,
@@ -557,13 +556,6 @@ def _where_input_wrangler(
557556 matcher = lambda sample : len (sample .args [0 ]) == 0 ,
558557 reason = "Empty perm is not supported" ,
559558 ),
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- ),
567559)
568560
569561duplicate_opinfo (
You can’t perform that action at this time.
0 commit comments