Browse Source

!12204 fix mciro copyright && namespace

From: @zoloft
Reviewed-by: @wangchengyuan,@zhang_xue_tong
Signed-off-by: @wangchengyuan
tags/v1.2.0-rc1
mindspore-ci-bot Gitee 4 years ago
parent
commit
05f52c538c
78 changed files with 171 additions and 171 deletions
  1. +1
    -1
      mindspore/lite/micro/coder/generator/const_blocks/micro_tensor.h
  2. +1
    -1
      mindspore/lite/micro/coder/opcoders/base/conv2d_base_coder.cc
  3. +1
    -1
      mindspore/lite/micro/coder/opcoders/base/conv2d_base_coder.h
  4. +1
    -1
      mindspore/lite/micro/coder/opcoders/base/dtype_cast_coder.cc
  5. +1
    -1
      mindspore/lite/micro/coder/opcoders/base/dtype_cast_coder.h
  6. +1
    -1
      mindspore/lite/micro/coder/opcoders/base/full_connection_base_coder.cc
  7. +1
    -1
      mindspore/lite/micro/coder/opcoders/base/full_connection_base_coder.h
  8. +1
    -1
      mindspore/lite/micro/coder/opcoders/base/quant_dtype_cast_coder.cc
  9. +1
    -1
      mindspore/lite/micro/coder/opcoders/base/quant_dtype_cast_coder.h
  10. +1
    -1
      mindspore/lite/micro/coder/opcoders/base/reduce_base_coder.cc
  11. +1
    -1
      mindspore/lite/micro/coder/opcoders/base/reduce_base_coder.h
  12. +1
    -1
      mindspore/lite/micro/coder/opcoders/base/softmax_base_coder.cc
  13. +1
    -1
      mindspore/lite/micro/coder/opcoders/base/softmax_base_coder.h
  14. +1
    -1
      mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/add_int8_coder.cc
  15. +1
    -1
      mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/add_int8_coder.h
  16. +1
    -1
      mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/conv2d_base_coder.cc
  17. +1
    -1
      mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/conv2d_base_coder.h
  18. +1
    -1
      mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/conv2d_int8_coder.cc
  19. +1
    -1
      mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/conv2d_int8_coder.h
  20. +1
    -1
      mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/dwconv_int8_coder.cc
  21. +1
    -1
      mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/dwconv_int8_coder.h
  22. +1
    -1
      mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/fullconnection_int8_coder.cc
  23. +1
    -1
      mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/fullconnection_int8_coder.h
  24. +1
    -1
      mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/mul_int8_coder.cc
  25. +1
    -1
      mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/mul_int8_coder.h
  26. +1
    -1
      mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/pooling_int8_coder.cc
  27. +1
    -1
      mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/pooling_int8_coder.h
  28. +1
    -1
      mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/reshape_int8_coder.cc
  29. +1
    -1
      mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/reshape_int8_coder.h
  30. +1
    -1
      mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/softmax_int8_coder.cc
  31. +1
    -1
      mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/softmax_int8_coder.h
  32. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/activation_fp32_coder.cc
  33. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/activation_fp32_coder.h
  34. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/addn_fp32_coder.cc
  35. +5
    -5
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/addn_fp32_coder.h
  36. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/arithmetic_fp32_coder.cc
  37. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/arithmetic_fp32_coder.h
  38. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/arithmetic_self_fp32_coder.cc
  39. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/arithmetic_self_fp32_coder.h
  40. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/assign_add_fp32_coder.cc
  41. +5
    -5
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/assign_add_fp32_coder.h
  42. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/batchnorm_fp32_coder.cc
  43. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/batchnorm_fp32_coder.h
  44. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/concat_fp32_coder.cc
  45. +5
    -5
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/concat_fp32_coder.h
  46. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/expand_dims_fp32_coder.cc
  47. +5
    -5
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/expand_dims_fp32_coder.h
  48. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/gather_fp32_coder.cc
  49. +5
    -5
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/gather_fp32_coder.h
  50. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/nchw2nhwc_fp32_coder.cc
  51. +5
    -5
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/nchw2nhwc_fp32_coder.h
  52. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/nhwc2nchw_fp32_coder.cc
  53. +5
    -5
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/nhwc2nchw_fp32_coder.h
  54. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/pad_fp32_coder.cc
  55. +5
    -5
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/pad_fp32_coder.h
  56. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/pooling_fp32_coder.cc
  57. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/pooling_fp32_coder.h
  58. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/power_fp32_coder.cc
  59. +5
    -5
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/power_fp32_coder.h
  60. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/reshape_fp32_coder.cc
  61. +5
    -5
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/reshape_fp32_coder.h
  62. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/scale_fp32_coder.cc
  63. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/scale_fp32_coder.h
  64. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/slice_fp32_coder.cc
  65. +4
    -4
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/slice_fp32_coder.h
  66. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/squeeze_dims_fp32_coder.cc
  67. +5
    -5
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/squeeze_dims_fp32_coder.h
  68. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/tile_fp32_coder.cc
  69. +5
    -5
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/tile_fp32_coder.h
  70. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/transpose_fp32_coder.cc
  71. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/fp32/transpose_fp32_coder.h
  72. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/int8/concat_int8_coder.cc
  73. +5
    -5
      mindspore/lite/micro/coder/opcoders/nnacl/int8/concat_int8_coder.h
  74. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/int8/pooling_int8_coder.cc
  75. +5
    -5
      mindspore/lite/micro/coder/opcoders/nnacl/int8/pooling_int8_coder.h
  76. +2
    -2
      mindspore/lite/micro/coder/opcoders/nnacl/int8/reshape_int8_coder.cc
  77. +5
    -5
      mindspore/lite/micro/coder/opcoders/nnacl/int8/reshape_int8_coder.h
  78. +1
    -1
      mindspore/lite/micro/coder/opcoders/serializers/serializer.h

