!15066 clean code
From: @hwjiaorui Reviewed-by: @kisnwang,@jjfeing Signed-off-by: @jjfeing
This commit is contained in:
commit
c2c20e8173
|
@ -39,7 +39,7 @@ bool CheckFormatForConsistency(const CNodePtr &node, const size_t input_index) {
|
|||
if (pre_output_format == kOpFormat_DEFAULT || selected_input_format == kOpFormat_DEFAULT) {
|
||||
string checking_format = (pre_output_format == kOpFormat_DEFAULT) ? selected_input_format : pre_output_format;
|
||||
// when input shape size is 1D, default format and NC1HWC0 are compatible
|
||||
if (input_origin_shape.size() == 1 && checking_format == kOpFormat_NC1HWC0) {
|
||||
if (input_origin_shape.size() == 1) {
|
||||
return true;
|
||||
}
|
||||
if (kDefaultCompatibleFormat.find(checking_format) != kDefaultCompatibleFormat.end()) {
|
||||
|
|
|
@ -128,7 +128,6 @@ bool CheckInputs(const CNodePtr &origin_node) {
|
|||
}
|
||||
auto param_shape = AnfAlgo::GetPrevNodeOutputInferShape(origin_node, 0);
|
||||
auto indice_shape = AnfAlgo::GetPrevNodeOutputInferShape(origin_node, 1);
|
||||
|
||||
// this optimizer only support embedding_table has dynamic shape
|
||||
if (param_shape.empty() || indice_shape.empty() || AnfAlgo::IsDynamicShape(origin_node->input(2))) {
|
||||
return false;
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#endif
|
||||
|
||||
namespace mindspore {
|
||||
|
||||
bool E2eDump::IsDeviceTargetGPU() {
|
||||
auto context = MsContext::GetInstance();
|
||||
MS_EXCEPTION_IF_NULL(context);
|
||||
|
|
Loading…
Reference in New Issue