!39150 fix scalar type compute of maximum and pclint issue.
Merge pull request !39150 from yangshuo/br_pclint
This commit is contained in:
commit
1b956ec349
|
@ -78,7 +78,7 @@ bool ArgmaxCpuKernelMod::LaunchKernel(const std::vector<kernel::AddressPtr> &inp
|
|||
}
|
||||
|
||||
bool ArgmaxCpuKernelMod::Init(const BaseOperatorPtr &base_operator, const std::vector<KernelTensorPtr> &inputs,
|
||||
const std::vector<KernelTensorPtr> &outputs) {
|
||||
const std::vector<KernelTensorPtr> &) {
|
||||
auto kernel_ptr = std::dynamic_pointer_cast<ops::ArgMax>(base_operator);
|
||||
if (!kernel_ptr) {
|
||||
MS_LOG(ERROR) << "cast ArgMax ops failed!";
|
||||
|
|
|
@ -77,10 +77,6 @@ int MaximumCpuKernelMod::Resize(const BaseOperatorPtr &base_operator, const std:
|
|||
InitInputTensorAndScalar(max_input_shape_size);
|
||||
} else if (max_input_shape_size == output_shape_.size() && output_shape_.size() != 0) {
|
||||
InitInputTensors(input_x_dtype, input_y_dtype);
|
||||
} else {
|
||||
MS_LOG(WARNING) << "For '" << kernel_name_ << "', inputs must be two tensors or one tensor and one scalar, but got "
|
||||
<< input_x_dtype << " and " << input_y_dtype;
|
||||
return KRET_RESIZE_FAILED;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue