diff --git a/paddle/fluid/eager/auto_code_generator/generator/eager_gen.py b/paddle/fluid/eager/auto_code_generator/generator/eager_gen.py index 8ec8e43cc0b7c6d88691cdaa2c7003e51af5ce99..308e0348a21afb355248ae1ee5e6dff3d5a7814d 100644 --- a/paddle/fluid/eager/auto_code_generator/generator/eager_gen.py +++ b/paddle/fluid/eager/auto_code_generator/generator/eager_gen.py @@ -1093,7 +1093,7 @@ class DygraphForwardFunctionGenerator(DygraphFunctionGeneratorBase): tensors_vector_list_str = "{ " + ",".join( amp_tensors_vector_list) + " }" - if len(amp_tensors_vector_list) == 0: # or forward_api_name == "shape": + if len(amp_tensors_vector_list) == 0: layout_logic_str = "" else: after_call_str = f"{returns_type_str} {result_name} = {forward_function_name}({layout_inputs_call_args_str});\n"