Browse Source

modify log for matmul error strategy

pull/15679/head
yangzhenzhang 5 years ago
parent
commit
510c3458c1
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      mindspore/ccsrc/frontend/parallel/ops_info/matmul_info.cc

+ 8
- 2
mindspore/ccsrc/frontend/parallel/ops_info/matmul_info.cc View File

@@ -170,10 +170,16 @@ Status MatMul::CheckStrategy(const StrategyPtr &strategy) {
// dev_matrix_shape:[2,4,8,16,32] (transpose_b is false)
// [16] in the example above
if (!transpose_b_ && (mat_a_strategy.back() != mat_b_strategy.at(SECOND_FROM_END(mat_b_size)))) {
MS_LOG(ERROR) << name_ << " : Strategies of relevant dimensions are not equal.";
MS_LOG(ERROR) << name_ << " : Can not do this operator in the strategy: (" << ShapeToString(mat_a_strategy) << ", "
<< ShapeToString(mat_b_strategy)
<< "), the transpose_b is false, the shard num of first input's column is " << mat_a_strategy.back()
<< ", but the shard num of second input's row is " << mat_b_strategy.at(SECOND_FROM_END(mat_b_size));
return FAILED;
} else if (transpose_b_ && (mat_a_strategy.back() != mat_b_strategy.back())) {
MS_LOG(ERROR) << name_ << " : Strategies of relevant dimensions are not equal.";
MS_LOG(ERROR) << name_ << " : Can not do this operator in the strategy: (" << ShapeToString(mat_a_strategy) << ", "
<< ShapeToString(mat_b_strategy)
<< "), the transpose_b is true, the shard num of first input's column is " << mat_a_strategy.back()
<< ", but the shard num of second input's column is " << mat_b_strategy.back();
return FAILED;
}



Loading…
Cancel
Save