+ 1
- 1
mindspore/lite/micro/coder/generator/const_blocks/micro_tensor.h View File

@@ -18,7 +18,7 @@

static const char micro_tensor_h[] =
"/**\n"
" * Copyright 2019 Huawei Technologies Co., Ltd\n"
" * Copyright 2021 Huawei Technologies Co., Ltd\n"
" *\n"
" * Licensed under the Apache License, Version 2.0 (the \"License\");\n"
" * you may not use this file except in compliance with the License.\n"


+ 1
- 1
mindspore/lite/micro/coder/opcoders/base/conv2d_base_coder.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/base/conv2d_base_coder.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/base/dtype_cast_coder.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/base/dtype_cast_coder.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/base/full_connection_base_coder.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/base/full_connection_base_coder.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/base/quant_dtype_cast_coder.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/base/quant_dtype_cast_coder.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/base/reduce_base_coder.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/base/reduce_base_coder.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/base/softmax_base_coder.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/base/softmax_base_coder.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/add_int8_coder.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/add_int8_coder.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/conv2d_base_coder.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/conv2d_base_coder.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/conv2d_int8_coder.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/conv2d_int8_coder.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/dwconv_int8_coder.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/dwconv_int8_coder.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/fullconnection_int8_coder.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/fullconnection_int8_coder.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/mul_int8_coder.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/mul_int8_coder.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/pooling_int8_coder.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/pooling_int8_coder.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/reshape_int8_coder.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/reshape_int8_coder.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/softmax_int8_coder.cc View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 1
- 1
mindspore/lite/micro/coder/opcoders/cmsis-nn/int8/softmax_int8_coder.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/activation_fp32_coder.cc View File

@@ -22,7 +22,7 @@

using mindspore::schema::PrimitiveType_Activation;

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

int ActivationFP32Coder::DoCode(CoderContext *const context) {
// attribute
@@ -68,4 +68,4 @@ int ActivationFP32Coder::DoCode(CoderContext *const context) {
}

REG_OPERATOR_CODER(kAllTargets, kNumberTypeFloat32, PrimitiveType_Activation, CPUOpCoderCreator<ActivationFP32Coder>)
} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/activation_fp32_coder.h View File

@@ -20,7 +20,7 @@
#include <vector>
#include "micro/coder/opcoders/op_coder.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

class ActivationFP32Coder final : public OperatorCoder {
public:
@@ -35,6 +35,6 @@ class ActivationFP32Coder final : public OperatorCoder {
int DoCode(CoderContext *const context) override;
};

} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

#endif // MICRO_CODER_OPCODERS_FP32__CODER_H_

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/addn_fp32_coder.cc View File

@@ -20,7 +20,7 @@
#include "micro/coder/opcoders/file_collector.h"

using mindspore::schema::PrimitiveType_AddN;
namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

