forked from mindspore-Ecosystem/mindspore
!10607 [MS-LITE] fix model onnx_cast_006.onnx
From: @YeFeng_24 Reviewed-by: @hangangqiang,@zhanghaibo5 Signed-off-by: @hangangqiang
This commit is contained in:
commit
c08d261709
|
@ -51,6 +51,12 @@ int InnerContext::Init() {
|
|||
return RET_NULL_PTR;
|
||||
}
|
||||
}
|
||||
if (IsNpuEnabled()) {
|
||||
MS_LOG(DEBUG) << "NPU enabled.";
|
||||
}
|
||||
if (IsGpuEnabled()) {
|
||||
MS_LOG(DEBUG) << "GPU enabled.";
|
||||
}
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -288,10 +288,10 @@ int CpuFp16SubGraph::PostProcess() {
|
|||
for (size_t i = 0; i < this->in_tensors_.size(); i++) {
|
||||
auto tensor = in_tensors_.at(i);
|
||||
MS_ASSERT(tensor != nullptr);
|
||||
if (tensor->data_type() == kNumberTypeFloat16) {
|
||||
auto origin_tensor_data = origin_input_data_.at(i);
|
||||
if (tensor->data_type() == kNumberTypeFloat16 && origin_tensor_data != nullptr) {
|
||||
MS_ASSERT(tensor != nullptr);
|
||||
tensor->FreeData();
|
||||
auto origin_tensor_data = origin_input_data_.at(i);
|
||||
MS_ASSERT(origin_tensor_data != nullptr);
|
||||
MS_ASSERT(origin_tensor_data->data_ != nullptr);
|
||||
tensor->set_data(origin_tensor_data->data_);
|
||||
tensor->set_data_type(kNumberTypeFloat32);
|
||||
|
|
|
@ -686,7 +686,16 @@ int Benchmark::Init() {
|
|||
MS_LOG(INFO) << "NumThreads = " << this->flags_->num_threads_;
|
||||
MS_LOG(INFO) << "Fp16Priority = " << this->flags_->enable_fp16_;
|
||||
MS_LOG(INFO) << "calibDataPath = " << this->flags_->benchmark_data_file_;
|
||||
|
||||
std::cout << "ModelPath = " << this->flags_->model_file_ << std::endl;
|
||||
std::cout << "InDataPath = " << this->flags_->in_data_file_ << std::endl;
|
||||
std::cout << "InDataType = " << this->flags_->in_data_type_in_ << std::endl;
|
||||
std::cout << "LoopCount = " << this->flags_->loop_count_ << std::endl;
|
||||
std::cout << "DeviceType = " << this->flags_->device_ << std::endl;
|
||||
std::cout << "AccuracyThreshold = " << this->flags_->accuracy_threshold_ << std::endl;
|
||||
std::cout << "WarmUpLoopCount = " << this->flags_->warm_up_loop_count_ << std::endl;
|
||||
std::cout << "NumThreads = " << this->flags_->num_threads_ << std::endl;
|
||||
std::cout << "Fp16Priority = " << this->flags_->enable_fp16_ << std::endl;
|
||||
std::cout << "calibDataPath = " << this->flags_->benchmark_data_file_ << std::endl;
|
||||
if (this->flags_->loop_count_ < 1) {
|
||||
MS_LOG(ERROR) << "LoopCount:" << this->flags_->loop_count_ << " must be greater than 0";
|
||||
std::cerr << "LoopCount:" << this->flags_->loop_count_ << " must be greater than 0" << std::endl;
|
||||
|
|
Loading…
Reference in New Issue