forked from mindspore-Ecosystem/mindspore
!17462 fix opencl tuning
From: @yeyunpeng2020 Reviewed-by: @ddwsky,@ddwsky,@hangangqiang Signed-off-by: @ddwsky,@ddwsky
This commit is contained in:
commit
e11e2ecaac
|
@ -62,6 +62,12 @@ int OpenCLExecutor::RunOrTune(const std::vector<Tensor *> &inputs, const std::ve
|
|||
}
|
||||
if (zero_shape_num != kernel->out_tensors().size()) {
|
||||
if (is_tune) {
|
||||
ret = op_kernel->PreProcess();
|
||||
if (RET_OK != ret) {
|
||||
MS_LOG(WARNING) << "PreProcess kernel failed, name: " << kernel->name() << " in tuning";
|
||||
opencl_runtime_ins->SetProfiling(profiling_tmp);
|
||||
return RET_OK;
|
||||
}
|
||||
ret = op_kernel->Tune();
|
||||
if (ret != RET_OK) {
|
||||
MS_LOG(ERROR) << "tuning kernel failed, name: " << kernel->name();
|
||||
|
|
Loading…
Reference in New Issue