Browse Source

!15022 fix opencl conv2d test

From: @zhaodezan
Reviewed-by: @zhanghaibo5,@hangangqiang
Signed-off-by: @zhanghaibo5
tags/v1.2.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
cbcb4ad5ae
3 changed files with 5 additions and 4 deletions
  1. +1
    -1
      mindspore/lite/nnacl/infer/deconv2d_infer.c
  2. +3
    -3
      mindspore/lite/src/runtime/kernel/arm/fp32/l2_norm_fp32.h
  3. +1
    -0
      mindspore/lite/test/ut/src/runtime/kernel/opencl/conv2d_tests.cc

+ 1
- 1
mindspore/lite/nnacl/infer/deconv2d_infer.c View File

@@ -20,7 +20,7 @@
int Deconv2dInferShape(const TensorC *const *inputs, size_t inputs_size, TensorC **outputs, size_t outputs_size,
OpParameter *parameter) {
#ifdef Debug
int check_ret = CheckAugmentNull(inputs, inputs_size, outputs, outputs_size, parameter);
int check_ret = CheckAugmentNullInputSize(inputs, inputs_size, outputs, outputs_size, parameter, 2);
if (check_ret != NNACL_OK) {
return check_ret;
}


+ 3
- 3
mindspore/lite/src/runtime/kernel/arm/fp32/l2_norm_fp32.h View File

@@ -14,8 +14,8 @@
* limitations under the License.
*/

#ifndef MINDSPORE_LITE_SRC_RUNTIME_KERNEL_ARM_FP32_RESHAPE_H_
#define MINDSPORE_LITE_SRC_RUNTIME_KERNEL_ARM_FP32_RESHAPE_H_
#ifndef MINDSPORE_LITE_SRC_RUNTIME_KERNEL_ARM_FP32_L2_NORM_H_
#define MINDSPORE_LITE_SRC_RUNTIME_KERNEL_ARM_FP32_L2_NORM_H_

#include <vector>
#include "src/lite_kernel.h"
@@ -57,4 +57,4 @@ class L2NormCPUKernel : public LiteKernel {
};
} // namespace mindspore::kernel

#endif // MINDSPORE_LITE_SRC_RUNTIME_KERNEL_ARM_FP32_RESHAPE_H_
#endif // MINDSPORE_LITE_SRC_RUNTIME_KERNEL_ARM_FP32_L2_NORM_H_

+ 1
- 0
mindspore/lite/test/ut/src/runtime/kernel/opencl/conv2d_tests.cc View File

@@ -39,6 +39,7 @@ ConvParameter *CreateParameter(const std::string &attr, ActType act_type) {
void TestMain_Conv2D(const std::string &attr, float *input_data, float *weight_data, float *bias_data,
float *output_data, ActType act_type, bool fp16_enable, float atol = 1e-9) {
auto *param = CreateParameter(attr, act_type);
param->group_ = 1; // group conv is not supported in this test
std::vector<int> input_shape = {param->input_batch_, param->input_h_, param->input_w_, param->input_channel_};
std::vector<int> weight_shape = {param->output_channel_, param->kernel_h_, param->kernel_w_, param->input_channel_};
std::vector<int> bias_shape = {param->output_channel_};


Loading…
Cancel
Save