clean operater warning

This commit is contained in:
fengyihang 2022-08-04 20:32:50 +08:00
parent ff85b94134
commit 4abcb494b1
3 changed files with 4 additions and 5 deletions

View File

@ -49,8 +49,7 @@ bool ApplyAdagradDACpuKernelMod::Init(const BaseOperatorPtr &base_operator, cons
return true;
}
void ApplyAdagradDACpuKernelMod::CheckDType(const std::vector<KernelTensorPtr> &inputs,
const std::vector<KernelTensorPtr> &outputs) const {
void ApplyAdagradDACpuKernelMod::CheckDType(const std::vector<KernelTensorPtr> &inputs) const {
auto LRDtype = inputs[kLRIndex]->GetDtype();
auto L1Dtype = inputs[kL1Index]->GetDtype();
auto L2Dtype = inputs[kL2Index]->GetDtype();
@ -78,7 +77,7 @@ int ApplyAdagradDACpuKernelMod::Resize(const BaseOperatorPtr &base_operator, con
if (ret != 0) {
return ret;
}
CheckDType(inputs, outputs);
CheckDType(inputs);
std::vector<int64_t> var_shape = inputs[kVarIndex]->GetShapeVector();
std::vector<int64_t> lr_shape = inputs[kLRIndex]->GetShapeVector();

View File

@ -49,7 +49,7 @@ class ApplyAdagradDACpuKernelMod : public NativeCpuKernelMod {
void CheckShapeAndDtypeEqual(int64_t size_a, int64_t size_b, const char *name_a, const char *name_b);
void CheckDType(const std::vector<KernelTensorPtr> &inputs, const std::vector<KernelTensorPtr> &outputs) const;
void CheckDType(const std::vector<KernelTensorPtr> &inputs) const;
template <typename T>
void LaunchKernel(const std::vector<AddressPtr> &inputs, const std::vector<AddressPtr> &outputs);

View File

@ -65,7 +65,7 @@ bool BlackmanWindowCpuKernelMod::BlackmanWindowKernelFunc(const std::vector<kern
auto window_length = static_cast<int64_t>(*input);
double pre_window_length = static_cast<double>(window_length);
const size_t OUTPUTISONE = 1.0;
const size_t OUTPUTISONE = 1;
ShapeVector out_shape = {window_length};
std::vector<TypeId> dtypes = {AnfAlgo::GetOutputDeviceDataType(node_, 0)};