From 71c69507cd9530cf49a72a8fcd083d2e8eb3e96b Mon Sep 17 00:00:00 2001 From: Zhanlue Yang Date: Thu, 3 Mar 2022 09:56:28 +0800 Subject: [PATCH] [Eager][YAML] Supported array-type parsing for output tensors (#40058) --- .../final_state_generator/eager_gen.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/eager/auto_code_generator/final_state_generator/eager_gen.py b/paddle/fluid/eager/auto_code_generator/final_state_generator/eager_gen.py index 02183e2ca5..f2088dcda7 100644 --- a/paddle/fluid/eager/auto_code_generator/final_state_generator/eager_gen.py +++ b/paddle/fluid/eager/auto_code_generator/final_state_generator/eager_gen.py @@ -213,8 +213,12 @@ def ParseYamlReturns(string): returns = [x.strip() for x in string.strip().split(",")] for i in range(len(returns)): - ret = returns[i] - returns_list.append(["", ret, i]) + ret_type = returns[i] + + assert ret_type in yaml_types_mapping.keys() + ret_type = yaml_types_mapping[ret_type] + + returns_list.append(["", ret_type, i]) return returns_list -- GitLab