int AddNFP32Coder::DoCode(CoderContext *const context) {
Tensor *input0 = input_tensors_.at(kInputIndex);
@@ -45,4 +45,4 @@ int AddNFP32Coder::DoCode(CoderContext *const context) {

REG_OPERATOR_CODER(kAllTargets, kNumberTypeFloat32, PrimitiveType_AddN, CPUOpCoderCreator<AddNFP32Coder>)

} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

+ 5
- 5
mindspore/lite/micro/coder/opcoders/nnacl/fp32/addn_fp32_coder.h View File

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

#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_ADDN_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_ADDN_FP32_CODER_H_
#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_ADDN_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_ADDN_FP32_CODER_H_
#include <vector>
#include "micro/coder/opcoders/op_coder.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {
class AddNFP32Coder : public OperatorCoder {
public:
AddNFP32Coder(const std::vector<Tensor *> &in_tensors, const std::vector<Tensor *> &out_tensors,
@@ -32,5 +32,5 @@ class AddNFP32Coder : public OperatorCoder {

int DoCode(CoderContext *const context) override;
};
} // namespace mindspore::lite::micro
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_ADDN_FP32_CODER_H_
} // namespace mindspore::lite::micro::nnacl
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_ADDN_FP32_CODER_H_

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/arithmetic_fp32_coder.cc View File

@@ -21,7 +21,7 @@
#include "nnacl/fp32/arithmetic_fp32.h"
#include "micro/coder/log.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

int ArithmeticFP32Coder::Init(CoderContext *const context) {
filter_tensor_ = input_tensors_.at(kWeightIndex);
@@ -370,4 +370,4 @@ REG_OPERATOR_CODER(kAllTargets, kNumberTypeFloat32, PrimitiveType_GreaterEqual,

REG_OPERATOR_CODER(kAllTargets, kNumberTypeFloat32, PrimitiveType_Eltwise, CPUOpCoderCreator<ArithmeticFP32Coder>)

} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/arithmetic_fp32_coder.h View File

@@ -23,7 +23,7 @@
#include "nnacl/fp32/arithmetic_fp32.h"
#include "micro/coder/opcoders/serializers/nnacl_serializer/nnacl_fp32_serializer.h"
#define DEFAULT_ARITHMETIC_NDIMS 10
namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

using mindspore::schema::PrimitiveType_Add;

@@ -105,5 +105,5 @@ class ArithmeticFP32Coder final : public OperatorCoder {

LiteDataType data_type_{kDataTypeFloat};
};
} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl
#endif // MICRO_CODER_OPCODERS_FP32_ARITHMETIC_FP32_CODER_H_

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/arithmetic_self_fp32_coder.cc View File

@@ -21,7 +21,7 @@
#include "micro/coder/opcoders/serializers/nnacl_serializer/nnacl_fp32_serializer.h"
#include "micro/coder/opcoders/file_collector.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

int ArithmeticSelfFP32Coder::ReSize() {
data_size_ = input_tensor_->ElementsNum();
@@ -101,4 +101,4 @@ REG_OPERATOR_CODER(kAllTargets, kNumberTypeFloat32, PrimitiveType_Round, CPUOpCo

REG_OPERATOR_CODER(kAllTargets, kNumberTypeFloat32, PrimitiveType_Neg, CPUOpCoderCreator<ArithmeticSelfFP32Coder>)

} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/arithmetic_self_fp32_coder.h View File

@@ -23,7 +23,7 @@
#include "nnacl/fp32/arithmetic_self_fp32.h"
#include "nnacl/arithmetic_self_parameter.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

using mindspore::schema::PrimitiveType_Abs;

@@ -105,5 +105,5 @@ class ArithmeticSelfFP32Coder final : public OperatorCoder {
size_t data_size_{0};
std::string arithmetic_self_run_;
};
} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl
#endif // MICRO_CODER_OPCODERS_FP32_ARITHMETIC_SELF_FP32_CODER_H_

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/assign_add_fp32_coder.cc View File

@@ -19,7 +19,7 @@
#include "schema/inner/ops_generated.h"
#include "micro/coder/opcoders/serializers/nnacl_serializer/nnacl_fp32_serializer.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

using mindspore::schema::PrimitiveType_AssignAdd;

@@ -52,4 +52,4 @@ REG_OPERATOR_CODER(kAllTargets, kNumberTypeFloat32, PrimitiveType_AssignAdd, CPU

REG_OPERATOR_CODER(kAllTargets, kNumberTypeInt32, PrimitiveType_AssignAdd, CPUOpCoderCreator<AssignAddFP32Coder>)

} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

+ 5
- 5
mindspore/lite/micro/coder/opcoders/nnacl/fp32/assign_add_fp32_coder.h View File

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

#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_ASSIGN_ADD_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_ASSIGN_ADD_FP32_CODER_H_
#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_ASSIGN_ADD_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_ASSIGN_ADD_FP32_CODER_H_

#include <vector>
#include "micro/coder/opcoders/op_coder.h"
#include "nnacl/base/tile_base.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {
class AssignAddFP32Coder : public OperatorCoder {
public:
AssignAddFP32Coder(const std::vector<Tensor *> &in_tensors, const std::vector<Tensor *> &out_tensors,
@@ -33,5 +33,5 @@ class AssignAddFP32Coder : public OperatorCoder {

int DoCode(CoderContext *const context) override;
};
} // namespace mindspore::lite::micro
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_ASSIGN_ADD_FP32_CODER_H_
} // namespace mindspore::lite::micro::nnacl
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_ASSIGN_ADD_FP32_CODER_H_

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/batchnorm_fp32_coder.cc View File

@@ -24,7 +24,7 @@

using mindspore::schema::PrimitiveType_BatchNorm;

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

int BatchnormFP32Coder::Init() {
auto bn_parameter = reinterpret_cast<BatchNormParameter *>(parameter_);
@@ -66,4 +66,4 @@ int BatchnormFP32Coder::DoCode(CoderContext *const context) {
}

REG_OPERATOR_CODER(kAllTargets, kNumberTypeFloat32, PrimitiveType_BatchNorm, CPUOpCoderCreator<BatchnormFP32Coder>)
} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/batchnorm_fp32_coder.h View File

@@ -20,7 +20,7 @@
#include <vector>
#include "micro/coder/opcoders/op_coder.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

class BatchnormFP32Coder final : public OperatorCoder {
public:
@@ -38,6 +38,6 @@ class BatchnormFP32Coder final : public OperatorCoder {
int Init();
};

} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

#endif // MICRO_CODER_OPCODERS_FP32_CODER_H_

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/concat_fp32_coder.cc View File

@@ -21,7 +21,7 @@

using mindspore::schema::PrimitiveType_Concat;

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

int ConcatFP32Coder::Prepare(CoderContext *const context) {
concat_param_ = reinterpret_cast<ConcatParameter *>(parameter_);
@@ -74,4 +74,4 @@ int ConcatFP32Coder::DoCode(CoderContext *const context) {
}

REG_OPERATOR_CODER(kAllTargets, kNumberTypeFloat32, PrimitiveType_Concat, CPUOpCoderCreator<ConcatFP32Coder>)
} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

+ 5
- 5
mindspore/lite/micro/coder/opcoders/nnacl/fp32/concat_fp32_coder.h View File

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

#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_CONCAT_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_CONCAT_FP32_CODER_H_
#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_CONCAT_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_CONCAT_FP32_CODER_H_

#include <vector>
#include "micro/coder/opcoders/op_coder.h"
#include "nnacl/concat_parameter.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {
class ConcatFP32Coder : public OperatorCoder {
public:
ConcatFP32Coder(const std::vector<Tensor *> &in_tensors, const std::vector<Tensor *> &out_tensors,
@@ -38,5 +38,5 @@ class ConcatFP32Coder : public OperatorCoder {
int axis_{0};
ConcatParameter *concat_param_{nullptr};
};
} // namespace mindspore::lite::micro
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_CONCAT_FP32_CODER_H_
} // namespace mindspore::lite::micro::nnacl
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_CONCAT_FP32_CODER_H_

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/expand_dims_fp32_coder.cc View File

@@ -21,7 +21,7 @@

using mindspore::schema::PrimitiveType_ExpandDims;

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {
int ExpandDimsFP32Coder::Prepare(CoderContext *const context) { return ReSize(); }

int ExpandDimsFP32Coder::ReSize() {
@@ -49,4 +49,4 @@ int ExpandDimsFP32Coder::DoCode(CoderContext *const context) {
REG_OPERATOR_CODER(kAllTargets, kNumberTypeFloat32, PrimitiveType_ExpandDims, CPUOpCoderCreator<ExpandDimsFP32Coder>)

REG_OPERATOR_CODER(kAllTargets, kNumberTypeInt32, PrimitiveType_ExpandDims, CPUOpCoderCreator<ExpandDimsFP32Coder>)
} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

+ 5
- 5
mindspore/lite/micro/coder/opcoders/nnacl/fp32/expand_dims_fp32_coder.h View File

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

#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_EXPANDDIMS_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_EXPANDDIMS_FP32_CODER_H_
#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_EXPANDDIMS_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_EXPANDDIMS_FP32_CODER_H_

#include <vector>
#include "micro/coder/opcoders/op_coder.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {
class ExpandDimsFP32Coder : public OperatorCoder {
public:
ExpandDimsFP32Coder(const std::vector<Tensor *> &in_tensors, const std::vector<Tensor *> &out_tensors,
@@ -38,5 +38,5 @@ class ExpandDimsFP32Coder : public OperatorCoder {
int thread_sz_stride_{0};
size_t data_size_{0};
};
} // namespace mindspore::lite::micro
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_EXPANDDIMS_FP32_CODER_H_
} // namespace mindspore::lite::micro::nnacl
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_EXPANDDIMS_FP32_CODER_H_

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/gather_fp32_coder.cc View File

@@ -23,7 +23,7 @@

using mindspore::schema::PrimitiveType_Gather;

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

int GatherFP32Coder::Prepare(CoderContext *const context) { return RET_OK; }

@@ -66,4 +66,4 @@ int GatherFP32Coder::DoCode(CoderContext *context) {

REG_OPERATOR_CODER(kAllTargets, kNumberTypeFloat32, PrimitiveType_Gather, CPUOpCoderCreator<GatherFP32Coder>)

} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

+ 5
- 5
mindspore/lite/micro/coder/opcoders/nnacl/fp32/gather_fp32_coder.h View File

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

#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_GATHER_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_GATHER_FP32_CODER_H_
#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_GATHER_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_GATHER_FP32_CODER_H_

#include <vector>
#include "micro/coder/opcoders/op_coder.h"
#include "nnacl/base/tile_base.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {
class GatherFP32Coder : public OperatorCoder {
public:
GatherFP32Coder(const std::vector<Tensor *> &in_tensors, const std::vector<Tensor *> &out_tensors,
@@ -37,5 +37,5 @@ class GatherFP32Coder : public OperatorCoder {
private:
int32_t *indices_{nullptr};
};
} // namespace mindspore::lite::micro
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_GATHER_FP32_CODER_H_
} // namespace mindspore::lite::micro::nnacl
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_GATHER_FP32_CODER_H_

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/nchw2nhwc_fp32_coder.cc View File

@@ -22,7 +22,7 @@

using mindspore::schema::PrimitiveType_Nchw2Nhwc;

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {
int Nchw2NhwcFP32Coder::Prepare(CoderContext *const context) { return RET_OK; }

int Nchw2NhwcFP32Coder::DoCode(CoderContext *context) {
@@ -48,4 +48,4 @@ int Nchw2NhwcFP32Coder::DoCode(CoderContext *context) {
}

REG_OPERATOR_CODER(kAllTargets, kNumberTypeFloat32, PrimitiveType_Nchw2Nhwc, CPUOpCoderCreator<Nchw2NhwcFP32Coder>)
} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

+ 5
- 5
mindspore/lite/micro/coder/opcoders/nnacl/fp32/nchw2nhwc_fp32_coder.h View File

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

#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_NCHW2FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_NCHW2FP32_CODER_H_
#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_NCHW2FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_NCHW2FP32_CODER_H_

#include <string>
#include <vector>
#include "micro/coder/opcoders/op_coder.h"
#include "nnacl/base/tile_base.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {
class Nchw2NhwcFP32Coder : public OperatorCoder {
public:
Nchw2NhwcFP32Coder(const std::vector<Tensor *> &in_tensors, const std::vector<Tensor *> &out_tensors,
@@ -34,5 +34,5 @@ class Nchw2NhwcFP32Coder : public OperatorCoder {

int DoCode(CoderContext *const context) override;
};
} // namespace mindspore::lite::micro
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_NCHW2FP32_CODER_H_
} // namespace mindspore::lite::micro::nnacl
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_NCHW2FP32_CODER_H_

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/nhwc2nchw_fp32_coder.cc View File

@@ -20,7 +20,7 @@
#include "micro/coder/opcoders/file_collector.h"

using mindspore::schema::PrimitiveType_Nhwc2Nchw;
namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {
int Nhwc2NchwFP32Coder::Prepare(CoderContext *const context) { return RET_OK; }

int Nhwc2NchwFP32Coder::DoCode(CoderContext *const context) {
@@ -47,4 +47,4 @@ int Nhwc2NchwFP32Coder::DoCode(CoderContext *const context) {
}

REG_OPERATOR_CODER(kAllTargets, kNumberTypeFloat32, PrimitiveType_Nhwc2Nchw, CPUOpCoderCreator<Nhwc2NchwFP32Coder>)
} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

+ 5
- 5
mindspore/lite/micro/coder/opcoders/nnacl/fp32/nhwc2nchw_fp32_coder.h View File

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

#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_NHWC2NCHW_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_NHWC2NCHW_FP32_CODER_H_
#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_NHWC2NCHW_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_NHWC2NCHW_FP32_CODER_H_

#include <vector>
#include "micro/coder/opcoders/op_coder.h"
#include "nnacl/base/tile_base.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {
class Nhwc2NchwFP32Coder : public OperatorCoder {
public:
Nhwc2NchwFP32Coder(const std::vector<Tensor *> &in_tensors, const std::vector<Tensor *> &out_tensors,
@@ -33,5 +33,5 @@ class Nhwc2NchwFP32Coder : public OperatorCoder {

int DoCode(CoderContext *const context) override;
};
} // namespace mindspore::lite::micro
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_NHWC2NCHW_FP32_CODER_H_
} // namespace mindspore::lite::micro::nnacl
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_NHWC2NCHW_FP32_CODER_H_

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/pad_fp32_coder.cc View File

@@ -23,7 +23,7 @@

using mindspore::schema::PrimitiveType_Pad;

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

int PadFP32Coder::Prepare(CoderContext *const context) {
pad_param_ = reinterpret_cast<PadParameter *>(parameter_);
@@ -100,4 +100,4 @@ int PadFP32Coder::DoCode(CoderContext *const context) {
}

REG_OPERATOR_CODER(kAllTargets, kNumberTypeFloat32, PrimitiveType_Pad, CPUOpCoderCreator<PadFP32Coder>)
} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

+ 5
- 5
mindspore/lite/micro/coder/opcoders/nnacl/fp32/pad_fp32_coder.h View File

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

#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_PAD_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_PAD_FP32_CODER_H_
#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_PAD_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_PAD_FP32_CODER_H_

#include <vector>
#include "micro/coder/opcoders/op_coder.h"
#include "nnacl/fp32/pad_fp32.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {
class PadFP32Coder : public OperatorCoder {
public:
PadFP32Coder(const std::vector<Tensor *> &in_tensors, const std::vector<Tensor *> &out_tensors,
@@ -45,5 +45,5 @@ class PadFP32Coder : public OperatorCoder {
int in_[DEFAULT_PAD_NDIMS]{0};
int out_[DEFAULT_PAD_NDIMS]{0};
};
} // namespace mindspore::lite::micro
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_PAD_FP32_CODER_H_
} // namespace mindspore::lite::micro::nnacl
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_PAD_FP32_CODER_H_

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/pooling_fp32_coder.cc View File

@@ -23,7 +23,7 @@

using mindspore::schema::PrimitiveType_Pooling;

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

int PoolingFP32Coder::DoCode(CoderContext *const context) {
// attribute
@@ -100,4 +100,4 @@ int PoolingFP32Coder::DoCode(CoderContext *const context) {
}

REG_OPERATOR_CODER(kAllTargets, kNumberTypeFloat32, PrimitiveType_Pooling, CPUOpCoderCreator<PoolingFP32Coder>)
} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/pooling_fp32_coder.h View File

@@ -20,7 +20,7 @@
#include <vector>
#include "micro/coder/opcoders/op_coder.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

class PoolingFP32Coder final : public OperatorCoder {
public:
@@ -34,6 +34,6 @@ class PoolingFP32Coder final : public OperatorCoder {
int DoCode(CoderContext *const context) override;
};

} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

#endif // MICRO_CODER_OPCODERS_FP32__CODER_H_

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/power_fp32_coder.cc View File

@@ -22,7 +22,7 @@

using mindspore::schema::PrimitiveType_Power;

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

int PowerFP32Coder::DoCode(CoderContext *const context) {
scale_ = reinterpret_cast<PowerParameter *>(parameter_)->scale_;
@@ -57,4 +57,4 @@ int PowerFP32Coder::DoCode(CoderContext *const context) {

REG_OPERATOR_CODER(kAllTargets, kNumberTypeFloat32, PrimitiveType_Power, CPUOpCoderCreator<PowerFP32Coder>)

} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

+ 5
- 5
mindspore/lite/micro/coder/opcoders/nnacl/fp32/power_fp32_coder.h View File

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

#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_POWER_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_POWER_FP32_CODER_H_
#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_POWER_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_POWER_FP32_CODER_H_

#include <vector>
#include "micro/coder/opcoders/op_coder.h"
#include "nnacl/power_parameter.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {
class PowerFP32Coder : public OperatorCoder {
public:
PowerFP32Coder(const std::vector<Tensor *> &in_tensors, const std::vector<Tensor *> &out_tensors,
@@ -38,5 +38,5 @@ class PowerFP32Coder : public OperatorCoder {
float scale_{0.0f};
float shift_{0.0f};
};
} // namespace mindspore::lite::micro
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_POWER_FP32_CODER_H_
} // namespace mindspore::lite::micro::nnacl
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_POWER_FP32_CODER_H_

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/reshape_fp32_coder.cc View File

@@ -20,7 +20,7 @@
#include "micro/coder/opcoders/file_collector.h"

using mindspore::schema::PrimitiveType_Reshape;
namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

int ReshapeFP32Coder::DoCode(CoderContext *const context) {
size_t data_size = input_tensor_->Size();
@@ -36,4 +36,4 @@ int ReshapeFP32Coder::DoCode(CoderContext *const context) {
REG_OPERATOR_CODER(kAllTargets, kNumberTypeFloat32, PrimitiveType_Reshape, CPUOpCoderCreator<ReshapeFP32Coder>)

REG_OPERATOR_CODER(kAllTargets, kNumberTypeInt32, PrimitiveType_Reshape, CPUOpCoderCreator<ReshapeFP32Coder>)
} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

+ 5
- 5
mindspore/lite/micro/coder/opcoders/nnacl/fp32/reshape_fp32_coder.h View File

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

#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_RESHAPE_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_RESHAPE_FP32_CODER_H_
#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_RESHAPE_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_RESHAPE_FP32_CODER_H_

#include <vector>
#include "micro/coder/opcoders/op_coder.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {
class ReshapeFP32Coder : public OperatorCoder {
public:
ReshapeFP32Coder(const std::vector<Tensor *> &in_tensors, const std::vector<Tensor *> &out_tensors,
@@ -31,5 +31,5 @@ class ReshapeFP32Coder : public OperatorCoder {

int DoCode(CoderContext *const context) override;
};
} // namespace mindspore::lite::micro
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_RESHAPE_FP32_CODER_H_
} // namespace mindspore::lite::micro::nnacl
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_RESHAPE_FP32_CODER_H_

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/scale_fp32_coder.cc View File

@@ -21,7 +21,7 @@

using mindspore::schema::PrimitiveType_Scale;

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {
ScaleFP32Coder::~ScaleFP32Coder() {
if (scale_param_->const_scale_) {
if (scale_) {
@@ -161,4 +161,4 @@ int ScaleFP32Coder::DoCode(CoderContext *const context) {
}

REG_OPERATOR_CODER(kAllTargets, kNumberTypeFloat32, PrimitiveType_Scale, CPUOpCoderCreator<ScaleFP32Coder>)
} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/scale_fp32_coder.h View File

@@ -21,7 +21,7 @@
#include "micro/coder/opcoders/op_coder.h"
#include "nnacl/scale.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

class ScaleFP32Coder final : public OperatorCoder {
public:
@@ -44,6 +44,6 @@ class ScaleFP32Coder final : public OperatorCoder {
float *offset_{nullptr};
};

} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

#endif // MICRO_CODER_OPCODERS_FP32__CODER_H_

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/slice_fp32_coder.cc View File

@@ -22,7 +22,7 @@
#include "micro/coder/opcoders/file_collector.h"

using mindspore::schema::PrimitiveType_Slice;
namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {
int SliceFP32Coder::Prepare(CoderContext *const context) { return RET_OK; }

int SliceFP32Coder::DoCode(CoderContext *const context) {
@@ -71,4 +71,4 @@ int SliceFP32Coder::DoCode(CoderContext *const context) {
}

REG_OPERATOR_CODER(kAllTargets, kNumberTypeFloat32, PrimitiveType_Slice, CPUOpCoderCreator<SliceFP32Coder>)
} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

+ 4
- 4
mindspore/lite/micro/coder/opcoders/nnacl/fp32/slice_fp32_coder.h View File

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

#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_SLICE_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_SLICE_FP32_CODER_H_
#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_SLICE_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_SLICE_FP32_CODER_H_

#include <vector>
#include "micro/coder/opcoders/op_coder.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {
class SliceFP32Coder : public OperatorCoder {
public:
SliceFP32Coder(const std::vector<Tensor *> &in_tensors, const std::vector<Tensor *> &out_tensors,
@@ -33,5 +33,5 @@ class SliceFP32Coder : public OperatorCoder {

int DoCode(CoderContext *const context) override;
};
} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl
#endif // MINDSPORE_LITE_MICRO_CODER_OPCOD ERS_SLICE_FP32_CODER_H_

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/squeeze_dims_fp32_coder.cc View File

@@ -21,7 +21,7 @@

using mindspore::schema::PrimitiveType_Squeeze;

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

int SqueezeFP32Coder::DoCode(CoderContext *const context) {
size_t data_size = input_tensor_->Size();
@@ -42,4 +42,4 @@ int SqueezeFP32Coder::DoCode(CoderContext *const context) {

REG_OPERATOR_CODER(kAllTargets, kNumberTypeFloat32, PrimitiveType_Squeeze, CPUOpCoderCreator<SqueezeFP32Coder>)

} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

+ 5
- 5
mindspore/lite/micro/coder/opcoders/nnacl/fp32/squeeze_dims_fp32_coder.h View File

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

#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_SQUEEZE_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_SQUEEZE_FP32_CODER_H_
#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_SQUEEZE_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_SQUEEZE_FP32_CODER_H_

#include <vector>
#include "micro/coder/opcoders/op_coder.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {
class SqueezeFP32Coder : public OperatorCoder {
public:
SqueezeFP32Coder(const std::vector<Tensor *> &in_tensors, const std::vector<Tensor *> &out_tensors,
@@ -33,5 +33,5 @@ class SqueezeFP32Coder : public OperatorCoder {

int DoCode(CoderContext *const context) override;
};
} // namespace mindspore::lite::micro
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_SQUEEZE_FP32_CODER_H_
} // namespace mindspore::lite::micro::nnacl
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_SQUEEZE_FP32_CODER_H_

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/tile_fp32_coder.cc View File

@@ -22,7 +22,7 @@

using mindspore::schema::PrimitiveType_Tile;

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {
void TileFP32Coder::ComputeStrides(const int *shape, int *strides, int ndim) const {
int stride = 1;
for (int i = ndim - 1; i >= 0; i--) {
@@ -65,4 +65,4 @@ int TileFP32Coder::DoCode(CoderContext *const context) {

REG_OPERATOR_CODER(kAllTargets, kNumberTypeFloat32, PrimitiveType_Tile, CPUOpCoderCreator<TileFP32Coder>)

} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

+ 5
- 5
mindspore/lite/micro/coder/opcoders/nnacl/fp32/tile_fp32_coder.h View File

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

#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_TILE_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_TILE_FP32_CODER_H_
#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_TILE_FP32_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_TILE_FP32_CODER_H_

#include <vector>
#include "micro/coder/opcoders/op_coder.h"
#include "nnacl/base/tile_base.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {
class TileFP32Coder : public OperatorCoder {
public:
TileFP32Coder(const std::vector<Tensor *> &in_tensors, const std::vector<Tensor *> &out_tensors,
@@ -39,5 +39,5 @@ class TileFP32Coder : public OperatorCoder {

TileParameter *tile_param_{nullptr};
};
} // namespace mindspore::lite::micro
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_TILE_FP32_CODER_H_
} // namespace mindspore::lite::micro::nnacl
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_TILE_FP32_CODER_H_

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/transpose_fp32_coder.cc View File

@@ -21,7 +21,7 @@
#include "micro/coder/opcoders/file_collector.h"

using mindspore::schema::PrimitiveType_Transpose;
namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

int TransposeFp32Coder::Resize() {
num_unit_ = static_cast<int>(input_tensor_->shape().at(transpose_parameter_->perm_[kNHWC_H]));
@@ -91,4 +91,4 @@ int TransposeFp32Coder::DoCode(CoderContext *const context) {
}

REG_OPERATOR_CODER(kAllTargets, kNumberTypeFloat32, PrimitiveType_Transpose, CPUOpCoderCreator<TransposeFp32Coder>)
} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/fp32/transpose_fp32_coder.h View File

@@ -19,7 +19,7 @@
#include <vector>
#include "micro/coder/opcoders/op_coder.h"
#include "nnacl/transpose.h"
namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

class TransposeFp32Coder final : public OperatorCoder {
public:
@@ -49,5 +49,5 @@ class TransposeFp32Coder final : public OperatorCoder {
int *position_ = nullptr;
};

} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl
#endif // MICRO_LITE_MICRO_CODER_OPCODERS_NNACL_FP32_TRANSPOSE_FP32_CODER_H_

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/int8/concat_int8_coder.cc View File

@@ -31,7 +31,7 @@ int MallocQuantArgForConcat(ConcatQuantArg *quant_arg, size_t input_num) {

using mindspore::schema::PrimitiveType_Concat;

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {
int ConcatInt8Coder::Prepare(CoderContext *const context) {
this->concat_param_ = reinterpret_cast<ConcatParameter *>(parameter_);

@@ -111,4 +111,4 @@ int ConcatInt8Coder::DoCode(CoderContext *const context) {
}

REG_OPERATOR_CODER(kAllTargets, kNumberTypeInt8, PrimitiveType_Concat, CPUOpCoderCreator<ConcatInt8Coder>)
} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

+ 5
- 5
mindspore/lite/micro/coder/opcoders/nnacl/int8/concat_int8_coder.h View File

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

#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_CONCAT_INT8_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_CONCAT_INT8_CODER_H_
#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_CONCAT_INT8_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_CONCAT_INT8_CODER_H_

#include <cstring>
#include <vector>
#include "micro/coder/opcoders/op_coder.h"
#include "nnacl/int8/concat_int8.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {
class ConcatInt8Coder : public OperatorCoder {
public:
ConcatInt8Coder(const std::vector<Tensor *> &in_tensors, const std::vector<Tensor *> &out_tensors,
@@ -52,5 +52,5 @@ class ConcatInt8Coder : public OperatorCoder {
int8_t *input_data_{nullptr};
int axis_ = 0;
};
} // namespace mindspore::lite::micro
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_CONCAT_INT8_CODER_H_
} // namespace mindspore::lite::micro::nnacl
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_CONCAT_INT8_CODER_H_

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/int8/pooling_int8_coder.cc View File

@@ -25,7 +25,7 @@
using std::string;

using mindspore::schema::PrimitiveType_Pooling;
namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

int PoolingInt8Coder::DoCode(CoderContext *const context) {
// attribute
@@ -79,4 +79,4 @@ int PoolingInt8Coder::DoCode(CoderContext *const context) {
}

REG_OPERATOR_CODER(kAllTargets, kNumberTypeInt8, PrimitiveType_Pooling, CPUOpCoderCreator<PoolingInt8Coder>)
} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

+ 5
- 5
mindspore/lite/micro/coder/opcoders/nnacl/int8/pooling_int8_coder.h View File

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

#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_POOLING_INT8_CODER_H
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_POOLING_INT8_CODER_H
#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_POOLING_INT8_CODER_H
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_POOLING_INT8_CODER_H

#include <string>
#include <memory>
#include <vector>
#include "micro/coder/opcoders/op_coder.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

class PoolingInt8Coder final : public OperatorCoder {
public:
@@ -37,6 +37,6 @@ class PoolingInt8Coder final : public OperatorCoder {
int DoCode(CoderContext *const context) override;
};

} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_POOLING_INT8_CODER_H
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_POOLING_INT8_CODER_H

+ 2
- 2
mindspore/lite/micro/coder/opcoders/nnacl/int8/reshape_int8_coder.cc View File

@@ -23,7 +23,7 @@

using mindspore::schema::PrimitiveType_Reshape;

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {

int ReshapeInt8Coder::DoCode(CoderContext *const context) {
Tensor *input = OperatorCoder::input_tensors().at(kInputIndex);
@@ -55,4 +55,4 @@ int ReshapeInt8Coder::DoCode(CoderContext *const context) {
}

REG_OPERATOR_CODER(kAllTargets, kNumberTypeInt8, PrimitiveType_Reshape, CPUOpCoderCreator<ReshapeInt8Coder>)
} // namespace mindspore::lite::micro
} // namespace mindspore::lite::micro::nnacl

+ 5
- 5
mindspore/lite/micro/coder/opcoders/nnacl/int8/reshape_int8_coder.h View File

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

#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_RESHAPE_INT8_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_RESHAPE_INT8_CODER_H_
#ifndef MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_RESHAPE_INT8_CODER_H_
#define MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_RESHAPE_INT8_CODER_H_

#include <vector>
#include "micro/coder/opcoders/op_coder.h"

namespace mindspore::lite::micro {
namespace mindspore::lite::micro::nnacl {
class ReshapeInt8Coder : public OperatorCoder {
public:
ReshapeInt8Coder(const std::vector<Tensor *> &in_tensors, const std::vector<Tensor *> &out_tensors,
@@ -33,5 +33,5 @@ class ReshapeInt8Coder : public OperatorCoder {

int DoCode(CoderContext *const context) override;
};
} // namespace mindspore::lite::micro
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_RESHAPE_INT8_CODER_H_
} // namespace mindspore::lite::micro::nnacl
#endif // MINDSPORE_LITE_MICRO_CODER_OPCODERS_NNACL_RESHAPE_INT8_CODER_H_

+ 1
- 1
mindspore/lite/micro/coder/opcoders/serializers/serializer.h View File

@@ -1,5 +1,5 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
* Copyright 2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.


Loading…
Cancel
Save