modify activation_grad file name
This commit is contained in:
parent
51fee4ef61
commit
7feb9ede15
|
@ -10,7 +10,7 @@ function(__install_micro_wrapper)
|
|||
COMPONENT ${RUNTIME_COMPONENT_NAME} FILES_MATCHING PATTERN "*.h")
|
||||
install(DIRECTORY ${NNACL_DIR}/fp32 DESTINATION ${CODEGEN_ROOT_DIR}/include/nnacl
|
||||
COMPONENT ${RUNTIME_COMPONENT_NAME} FILES_MATCHING PATTERN "*.h")
|
||||
install(FILES ${NNACL_DIR}/fp32_grad/activation_grad.h DESTINATION
|
||||
install(FILES ${NNACL_DIR}/fp32_grad/activation_grad_fp32.h DESTINATION
|
||||
${CODEGEN_ROOT_DIR}/include/nnacl/fp32_grad COMPONENT ${RUNTIME_COMPONENT_NAME})
|
||||
install(FILES ${NNACL_DIR}/fp32_grad/softmax_cross_entropy_with_logits.h DESTINATION
|
||||
${CODEGEN_ROOT_DIR}/include/nnacl/fp32_grad COMPONENT ${RUNTIME_COMPONENT_NAME})
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <functional>
|
||||
#include "include/common/thread_pool.h"
|
||||
#include "plugin/device/cpu/hal/device/cpu_device_address.h"
|
||||
#include "nnacl/fp32_grad/activation_grad.h"
|
||||
#include "nnacl/fp32_grad/activation_grad_fp32.h"
|
||||
#include "nnacl/fp32_grad/arithmetic_grad.h"
|
||||
#include "nnacl/errorcode.h"
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include <algorithm>
|
||||
#include "mindspore/core/ops/grad/hshrink_grad.h"
|
||||
#include "plugin/factory/ms_factory.h"
|
||||
#include "plugin/device/cpu/kernel/nnacl/fp32_grad/activation_grad.h"
|
||||
#include "plugin/device/cpu/kernel/nnacl/fp32_grad/activation_grad_fp32.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace kernel {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright 2021 Huawei Technologies Co., Ltd
|
||||
* Copyright 2021-2022 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.
|
||||
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "nnacl/fp16_grad/activation_grad.h"
|
||||
#include "nnacl/fp16_grad/activation_grad_fp16.h"
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
#ifdef ENABLE_NEON
|
|
@ -13,8 +13,8 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#ifndef MINDSPORE_CCSRC_BACKEND_KERNEL_COMPILER_CPU_NNACL_FP16_GRAD_ACTIVATION_GRAD_H_
|
||||
#define MINDSPORE_CCSRC_BACKEND_KERNEL_COMPILER_CPU_NNACL_FP16_GRAD_ACTIVATION_GRAD_H_
|
||||
#ifndef MINDSPORE_CCSRC_PLUGIN_DEVICE_CPU_KERNEL_NNACL_FP16_GRAD_ACTIVATION_GRAD_FP16_H_
|
||||
#define MINDSPORE_CCSRC_PLUGIN_DEVICE_CPU_KERNEL_NNACL_FP16_GRAD_ACTIVATION_GRAD_FP16_H_
|
||||
|
||||
#ifdef ENABLE_NEON
|
||||
#include <arm_neon.h>
|
||||
|
@ -41,4 +41,4 @@ int GeluFp16Grad(const float16_t *src0, const float16_t *src1, int length, float
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif // MINDSPORE_CCSRC_BACKEND_KERNEL_COMPILER_CPU_NNACL_FP16_GRAD_ACTIVATION_GRAD_H_
|
||||
#endif // MINDSPORE_CCSRC_PLUGIN_DEVICE_CPU_KERNEL_NNACL_FP16_GRAD_ACTIVATION_GRAD_FP16_H_
|
|
@ -18,7 +18,7 @@
|
|||
#include "nnacl/op_base.h"
|
||||
#include "nnacl/fp32/arithmetic_fp32.h"
|
||||
#include "nnacl/fp32/exp_fp32.h"
|
||||
#include "nnacl/fp32_grad/activation_grad.h"
|
||||
#include "nnacl/fp32_grad/activation_grad_fp32.h"
|
||||
#include "nnacl/errorcode.h"
|
||||
#include "nnacl/intrinsics/ms_simd_instructions.h"
|
||||
#include "nnacl/activation_grad_simd.h"
|
|
@ -13,8 +13,8 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#ifndef MINDSPORE_NNACL_FP32_GRAD_ACTIVATION_GRAD_H_
|
||||
#define MINDSPORE_NNACL_FP32_GRAD_ACTIVATION_GRAD_H_
|
||||
#ifndef MINDSPORE_CCSRC_PLUGIN_DEVICE_CPU_KERNEL_NNACL_FP32_GRAD_ACTIVATION_GRAD_FP32_H_
|
||||
#define MINDSPORE_CCSRC_PLUGIN_DEVICE_CPU_KERNEL_NNACL_FP32_GRAD_ACTIVATION_GRAD_FP32_H_
|
||||
|
||||
#include <math.h>
|
||||
#include "nnacl/op_base.h"
|
||||
|
@ -46,4 +46,4 @@ int SoftShrinkGrad(const float *src0, const float *src1, int length, float *dst,
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif // MINDSPORE_NNACL_FP32_GRAD_ACTIVATION_GRAD_H_
|
||||
#endif // MINDSPORE_CCSRC_PLUGIN_DEVICE_CPU_KERNEL_NNACL_FP32_GRAD_ACTIVATION_GRAD_FP32_H_
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include "plugin/device/cpu/kernel/soft_shrink_grad_cpu_kernel.h"
|
||||
#include "mindspore/core/ops/grad/soft_shrink_grad.h"
|
||||
#include "plugin/device/cpu/kernel/nnacl/fp32_grad/activation_grad.h"
|
||||
#include "plugin/device/cpu/kernel/nnacl/fp32_grad/activation_grad_fp32.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace kernel {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
#include "src/common/ops/populate/populate_register.h"
|
||||
#include "nnacl/fp32_grad/activation_grad.h"
|
||||
#include "nnacl/fp32_grad/activation_grad_fp32.h"
|
||||
using mindspore::schema::PrimitiveType_ActivationGrad;
|
||||
|
||||
namespace mindspore {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "src/litert/kernel/cpu/fp16_grad/activation_fp16_grad.h"
|
||||
#include "nnacl/fp16_grad/activation_grad.h"
|
||||
#include "nnacl/fp16_grad/activation_grad_fp16.h"
|
||||
#include "schema/model_generated.h"
|
||||
#include "src/litert/kernel_registry.h"
|
||||
#include "include/errorcode.h"
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
|
||||
#include <vector>
|
||||
#include "src/litert/lite_kernel.h"
|
||||
#include "nnacl/fp16_grad/activation_grad.h"
|
||||
#include "nnacl/fp32_grad/activation_grad.h"
|
||||
#include "nnacl/fp16_grad/activation_grad_fp16.h"
|
||||
#include "nnacl/fp32_grad/activation_grad_fp32.h"
|
||||
|
||||
namespace mindspore::kernel {
|
||||
class ActivationGradCPUKernelFp16 : public LiteKernel {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "src/litert/kernel/cpu/fp32_grad/activation_grad.h"
|
||||
#include "nnacl/fp32_grad/activation_grad.h"
|
||||
#include "nnacl/fp32_grad/activation_grad_fp32.h"
|
||||
#include "schema/model_generated.h"
|
||||
#include "src/litert/kernel_registry.h"
|
||||
#include "include/errorcode.h"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "src/common/log_adapter.h"
|
||||
#include "common/common_test.h"
|
||||
#include "src/common/file_utils.h"
|
||||
#include "nnacl/fp16_grad/activation_grad.h"
|
||||
#include "nnacl/fp16_grad/activation_grad_fp16.h"
|
||||
|
||||
namespace mindspore {
|
||||
class TestActGradFp16 : public mindspore::CommonTest {
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "mindspore/lite/src/tensor.h"
|
||||
#include "mindspore/lite/src/litert/kernel_exec.h"
|
||||
#include "mindspore/lite/src/litert/kernel/cpu/fp32_grad/activation_grad.h"
|
||||
#include "nnacl/fp32_grad/activation_grad.h"
|
||||
#include "nnacl/fp32_grad/activation_grad_fp32.h"
|
||||
|
||||
namespace mindspore {
|
||||
class TestActGradFp32 : public mindspore::CommonTest {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "coder/opcoders/nnacl/fp32_grad/activation_grad_coder.h"
|
||||
#include "nnacl/fp32_grad/activation_grad.h"
|
||||
#include "nnacl/fp32_grad/activation_grad_fp32.h"
|
||||
#include "coder/opcoders/serializers/nnacl_serializer/nnacl_fp32_serializer.h"
|
||||
#include "coder/opcoders/file_collector.h"
|
||||
|
||||
|
@ -31,10 +31,10 @@ int ActivationGradCoder::DoCode(CoderContext *const context) {
|
|||
int count = input_tensor_->ElementsNum();
|
||||
Collect(context,
|
||||
{
|
||||
"nnacl/fp32_grad/activation_grad.h",
|
||||
"nnacl/fp32_grad/activation_grad_fp32.h",
|
||||
},
|
||||
{
|
||||
"activation_grad.c",
|
||||
"activation_grad_fp32.c",
|
||||
});
|
||||
NNaclFp32Serializer code;
|
||||
|
||||
|
|
Loading…
Reference in New Issue