@@ -91,7 +91,7 @@ bool CanDoInplace(const std::unordered_set<pir::Value>& eager_dels,
9191 return true ;
9292 }
9393
94- auto is_numel_euqal = [](const TensorType& in,
94+ auto is_numel_equal = [](const TensorType& in,
9595 const TensorType& out) -> bool {
9696 int64_t in_numel = 1 ;
9797 int64_t out_numel = 1 ;
@@ -127,7 +127,7 @@ bool CanDoInplace(const std::unordered_set<pir::Value>& eager_dels,
127127 };
128128 // In this version, we don't consider the -1 in ddim, we just calculate the
129129 // result.
130- auto is_numel_euqal_loose_version = [](const TensorType& in,
130+ auto is_numel_equal_loose_version = [](const TensorType& in,
131131 const TensorType& out) -> bool {
132132 auto calculate_numel = [](const phi::DDim& ddim) -> int64_t {
133133 int64_t numel = 1 ;
@@ -144,10 +144,10 @@ bool CanDoInplace(const std::unordered_set<pir::Value>& eager_dels,
144144 bool equal = false ;
145145 bool relax = (RelaxShapeCheckOps.count (op_name) > 0 );
146146 if (relax) {
147- equal = is_numel_euqal_loose_version (input_alloc_tensor_type,
147+ equal = is_numel_equal_loose_version (input_alloc_tensor_type,
148148 output_alloc_tensor_type);
149149 } else {
150- equal = is_numel_euqal (input_alloc_tensor_type, output_alloc_tensor_type);
150+ equal = is_numel_equal (input_alloc_tensor_type, output_alloc_tensor_type);
151151 }
152152
153153 if (!equal) {
@@ -159,7 +159,7 @@ bool CanDoInplace(const std::unordered_set<pir::Value>& eager_dels,
159159 return false ;
160160 }
161161 if (eager_dels.count (input) == 0 ) {
162- VLOG (9 ) << " -- input not in eager_deletion_valus , can't do inplace" ;
162+ VLOG (9 ) << " -- input not in eager_deletion_vars , can't do inplace" ;
163163 return false ;
164164 }
165165 return true ;
0 commit comments