From 32e86f41665fe2dde77cf319118085b6acfbcdd7 Mon Sep 17 00:00:00 2001 From: TFBunny Date: Thu, 18 Mar 2021 13:32:04 -0400 Subject: [PATCH] hot fix for print --- mindspore/ccsrc/backend/optimizer/gpu/print_reduce_fusion.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mindspore/ccsrc/backend/optimizer/gpu/print_reduce_fusion.cc b/mindspore/ccsrc/backend/optimizer/gpu/print_reduce_fusion.cc index 9c6bcf42a0d..2537e3e14fb 100644 --- a/mindspore/ccsrc/backend/optimizer/gpu/print_reduce_fusion.cc +++ b/mindspore/ccsrc/backend/optimizer/gpu/print_reduce_fusion.cc @@ -67,6 +67,10 @@ bool GetOptList(const std::vector &node_list, std::vectorcast()->value(); + // not a string + if (value_node->type() == nullptr) { + continue; + } if (value_node->type()->generic_type_id() == kObjectTypeString) { auto current_string_value = GetValue(value_node); string_pos.push_back(i);