forked from mindspore-Ecosystem/mindspore
!8343 [MSLITE][Develop] fix code
From: @sunsuodong Reviewed-by: @zhang_xue_tong,@zhanghaibo5 Signed-off-by: @zhang_xue_tong
This commit is contained in:
commit
5708bae7e7
|
@ -257,6 +257,9 @@ void MatrixMultiplyVec(const float32x4_t *matrix_a, const float32x4_t *matrix_b,
|
|||
|
||||
int WinogradWeightTransform(const float *weight_data, float *winograd_data, float *matrix_g, const float *matrix_gt,
|
||||
int oc_block, int input_unit, int kernel_unit, int channel, int batch, bool pack) {
|
||||
if (oc_block == 0) {
|
||||
return NNACL_PARAM_INVALID;
|
||||
}
|
||||
// original weight format : ohwi
|
||||
int oc_block_num = UP_DIV(batch, oc_block);
|
||||
int block_stride = channel * oc_block;
|
||||
|
|
|
@ -101,7 +101,7 @@ int SparseSoftmaxCrossEntropyWithLogitsCPUKernel::Execute(int task_id) {
|
|||
Softmax(ins, losses_, sum_data_, &sm_params_);
|
||||
if (is_train()) {
|
||||
GradPostExecute(labels, losses_, grads, out);
|
||||
} else if (out != nullptr) {
|
||||
} else {
|
||||
ForwardPostExecute(labels, losses_, out);
|
||||
}
|
||||
return RET_OK;
|
||||
|
|
|
@ -835,6 +835,10 @@ ThreadPool *CreateThreadPool(int thread_num, int mode) {
|
|||
}
|
||||
#endif
|
||||
ThreadPool *thread_pool = (struct ThreadPool *)(malloc(sizeof(ThreadPool)));
|
||||
if (thread_pool == NULL) {
|
||||
LOG_ERROR("Malloc ThreadPool failed");
|
||||
return NULL;
|
||||
}
|
||||
thread_pool->thread_num = thread_num > MAX_THREAD_NUM ? MAX_THREAD_NUM : thread_num;
|
||||
thread_pool->is_alive = ATOMIC_VAR_INIT(true);
|
||||
thread_pool->mode = mode;
|
||||
|
|
|
@ -275,7 +275,7 @@ int Benchmark::CompareStringData(const std::string &name, tensor::MSTensor *tens
|
|||
std::cout << " " << output_strings[i] << std::endl;
|
||||
}
|
||||
if (calib_strings[i] != output_strings[i]) {
|
||||
MS_LOG(ERROR) << "";
|
||||
MS_LOG(ERROR) << "Compare failed, index: " << i;
|
||||
return RET_ERROR;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue