From 77a15d17940cc623029a3867006a61e4cf91fb83 Mon Sep 17 00:00:00 2001 From: risemeup1 <515586620@qq.com> Date: Tue, 21 May 2024 06:40:46 +0000 Subject: [PATCH] fix --- paddle/fluid/ir_adaptor/translator/op_translator.cc | 3 ++- paddle/phi/api/yaml/op_compat.yaml | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/ir_adaptor/translator/op_translator.cc b/paddle/fluid/ir_adaptor/translator/op_translator.cc index 8c071ea081c42e..535163aeedae95 100644 --- a/paddle/fluid/ir_adaptor/translator/op_translator.cc +++ b/paddle/fluid/ir_adaptor/translator/op_translator.cc @@ -306,7 +306,8 @@ pir::OpInfo OpTranscriber::LookUpOpInfo(pir::IrContext* ctx, std::map> inputs = op_desc.Inputs(); std::vector input_types; for (const auto& pair : inputs) { - if (op_desc.Type() == "sparse_sum" || op_desc.Type() == "sparse_slice") { + if (op_desc.Type() == "sparse_sum" || op_desc.Type() == "sparse_slice" || + op_desc.Type() == "sparse_reshape") { if (pair.first != "x") { continue; } diff --git a/paddle/phi/api/yaml/op_compat.yaml b/paddle/phi/api/yaml/op_compat.yaml index f4a87f4b1b8d08..529025d336d385 100755 --- a/paddle/phi/api/yaml/op_compat.yaml +++ b/paddle/phi/api/yaml/op_compat.yaml @@ -3280,6 +3280,13 @@ attrs: data_format: data_layout +- op : sparse_reshape + int_array : + shape : + data_type : int64_t + tensor_name : ShapeTensor + tensors_name : ShapeTensorList + - op : sparse_slice int_array : starts :