From 7dbd8b8c749b8497ccc157212d94a8a54db20e3e Mon Sep 17 00:00:00 2001 From: liuruyan <44316842+liuruyan@users.noreply.github.com> Date: Thu, 16 Mar 2023 14:49:18 +0800 Subject: [PATCH] address question inputs is Tensor array not Dense Tensor in static amp mode. (#51476) --- python/paddle/static/amp/fp16_utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/paddle/static/amp/fp16_utils.py b/python/paddle/static/amp/fp16_utils.py index bfe0a146f23..24a2a53d35a 100644 --- a/python/paddle/static/amp/fp16_utils.py +++ b/python/paddle/static/amp/fp16_utils.py @@ -438,6 +438,9 @@ def cast_model_to_fp16(program, amp_lists=None, use_fp16_guard=True): "while", "while_grad", "cast", + "tensor_array_to_tensor", + "lod_array_length", + "write_to_array", } global_block = program.global_block() keep_fp32_ops = set() -- GitLab