From 54761eccccb318caa5be0bafbb751d038dc3c26d Mon Sep 17 00:00:00 2001 From: wilfChen Date: Tue, 12 Oct 2021 09:41:40 +0800 Subject: [PATCH] codedex --- .../gpu/nn/fused_weightdecay_scale_momentum_gpu_kernel.h | 2 +- mindspore/ccsrc/backend/optimizer/trt_pass/layer_input.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mindspore/ccsrc/backend/kernel_compiler/gpu/nn/fused_weightdecay_scale_momentum_gpu_kernel.h b/mindspore/ccsrc/backend/kernel_compiler/gpu/nn/fused_weightdecay_scale_momentum_gpu_kernel.h index d0ca97de1d6..2dfdd3ad3bb 100644 --- a/mindspore/ccsrc/backend/kernel_compiler/gpu/nn/fused_weightdecay_scale_momentum_gpu_kernel.h +++ b/mindspore/ccsrc/backend/kernel_compiler/gpu/nn/fused_weightdecay_scale_momentum_gpu_kernel.h @@ -27,7 +27,7 @@ constexpr size_t INPUT_NUM = 7; template class FusedWeightDecayScaleMomentumGpuKernel : public GpuKernel { public: - FusedWeightDecayScaleMomentumGpuKernel() : element_num_(1) {} + FusedWeightDecayScaleMomentumGpuKernel() : element_num_(1), is_null_input_(false) {} ~FusedWeightDecayScaleMomentumGpuKernel() override = default; const std::vector &GetInputSizeList() const override { return input_size_list_; } const std::vector &GetOutputSizeList() const override { return output_size_list_; } diff --git a/mindspore/ccsrc/backend/optimizer/trt_pass/layer_input.h b/mindspore/ccsrc/backend/optimizer/trt_pass/layer_input.h index 5e3c815b5b5..e12955a2f6c 100644 --- a/mindspore/ccsrc/backend/optimizer/trt_pass/layer_input.h +++ b/mindspore/ccsrc/backend/optimizer/trt_pass/layer_input.h @@ -35,7 +35,7 @@ class LayerInput { bool IsTensor() const { return type_ == InputType::kTensor; } bool IsWeight() const { return type_ == InputType::kWeight; } - nvinfer1::Weights *weight() { + const nvinfer1::Weights *weight() { if (!IsWeight()) { MS_LOG(WARNING) << "weight not initialized."; return nullptr;