Home
last modified time | relevance | path

Searched refs:act_type (Results 1 – 25 of 49) sorted by relevance

12

/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp16/
Dmatmul_fp16.h31 #define DO_RELU(value, act_type) \ argument
32 if (act_type == ActType_Relu) value = MSMAX(0.0f, value);
34 #define DO_RELU6(value, act_type) \ argument
35 if (act_type == ActType_Relu6) value = MSMIN(6.0f, value); \
36 if (act_type == ActType_Relu6) value = MSMAX(0.0f, value);
41 …16(const float16_t *a, const float16_t *b, float16_t *dst, const float16_t *bias, ActType act_type,
44 …16(const float16_t *a, const float16_t *b, float16_t *dst, const float16_t *bias, ActType act_type,
52 …pt(const float16_t *a, const float16_t *b, float16_t *dst, const float16_t *bias, ActType act_type,
54 …16Neon64(const float16_t *a, const float16_t *b, float16_t *c, const float16_t *bias, int act_type,
57 …eon64Opt(const float16_t *a, const float16_t *b, float16_t *c, const float16_t *bias, int act_type,
[all …]
Dcommon_func_fp16.c21 ActType act_type, int size) { in PostConvFuncCommFp16() argument
34 … value = (act_type == ActType_Relu || act_type == ActType_Relu6) ? (MSMAX(0.f, value)) : (value); in PostConvFuncCommFp16()
35 value = (act_type == ActType_Relu6) ? (MSMIN(6.f, value)) : (value); in PostConvFuncCommFp16()
43 size_t oc_stride, ActType act_type) { in PostConvFuncFp16C8() argument
48 PostFuncBiasReluC8Fp16(nhwc_out, c8_out, bias, oc8div, oc8mod, plane, stride_size, act_type); in PostConvFuncFp16C8()
50 PostConvFuncCommFp16(nhwc_out, c8_out, bias, oc, plane, oc_stride, plane, act_type, C8NUM); in PostConvFuncFp16C8()
55 size_t plane_stride, ActType act_type) { in PostConvFuncFp16C4() argument
60 PostFuncBiasReluC4Fp16(nhwc_out, c4_out, bias, oc4div, oc4mod, plane, stride_size, act_type); in PostConvFuncFp16C4()
62 PostConvFuncCommFp16(nhwc_out, c4_out, bias, oc, plane, oc, plane_stride, act_type, C4NUM); in PostConvFuncFp16C4()
Dmatmul_fp16.c229 …16(const float16_t *a, const float16_t *b, float16_t *dst, const float16_t *bias, ActType act_type, in MatMul16x8Fp16() argument
244 DO_RELU(value, act_type) in MatMul16x8Fp16()
245 DO_RELU6(value, act_type) in MatMul16x8Fp16()
264 DO_RELU(value, act_type) in MatMul16x8Fp16()
265 DO_RELU6(value, act_type) in MatMul16x8Fp16()
283 DO_RELU(value, act_type) in MatMul16x8Fp16()
284 DO_RELU6(value, act_type) in MatMul16x8Fp16()
291 …16(const float16_t *a, const float16_t *b, float16_t *dst, const float16_t *bias, ActType act_type, in MatMul12x8Fp16() argument
306 DO_RELU(value, act_type) in MatMul12x8Fp16()
307 DO_RELU6(value, act_type) in MatMul12x8Fp16()
[all …]
Dcommon_func_fp16.h27 size_t output_channel, size_t plane_size, size_t stride, ActType act_type);
33 size_t plane_size, size_t plane_stride, ActType act_type);
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp32/
Dmatmul_fp32.h29 #define DO_RELU(value, act_type) \ argument
30 if (act_type == ActType_Relu) value = MSMAX(0.0f, value);
32 #define DO_RELU6(value, act_type) \ argument
33 if (act_type == ActType_Relu6) value = MSMIN(6.0f, value); \
34 if (act_type == ActType_Relu6) value = MSMAX(0.0f, value);
39 void MatMulOpt(const float *a, const float *b, float *c, const float *bias, ActType act_type, int d…
41 void MatVecMulFp32(const float *a, const float *b, float *c, const float *bias, int act_type, int d…
58 void MatmulFloatNeon64(const float *a, const float *b, float *c, const float *bias, int act_type, i…
60 void MatmulFloatNeon64Opt(const float *a, const float *b, float *c, const float *bias, int act_type
62 …Neon64OptRow8(const float *a, const float *b, float *c, const float *bias, int act_type, int depth,
[all …]
Dmatmul_fp32.c877 void MatVecMulFp32(const float *a, const float *b, float *c, const float *bias, int act_type, int d… in MatVecMulFp32() argument
884 if (act_type == ActType_Relu6) value = MSMIN(6.0f, value); in MatVecMulFp32()
885 if (act_type == ActType_Relu || act_type == ActType_Relu6) value = MSMAX(0.0f, value); in MatVecMulFp32()
893 void MatVecMulFp32Neon64(const float *a, const float *b, float *c, const float *bias, int act_type,… in MatVecMulFp32Neon64() argument
944 if (act_type == ActType_Relu) { in MatVecMulFp32Neon64()
946 } else if (act_type == ActType_Relu6) { in MatVecMulFp32Neon64()
954 if (act_type == ActType_Relu) { in MatVecMulFp32Neon64()
956 } else if (act_type == ActType_Relu6) { in MatVecMulFp32Neon64()
963 if (act_type == ActType_Relu) { in MatVecMulFp32Neon64()
965 } else if (act_type == ActType_Relu6) { in MatVecMulFp32Neon64()
[all …]
Dadder_fp32.c22 void Adder12x4(const float *a, const float *b, float *dst, const float *bias, ActType act_type, int… in Adder12x4() argument
37 if (act_type == ActType_Relu6) value = MSMIN(6.0f, value); in Adder12x4()
38 if (act_type != ActType_No) value = MSMAX(0.0f, value); in Adder12x4()
44 void AdderOpt(const float *a, const float *b, float *c, const float *bias, ActType act_type, int de… in AdderOpt() argument
47 AdderFloatNeon64(a, b, c, bias, (int)act_type, deep, row, col, stride); in AdderOpt()
49 Adder12x4(a, b, c, bias, act_type, deep, row, col, stride); in AdderOpt()
Dadder_fp32.h33 void AdderFloatNeon64(const float *a, const float *b, float *c, const float *bias, int act_type, in…
37 void AdderOpt(const float *a, const float *b, float *c, const float *bias, ActType act_type, int de…
Dconv_common_fp32.c153 int act_type = 0; in ConvFp32OutNC4HW4() local
155 act_type += 1; in ConvFp32OutNC4HW4()
158 act_type += 2; in ConvFp32OutNC4HW4()
186 deep, out_block_stride, act_type, real_cal_row); in ConvFp32OutNC4HW4()
308 int act_type, int ow_bock, int oc_block, size_t write_mode) { in SWBorder() argument
323 …t_kernel, src_kernel, weight_kernel, bias, end_kh - start_kh, end_kw - start_kw, act_type, ow_bock, in SWBorder()
344 int act_type = 0; in ConvSWFp32() local
346 act_type += 1; in ConvSWFp32()
349 act_type += 2; in ConvSWFp32()
404 act_type, 1, oc_block, write_mode); in ConvSWFp32()
[all …]
/third_party/mindspore/mindspore/lite/test/ut/src/runtime/kernel/opencl/
Ddepthwise_conv2d_tests.cc27 … int pad_r, int dilation_h, int dilation_w, ActType act_type, int input_channel) { in CreateParameter() argument
42 param->act_type_ = act_type; in CreateParameter()
58 ActType act_type = ActType_No; in TEST_F() local
85 dilation_w, act_type, input_shape.back()); in TEST_F()
104 ActType act_type = ActType_No; in TEST_F() local
132 dilation_w, act_type, input_shape.back()); in TEST_F()
151 ActType act_type = ActType_No; in TEST_F() local
177 dilation_w, act_type, input_shape.back()); in TEST_F()
195 ActType act_type = ActType_No; in TEST_F() local
246 dilation_w, act_type, input_shape.back()); in TEST_F()
Dconv2d_tests.cc25 ConvParameter *CreateParameter(const std::string &attr, ActType act_type) { in CreateParameter() argument
27 param->act_type_ = act_type; in CreateParameter()
40 float *output_data, ActType act_type, bool fp16_enable, float atol = 1e-9) { in TestMain_Conv2D() argument
41 auto *param = CreateParameter(attr, act_type); in TestMain_Conv2D()
267 auto act_type = std::get<6>(case_); in TEST_F() local
269 TestMain_Conv2D(attr, input_data, weight_data, bias_data, expect_data, act_type, false); in TEST_F()
270 TestMain_Conv2D(attr, input_data, weight_data, bias_data, expect_data, act_type, true); in TEST_F()
Dactivation_tests.cc25 OpParameter *CreateParameter(schema::ActivationType act_type) { in CreateParameter() argument
27 param->type_ = act_type; in CreateParameter()
Dpooling_tests.cc27 ActType act_type = ActType_No) { in CreateParameter() argument
41 param->act_type_ = act_type; in CreateParameter()
/third_party/mindspore/mindspore/lite/src/runtime/kernel/opencl/cl/
Dscale.cl22 … __write_only image2d_t output, const int2 output_shape, const int act_type) {
33 if (act_type == ActivationType_RELU) {
35 } else if (act_type == ActivationType_RELU6) {
42 const int2 output_shape, const int act_type) {
51 if (act_type == ActivationType_RELU) {
53 } else if (act_type == ActivationType_RELU6) {
60 … __write_only image2d_t output, const int2 output_shape, const int C, const int act_type) {
71 if (act_type == ActivationType_RELU) {
73 } else if (act_type == ActivationType_RELU6) {
80 … __write_only image2d_t output, const int2 output_shape, const int H, const int act_type) {
[all …]
Dfullconnection.cl22 … __read_only image2d_t bias, int N, int CI4, int CO4, int2 in_img_shape, int act_type) {
46 if (act_type == ActivationType_RELU) {
48 } else if (act_type == ActivationType_RELU6) {
50 } else if (act_type == ActivationType_TANH) {
59 int2 in_img_shape, int act_type) {
86 if (act_type == ActivationType_RELU) {
88 } else if (act_type == ActivationType_RELU6) {
90 } else if (act_type == ActivationType_TANH) {
Dconv2d.cl54 int2 dilation, int act_type, float alpha) {
93 if (act_type == ActivationType_RELU) {
95 } else if (act_type == ActivationType_RELU6) {
97 } else if (act_type == ActivationType_TANH) {
100 } else if (act_type == ActivationType_LEAKY_RELU) {
102 } else if (act_type == ActivationType_SIGMOID) {
115 int2 dilation, int act_type, float alpha) {
167 if (act_type == ActivationType_RELU) {
170 } else if (act_type == ActivationType_RELU6) {
173 } else if (act_type == ActivationType_TANH) {
[all …]
/third_party/mindspore/mindspore/lite/test/ut/src/runtime/kernel/arm/fp32/
Dl2norm_fp32_test.cc90 ActType act_type = ActType_No; in TEST_F() local
92 Init(input_shape, output_shape, input_data, output_data, axis_num, act_type, thread_num); in TEST_F()
111 ActType act_type = ActType_Relu; in TEST_F() local
113 Init(input_shape, output_shape, input_data, output_data, axis_num, act_type, thread_num); in TEST_F()
132 ActType act_type = ActType_No; in TEST_F() local
134 Init(input_shape, output_shape, input_data, output_data, axis_num, act_type, thread_num); in TEST_F()
153 ActType act_type = ActType_Relu6; in TEST_F() local
155 Init(input_shape, output_shape, input_data, output_data, axis_num, act_type, thread_num); in TEST_F()
Dscale_fp32_tests.cc36 … float *scale_data, float *offset_data, float *output_data, int axis, ActivationType act_type,
67 ActivationType act_type, const int thread_num) { in Prepare() argument
85 param_.activation_type_ = act_type; in Prepare()
/third_party/mindspore/mindspore/lite/micro/coder/opcoders/nnacl/fp32/
Dconvolution_winograd_fp32_coder.cc187 …nvolutionWinogradFP32Coder::GetOutputTransFunc(int input_unit, int output_unit, ActType act_type) { in GetOutputTransFunc() argument
190 if (act_type == ActType_Relu) { in GetOutputTransFunc()
192 } else if (act_type == ActType_Relu6) { in GetOutputTransFunc()
198 if (act_type == ActType_Relu) { in GetOutputTransFunc()
200 } else if (act_type == ActType_Relu6) { in GetOutputTransFunc()
206 if (act_type == ActType_Relu) { in GetOutputTransFunc()
208 } else if (act_type == ActType_Relu6) { in GetOutputTransFunc()
/third_party/mindspore/mindspore/lite/src/runtime/kernel/opencl/kernel/
Dfusion_eltwise.cc59 auto act_type = static_cast<ActivationType>( in CheckSupport() local
61 EltwiseOperator act_operator = Activation2Operator(act_type); in CheckSupport()
73 …auto act_type = static_cast<ActivationType>(reinterpret_cast<ActivationParameter *>(op_parameter)-… in CheckSupport() local
74 EltwiseOperator act_operator = Activation2Operator(act_type); in CheckSupport()
96 auto act_type = static_cast<ActivationType>( local
98 EltwiseOperator act_operator = Activation2Operator(act_type);
105 std::string act_name = schema::EnumNameActivationType(act_type);
114 …auto act_type = static_cast<ActivationType>(reinterpret_cast<ActivationParameter *>(op_parameter)-… local
115 EltwiseOperator act_operator = Activation2Operator(act_type);
/third_party/mindspore/mindspore/lite/micro/coder/opcoders/serializers/nnacl_serializer/
Dnnacl_stream_utils.cc74 std::ostream &operator<<(std::ostream &code, ActType act_type) { in operator <<() argument
76 << "(" << static_cast<int>(act_type) << ")"; in operator <<()
/third_party/mindspore/mindspore/lite/src/ops/populate/v0/
Ddeconv2d_populate_v0.cc52 auto act_type = deconv2d_prim->activationType(); in PopulateDeconvParameter() local
53 switch (act_type) { in PopulateDeconvParameter()
Ddedepthwise_conv2d_populate_v0.cc51 auto act_type = dedepthwise_conv2d_prim->activationType(); in PopulateDeconvDwParameter() local
52 switch (act_type) { in PopulateDeconvDwParameter()
Ddepthwise_conv2d_populate_v0.cc66 auto act_type = depthwise_conv2d_prim->activationType(); in PopulateConvDwParameter() local
67 switch (act_type) { in PopulateConvDwParameter()
Dconv2d_populate_v0.cc68 auto act_type = conv2d_prim->activationType(); in PopulateConvParameter() local
69 switch (act_type) { in PopulateConvParameter()

12