!29043 [MSLITE] matmul bias tensor data invalid
Merge pull request !29043 from ling/r1.6
This commit is contained in:
commit
c54e7babfb
|
@ -123,6 +123,10 @@ int MatmulFp32BaseCPUKernel::InitBiasData() {
|
|||
MS_LOG(ERROR) << "bias_tensor invalid";
|
||||
return RET_ERROR;
|
||||
}
|
||||
if (bias_tensor->data() == nullptr) {
|
||||
MS_LOG(ERROR) << "bias_tensor data invalid";
|
||||
return RET_ERROR;
|
||||
}
|
||||
auto bias_num = static_cast<size_t>(bias_tensor->ElementsNum());
|
||||
MS_CHECK_TRUE_RET(bias_num > 0, RET_ERROR);
|
||||
if (bias_num == 1) {
|
||||
|
|
Loading…
Reference in New Issue