Browse Source

fix_LogicalAnd

pull/13611/head
sunsuodong 4 years ago
parent
commit
bd3f2c7e1e
2 changed files with 8 additions and 1 deletions
  1. +1
    -0
      mindspore/lite/src/runtime/kernel/arm/fp32/arithmetic_fp32.cc
  2. +7
    -1
      mindspore/lite/tools/benchmark/benchmark.cc

+ 1
- 0
mindspore/lite/src/runtime/kernel/arm/fp32/arithmetic_fp32.cc View File

@@ -60,6 +60,7 @@ int ArithmeticCPUKernel::ReSize() {
outside_ *= param_->out_shape_[i];
}
}
data_type_len_ = lite::DataTypeSize(in_tensors_.at(0)->data_type());
int ret = RET_OK;
if (!IsScalarClac() && !IsBatchScalarCalc() && !IsBiasCalc()) {
ret = ConstTensorBroadCast();


+ 7
- 1
mindspore/lite/tools/benchmark/benchmark.cc View File

@@ -374,8 +374,12 @@ int Benchmark::CompareDataGetTotalBiasAndSize(const std::string &name, tensor::M
bias = CompareData<int16_t>(name, tensor->shape(), mutableData);
break;
}
case TypeId::kNumberTypeBool: {
bias = CompareData<bool>(name, tensor->shape(), mutableData);
break;
}
default:
MS_LOG(ERROR) << "Datatype " << msCalibDataType << " is not supported.";
MS_LOG(ERROR) << "Datatype " << tensor->data_type() << " is not supported.";
return RET_ERROR;
}
if (bias < 0) {
@@ -529,6 +533,8 @@ int Benchmark::PrintInputData() {
std::cout << static_cast<const int32_t *>(in_data)[j] << " ";
} else if (tensor_data_type == TypeId::kNumberTypeInt64) {
std::cout << static_cast<const int64_t *>(in_data)[j] << " ";
} else if (tensor_data_type == TypeId::kNumberTypeBool) {
std::cout << static_cast<const bool *>(in_data)[j] << " ";
} else {
MS_LOG(ERROR) << "Datatype: " << tensor_data_type << " is not supported.";
return RET_ERROR;


Loading…
Cancel
Save