!248 Fix aicpu getnext bug

Merge pull request !248 from zjun/fix_getnext_bug
pull/248/MERGE
mindspore-ci-bot 5 years ago committed by Gitee
commit c478be0ff0

@ -38,12 +38,14 @@ void AicpuMetadataInfo(const CNodePtr &kernel_node, std::vector<std::shared_ptr<
return; return;
} }
// For compatibility with the current framework // For compatibility with the current framework
if (op_name == kPrint) { if (op_name == kPrint || op_name == kGetNext) {
std::vector<std::string> inputs_format; std::vector<std::string> inputs_format{};
std::vector<TypeId> inputs_type; std::vector<TypeId> inputs_type{};
for (size_t input_index = 0; input_index < AnfAlgo::GetInputTensorNum(kernel_node); ++input_index) { if (op_name == kPrint) {
inputs_format.emplace_back(kOpFormat_DEFAULT); for (size_t input_index = 0; input_index < AnfAlgo::GetInputTensorNum(kernel_node); ++input_index) {
inputs_type.push_back(AnfAlgo::GetPrevNodeOutputInferDataType(kernel_node, input_index)); inputs_format.emplace_back(kOpFormat_DEFAULT);
inputs_type.push_back(AnfAlgo::GetPrevNodeOutputInferDataType(kernel_node, input_index));
}
} }
std::vector<std::string> outputs_format; std::vector<std::string> outputs_format;
std::vector<TypeId> outputs_type; std::vector<TypeId> outputs_type;

Loading…
Cancel
Save