diff options
Diffstat (limited to 'src/gpu/cl/ClKernelLibrary.cpp')
-rw-r--r-- | src/gpu/cl/ClKernelLibrary.cpp | 679 |
1 files changed, 334 insertions, 345 deletions
diff --git a/src/gpu/cl/ClKernelLibrary.cpp b/src/gpu/cl/ClKernelLibrary.cpp index 73bb96298e..bcade94522 100644 --- a/src/gpu/cl/ClKernelLibrary.cpp +++ b/src/gpu/cl/ClKernelLibrary.cpp @@ -37,24 +37,16 @@ namespace { /* Decoding table */ -constexpr std::array<uint8_t, 256> b64_invtab = -{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, 63, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 0, 0, 0, 0, - 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +constexpr std::array<uint8_t, 256> b64_invtab = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 0, 0, 0, 0, 0, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; /** Decode a base64 encoded string @@ -68,13 +60,13 @@ std::string decode_base64(const std::string &str) constexpr const char pad_char = '='; // Handle empty string - if(str.empty()) + if (str.empty()) { return {}; } // Base64 encoded string has size multiple of 4 - if(str.length() % 4) + if (str.length() % 4) { return {}; } @@ -92,7 +84,7 @@ std::string decode_base64(const std::string &str) // Block decoding function (exclude padding) int c = 0; const int end = str_len - 4 - padding; - for(; c <= end; c += 4) + for (; c <= end; c += 4) { const int byte0 = b64_invtab[str[c]]; const int byte1 = b64_invtab[str[c + 1]]; @@ -105,7 +97,7 @@ std::string decode_base64(const std::string &str) } // Last step that might contain padding symbols - if(padding == 1) + if (padding == 1) { const int byte0 = b64_invtab[str[c]]; const int byte1 = b64_invtab[str[c + 1]]; @@ -114,7 +106,7 @@ std::string decode_base64(const std::string &str) dec_b64.push_back((byte0 << 2) | (byte1 >> 4)); dec_b64.push_back((byte1 << 4) | (byte2 >> 2)); } - else if(padding == 2) + else if (padding == 2) { const int byte0 = b64_invtab[str[c]]; const int byte1 = b64_invtab[str[c + 1]]; @@ -135,7 +127,7 @@ std::string decompress_zlib(const std::string &str) { // Create and initialize decompression stream z_stream ds{}; - if(inflateInit(&ds) != Z_OK) + if (inflateInit(&ds) != Z_OK) { return std::string(); } @@ -152,16 +144,15 @@ std::string decompress_zlib(const std::string &str) ds.next_out = reinterpret_cast<Bytef *>(roll_buff); status = inflate(&ds, 0); - if(inflated_str.size() < ds.total_out) + if (inflated_str.size() < ds.total_out) { inflated_str.append(roll_buff, ds.total_out - inflated_str.size()); } - } - while(status == Z_OK); + } while (status == Z_OK); // Finalize decompression stream inflateEnd(&ds); - if(status != Z_STREAM_END) + if (status != Z_STREAM_END) { return std::string(); } @@ -175,323 +166,321 @@ namespace arm_compute { namespace opencl { -const std::map<std::string, std::string> ClKernelLibrary::_kernel_program_map = -{ +const std::map<std::string, std::string> ClKernelLibrary::_kernel_program_map = { // Common Kernels - { "activation_layer", "common/activation_layer.cl" }, - { "activation_layer_quant", "common/activation_layer_quant.cl" }, - { "activation_layer_quant_f32", "common/activation_layer_quant.cl" }, - { "arg_min_max_x", "common/arg_min_max.cl" }, - { "arg_min_max_y", "common/arg_min_max.cl" }, - { "arg_min_max_z", "common/arg_min_max.cl" }, - { "arg_min_max_w", "common/arg_min_max.cl" }, - { "bitwise_or", "common/bitwise_op.cl" }, - { "bitwise_and", "common/bitwise_op.cl" }, - { "bitwise_xor", "common/bitwise_op.cl" }, - { "bitwise_not", "common/bitwise_op.cl" }, - { "bounding_box_transform", "common/bounding_box_transform.cl" }, - { "bounding_box_transform_quantized", "common/bounding_box_transform_quantized.cl" }, - { "compare_equal", "common/comparisons.cl" }, - { "compare_equal_quantized", "common/comparisons.cl" }, - { "compare_notequal", "common/comparisons.cl" }, - { "compare_notequal_quantized", "common/comparisons.cl" }, - { "compare_greater", "common/comparisons.cl" }, - { "compare_greater_quantized", "common/comparisons.cl" }, - { "compare_greaterequal", "common/comparisons.cl" }, - { "compare_greaterequal_quantized", "common/comparisons.cl" }, - { "compare_less", "common/comparisons.cl" }, - { "compare_less_quantized", "common/comparisons.cl" }, - { "compare_lessequal", "common/comparisons.cl" }, - { "compare_lessequal_quantized", "common/comparisons.cl" }, - { "concatenate", "common/concatenate.cl" }, - { "concatenate_width", "common/concatenate.cl" }, - { "concatenate_height", "common/concatenate.cl" }, - { "concatenate_width_x2", "common/concatenate.cl" }, - { "concatenate_width_x4", "common/concatenate.cl" }, - { "col2im", "common/col2im.cl" }, - { "cast_down", "common/cast.cl" }, - { "cast_up", "common/cast.cl" }, - { "convert_fc_weights", "common/convert_fc_weights.cl" }, - { "copy_tensor", "common/copy_tensor.cl" }, - { "crop_tensor", "common/crop_tensor.cl" }, - { "deconvolution_reshape", "common/deconvolution_layer.cl" }, - { "deconvolution_upsample", "common/deconvolution_layer.cl" }, - { "dequantization_layer", "common/dequantization_layer.cl" }, - { "elementwise_operation_ADD", "common/elementwise_operation.cl" }, - { "elementwise_operation_SUB", "common/elementwise_operation.cl" }, - { "elementwise_operation_MAX", "common/elementwise_operation.cl" }, - { "elementwise_operation_MIN", "common/elementwise_operation.cl" }, - { "elementwise_operation_DIV", "common/elementwise_operation.cl" }, - { "elementwise_operation_SQUARED_DIFF", "common/elementwise_operation.cl" }, - { "elementwise_operation_POWER", "common/elementwise_operation.cl" }, - { "elementwise_operation_PRELU", "common/elementwise_operation.cl" }, - { "elementwise_operation_AND", "common/elementwise_operation.cl" }, - { "elementwise_operation_OR", "common/elementwise_operation.cl" }, - { "elementwise_operation_ADD_quantized", "common/elementwise_operation_quantized.cl" }, - { "elementwise_operation_SUB_quantized", "common/elementwise_operation_quantized.cl" }, - { "elementwise_operation_MAX_quantized", "common/elementwise_operation_quantized.cl" }, - { "elementwise_operation_MIN_quantized", "common/elementwise_operation_quantized.cl" }, - { "elementwise_operation_DIV_quantized", "common/elementwise_operation_quantized.cl" }, - { "elementwise_operation_SQUARED_DIFF_quantized", "common/elementwise_operation_quantized.cl" }, - { "elementwise_operation_PRELU_quantized", "common/elementwise_operation_quantized.cl" }, - { "elementwise_unary", "common/elementwise_unary.cl" }, - { "elementwise_unary_quantized", "common/elementwise_unary_quantized.cl" }, - { "fft_digit_reverse_axis_0", "common/fft_digit_reverse.cl" }, - { "fft_digit_reverse_axis_1", "common/fft_digit_reverse.cl" }, - { "fft_radix_2_first_stage_axis_0", "common/fft.cl" }, - { "fft_radix_2_first_stage_axis_1", "common/fft.cl" }, - { "fft_radix_2_axis_0", "common/fft.cl" }, - { "fft_radix_2_axis_1", "common/fft.cl" }, - { "fft_radix_3_first_stage_axis_0", "common/fft.cl" }, - { "fft_radix_3_first_stage_axis_1", "common/fft.cl" }, - { "fft_radix_3_axis_0", "common/fft.cl" }, - { "fft_radix_3_axis_1", "common/fft.cl" }, - { "fft_radix_4_first_stage_axis_0", "common/fft.cl" }, - { "fft_radix_4_first_stage_axis_1", "common/fft.cl" }, - { "fft_radix_4_axis_0", "common/fft.cl" }, - { "fft_radix_4_axis_1", "common/fft.cl" }, - { "fft_radix_5_first_stage_axis_0", "common/fft.cl" }, - { "fft_radix_5_first_stage_axis_1", "common/fft.cl" }, - { "fft_radix_5_axis_0", "common/fft.cl" }, - { "fft_radix_5_axis_1", "common/fft.cl" }, - { "fft_radix_7_first_stage_axis_0", "common/fft.cl" }, - { "fft_radix_7_first_stage_axis_1", "common/fft.cl" }, - { "fft_radix_7_axis_0", "common/fft.cl" }, - { "fft_radix_7_axis_1", "common/fft.cl" }, - { "fft_radix_8_first_stage_axis_0", "common/fft.cl" }, - { "fft_radix_8_first_stage_axis_1", "common/fft.cl" }, - { "fft_radix_8_axis_0", "common/fft.cl" }, - { "fft_radix_8_axis_1", "common/fft.cl" }, - { "fft_scale_conj", "common/fft_scale.cl" }, - { "fill_image_borders_constant", "common/fill_border.cl" }, - { "fill_image_borders_replicate", "common/fill_border.cl" }, - { "floor_layer", "common/floor.cl" }, - { "fuse_batchnormalization_layer", "common/batchnormalization_layer.cl" }, - { "gather", "common/gather.cl" }, - { "gemm_ma_f16", "common/gemm.cl" }, - { "gemm_ma_f32", "common/gemm.cl" }, - { "gemm_mv", "common/gemv.cl" }, - { "gemm_mv_quantized", "common/gemv.cl" }, - { "gemm_mm_native", "common/gemm.cl" }, - { "gemm_mm_reshaped_only_rhs_nt_mmul", "common/gemm_reshaped_only_rhs_mmul.cl" }, - { "gemm_mm_reshaped_only_rhs_nt_mmul_texture", "common/gemm_reshaped_only_rhs_mmul.cl" }, - { "gemm_mm_reshaped_lhs_nt_rhs_t", "common/gemm.cl" }, - { "gemm_mm_reshaped_lhs_nt_rhs_t_texture", "common/gemm.cl" }, - { "gemm_mm_reshaped_lhs_t_rhs_nt", "common/gemm.cl" }, - { "gemm_mm_reshaped_lhs_t_rhs_nt_texture", "common/gemm.cl" }, - { "gemm_mm_reshaped_only_rhs_nt", "common/gemm.cl" }, - { "gemm_mm_reshaped_only_rhs_nt_texture", "common/gemm.cl" }, - { "gemm_mm_reshaped_only_rhs_t", "common/gemm.cl" }, - { "gemm_mm_reshaped_only_rhs_t_texture", "common/gemm.cl" }, - { "gemm_lc_vm_f32", "common/gemm.cl" }, - { "gemm_reshape_lhs_matrix_nt", "common/gemm_utils.cl" }, - { "gemm_reshape_lhs_matrix_t", "common/gemm_utils.cl" }, - { "gemm_reshape_rhs_matrix_nt", "common/gemm_utils.cl" }, - { "gemm_reshape_rhs_matrix_t", "common/gemm_utils.cl" }, - { "gemmlowp_matrix_a_reduction", "common/gemmlowp.cl" }, - { "gemmlowp_matrix_a_reduction_dot8", "common/gemmlowp.cl" }, - { "gemmlowp_matrix_b_reduction", "common/gemmlowp.cl" }, - { "gemmlowp_mm_native", "common/gemmlowp.cl" }, - { "gemmlowp_mm_reshaped_lhs_nt_rhs_t", "common/gemmlowp.cl" }, - { "gemmlowp_mm_reshaped_only_rhs_t", "common/gemmlowp.cl" }, - { "gemmlowp_mm_reshaped_only_rhs_t_fused_output_stage_fixedpoint", "common/gemmlowp.cl" }, - { "gemmlowp_mm_reshaped_only_rhs_mmul", "common/gemmlowp_reshaped_only_rhs_mmul.cl" }, - { "gemmlowp_offset_contribution", "common/gemmlowp.cl" }, - { "gemmlowp_offset_contribution_quantize_down", "common/gemmlowp.cl" }, - { "gemmlowp_offset_contribution_quantize_down_fixedpoint", "common/gemmlowp.cl" }, - { "gemmlowp_output_stage_quantize_down", "common/gemmlowp.cl" }, - { "gemmlowp_output_stage_quantize_down_fixedpoint", "common/gemmlowp.cl" }, - { "gemmlowp_output_stage_quantize_down_fixedpoint_qsymm16", "common/gemmlowp.cl" }, - { "gemmlowp_output_stage_quantize_down_float", "common/gemmlowp.cl" }, - { "generate_proposals_compute_all_anchors", "common/generate_proposals.cl" }, - { "generate_proposals_compute_all_anchors_quantized", "common/generate_proposals_quantized.cl" }, - { "instance_normalization", "common/instance_normalization.cl" }, - { "compute_mean_var", "common/instance_normalization.cl" }, - { "l2_normalize_x", "common/l2_normalize.cl" }, - { "l2_normalize_y", "common/l2_normalize.cl" }, - { "l2_normalize_z", "common/l2_normalize.cl" }, - { "mat_mul_native_mmul_nt_nt", "common/mat_mul_mmul.cl" }, - { "mat_mul_native_mmul_t_nt", "common/mat_mul_mmul.cl" }, - { "mat_mul_native_mmul_nt_t", "common/mat_mul_mmul.cl" }, - { "mat_mul_native_mmul_t_t", "common/mat_mul_mmul.cl" }, - { "mat_mul_native_nt_nt", "common/mat_mul.cl" }, - { "mat_mul_native_nt_t", "common/mat_mul.cl" }, - { "mat_mul_native_t_nt", "common/mat_mul.cl" }, - { "mat_mul_native_t_t", "common/mat_mul.cl" }, - { "mat_mul_native_quantized_nt_nt", "common/mat_mul_quantized.cl" }, - { "mat_mul_native_quantized_nt_t", "common/mat_mul_quantized.cl" }, - { "mat_mul_native_quantized_t_nt", "common/mat_mul_quantized.cl" }, - { "mat_mul_native_quantized_t_t", "common/mat_mul_quantized.cl" }, - { "mat_mul_native_quantized_mmul_nt_nt", "common/mat_mul_quantized_mmul.cl" }, - { "mat_mul_native_quantized_mmul_nt_t", "common/mat_mul_quantized_mmul.cl" }, - { "mat_mul_native_quantized_mmul_t_nt", "common/mat_mul_quantized_mmul.cl" }, - { "mat_mul_native_quantized_mmul_t_t", "common/mat_mul_quantized_mmul.cl" }, - { "max_unpooling_layer_2", "common/unpooling_layer.cl" }, - { "mean_stddev_normalization", "common/mean_stddev_normalization.cl" }, - { "memset", "common/memset.cl" }, - { "minmax_layer", "common/minmax_layer.cl" }, - { "non_max_suppression", "common/nonmax.cl" }, - { "pad_layer_constant", "common/pad_layer.cl" }, - { "pad_layer_symmetric_reflect", "common/pad_layer.cl" }, - { "permute", "common/permute.cl" }, - { "pixelwise_mul_complex", "common/pixelwise_mul_float.cl" }, - { "pixelwise_mul_float", "common/pixelwise_mul_float.cl" }, - { "pixelwise_mul_int", "common/pixelwise_mul_int.cl" }, - { "pixelwise_mul_quantized", "common/pixelwise_mul_int.cl" }, - { "qlstm_layer_normalization", "common/qlstm_layer_normalization.cl" }, - { "quantization_layer", "common/quantization_layer.cl" }, - { "range", "common/range.cl" }, - { "range_quantized", "common/range.cl" }, - { "reduction_operation_x", "common/reduction_operation.cl" }, - { "reduction_operation_non_parallel_x", "common/reduction_operation.cl" }, - { "reduction_operation_y", "common/reduction_operation.cl" }, - { "reduction_operation_z", "common/reduction_operation.cl" }, - { "reduction_operation_w", "common/reduction_operation.cl" }, - { "reshape_layer", "common/reshape_layer.cl" }, - { "reshape_to_columns", "common/convolution_layer.cl" }, - { "reverse", "common/reverse.cl" }, - { "roi_align_layer", "common/roi_align_layer.cl" }, - { "roi_align_layer_quantized", "common/roi_align_layer_quantized.cl" }, - { "roi_pooling_layer", "common/roi_pooling_layer.cl" }, - { "select_same_rank", "common/select.cl" }, - { "select_different_rank_2", "common/select.cl" }, - { "select_different_rank_n", "common/select.cl" }, - { "softmax_layer_norm", "common/softmax_layer.cl" }, - { "softmax_layer_norm_quantized", "common/softmax_layer_quantized.cl" }, - { "softmax_layer_max_shift_exp_sum_quantized_serial", "common/softmax_layer_quantized.cl" }, - { "softmax_layer_max_shift_exp_sum_quantized_parallel", "common/softmax_layer_quantized.cl" }, - { "softmax_layer_max_shift_exp_sum_serial", "common/softmax_layer.cl" }, - { "softmax_layer_max_shift_exp_sum_parallel", "common/softmax_layer.cl" }, - { "stack_layer", "common/stack_layer.cl" }, - { "strided_slice", "common/slice_ops.cl" }, - { "tile", "common/tile.cl" }, - { "transpose", "common/transpose.cl" }, + {"activation_layer", "common/activation_layer.cl"}, + {"activation_layer_quant", "common/activation_layer_quant.cl"}, + {"activation_layer_quant_f32", "common/activation_layer_quant.cl"}, + {"arg_min_max_x", "common/arg_min_max.cl"}, + {"arg_min_max_y", "common/arg_min_max.cl"}, + {"arg_min_max_z", "common/arg_min_max.cl"}, + {"arg_min_max_w", "common/arg_min_max.cl"}, + {"bitwise_or", "common/bitwise_op.cl"}, + {"bitwise_and", "common/bitwise_op.cl"}, + {"bitwise_xor", "common/bitwise_op.cl"}, + {"bitwise_not", "common/bitwise_op.cl"}, + {"bounding_box_transform", "common/bounding_box_transform.cl"}, + {"bounding_box_transform_quantized", "common/bounding_box_transform_quantized.cl"}, + {"compare_equal", "common/comparisons.cl"}, + {"compare_equal_quantized", "common/comparisons.cl"}, + {"compare_notequal", "common/comparisons.cl"}, + {"compare_notequal_quantized", "common/comparisons.cl"}, + {"compare_greater", "common/comparisons.cl"}, + {"compare_greater_quantized", "common/comparisons.cl"}, + {"compare_greaterequal", "common/comparisons.cl"}, + {"compare_greaterequal_quantized", "common/comparisons.cl"}, + {"compare_less", "common/comparisons.cl"}, + {"compare_less_quantized", "common/comparisons.cl"}, + {"compare_lessequal", "common/comparisons.cl"}, + {"compare_lessequal_quantized", "common/comparisons.cl"}, + {"concatenate", "common/concatenate.cl"}, + {"concatenate_width", "common/concatenate.cl"}, + {"concatenate_height", "common/concatenate.cl"}, + {"concatenate_width_x2", "common/concatenate.cl"}, + {"concatenate_width_x4", "common/concatenate.cl"}, + {"col2im", "common/col2im.cl"}, + {"cast_down", "common/cast.cl"}, + {"cast_up", "common/cast.cl"}, + {"convert_fc_weights", "common/convert_fc_weights.cl"}, + {"copy_tensor", "common/copy_tensor.cl"}, + {"crop_tensor", "common/crop_tensor.cl"}, + {"deconvolution_reshape", "common/deconvolution_layer.cl"}, + {"deconvolution_upsample", "common/deconvolution_layer.cl"}, + {"dequantization_layer", "common/dequantization_layer.cl"}, + {"elementwise_operation_ADD", "common/elementwise_operation.cl"}, + {"elementwise_operation_SUB", "common/elementwise_operation.cl"}, + {"elementwise_operation_MAX", "common/elementwise_operation.cl"}, + {"elementwise_operation_MIN", "common/elementwise_operation.cl"}, + {"elementwise_operation_DIV", "common/elementwise_operation.cl"}, + {"elementwise_operation_SQUARED_DIFF", "common/elementwise_operation.cl"}, + {"elementwise_operation_POWER", "common/elementwise_operation.cl"}, + {"elementwise_operation_PRELU", "common/elementwise_operation.cl"}, + {"elementwise_operation_AND", "common/elementwise_operation.cl"}, + {"elementwise_operation_OR", "common/elementwise_operation.cl"}, + {"elementwise_operation_ADD_quantized", "common/elementwise_operation_quantized.cl"}, + {"elementwise_operation_SUB_quantized", "common/elementwise_operation_quantized.cl"}, + {"elementwise_operation_MAX_quantized", "common/elementwise_operation_quantized.cl"}, + {"elementwise_operation_MIN_quantized", "common/elementwise_operation_quantized.cl"}, + {"elementwise_operation_DIV_quantized", "common/elementwise_operation_quantized.cl"}, + {"elementwise_operation_SQUARED_DIFF_quantized", "common/elementwise_operation_quantized.cl"}, + {"elementwise_operation_PRELU_quantized", "common/elementwise_operation_quantized.cl"}, + {"elementwise_unary", "common/elementwise_unary.cl"}, + {"elementwise_unary_quantized", "common/elementwise_unary_quantized.cl"}, + {"fft_digit_reverse_axis_0", "common/fft_digit_reverse.cl"}, + {"fft_digit_reverse_axis_1", "common/fft_digit_reverse.cl"}, + {"fft_radix_2_first_stage_axis_0", "common/fft.cl"}, + {"fft_radix_2_first_stage_axis_1", "common/fft.cl"}, + {"fft_radix_2_axis_0", "common/fft.cl"}, + {"fft_radix_2_axis_1", "common/fft.cl"}, + {"fft_radix_3_first_stage_axis_0", "common/fft.cl"}, + {"fft_radix_3_first_stage_axis_1", "common/fft.cl"}, + {"fft_radix_3_axis_0", "common/fft.cl"}, + {"fft_radix_3_axis_1", "common/fft.cl"}, + {"fft_radix_4_first_stage_axis_0", "common/fft.cl"}, + {"fft_radix_4_first_stage_axis_1", "common/fft.cl"}, + {"fft_radix_4_axis_0", "common/fft.cl"}, + {"fft_radix_4_axis_1", "common/fft.cl"}, + {"fft_radix_5_first_stage_axis_0", "common/fft.cl"}, + {"fft_radix_5_first_stage_axis_1", "common/fft.cl"}, + {"fft_radix_5_axis_0", "common/fft.cl"}, + {"fft_radix_5_axis_1", "common/fft.cl"}, + {"fft_radix_7_first_stage_axis_0", "common/fft.cl"}, + {"fft_radix_7_first_stage_axis_1", "common/fft.cl"}, + {"fft_radix_7_axis_0", "common/fft.cl"}, + {"fft_radix_7_axis_1", "common/fft.cl"}, + {"fft_radix_8_first_stage_axis_0", "common/fft.cl"}, + {"fft_radix_8_first_stage_axis_1", "common/fft.cl"}, + {"fft_radix_8_axis_0", "common/fft.cl"}, + {"fft_radix_8_axis_1", "common/fft.cl"}, + {"fft_scale_conj", "common/fft_scale.cl"}, + {"fill_image_borders_constant", "common/fill_border.cl"}, + {"fill_image_borders_replicate", "common/fill_border.cl"}, + {"floor_layer", "common/floor.cl"}, + {"fuse_batchnormalization_layer", "common/batchnormalization_layer.cl"}, + {"gather", "common/gather.cl"}, + {"gemm_ma_f16", "common/gemm.cl"}, + {"gemm_ma_f32", "common/gemm.cl"}, + {"gemm_mv", "common/gemv.cl"}, + {"gemm_mv_quantized", "common/gemv.cl"}, + {"gemm_mm_native", "common/gemm.cl"}, + {"gemm_mm_reshaped_only_rhs_nt_mmul", "common/gemm_reshaped_only_rhs_mmul.cl"}, + {"gemm_mm_reshaped_only_rhs_nt_mmul_texture", "common/gemm_reshaped_only_rhs_mmul.cl"}, + {"gemm_mm_reshaped_lhs_nt_rhs_t", "common/gemm.cl"}, + {"gemm_mm_reshaped_lhs_nt_rhs_t_texture", "common/gemm.cl"}, + {"gemm_mm_reshaped_lhs_t_rhs_nt", "common/gemm.cl"}, + {"gemm_mm_reshaped_lhs_t_rhs_nt_texture", "common/gemm.cl"}, + {"gemm_mm_reshaped_only_rhs_nt", "common/gemm.cl"}, + {"gemm_mm_reshaped_only_rhs_nt_texture", "common/gemm.cl"}, + {"gemm_mm_reshaped_only_rhs_t", "common/gemm.cl"}, + {"gemm_mm_reshaped_only_rhs_t_texture", "common/gemm.cl"}, + {"gemm_lc_vm_f32", "common/gemm.cl"}, + {"gemm_reshape_lhs_matrix_nt", "common/gemm_utils.cl"}, + {"gemm_reshape_lhs_matrix_t", "common/gemm_utils.cl"}, + {"gemm_reshape_rhs_matrix_nt", "common/gemm_utils.cl"}, + {"gemm_reshape_rhs_matrix_t", "common/gemm_utils.cl"}, + {"gemmlowp_matrix_a_reduction", "common/gemmlowp.cl"}, + {"gemmlowp_matrix_a_reduction_dot8", "common/gemmlowp.cl"}, + {"gemmlowp_matrix_b_reduction", "common/gemmlowp.cl"}, + {"gemmlowp_mm_native", "common/gemmlowp.cl"}, + {"gemmlowp_mm_reshaped_lhs_nt_rhs_t", "common/gemmlowp.cl"}, + {"gemmlowp_mm_reshaped_only_rhs_t", "common/gemmlowp.cl"}, + {"gemmlowp_mm_reshaped_only_rhs_t_fused_output_stage_fixedpoint", "common/gemmlowp.cl"}, + {"gemmlowp_mm_reshaped_only_rhs_mmul", "common/gemmlowp_reshaped_only_rhs_mmul.cl"}, + {"gemmlowp_offset_contribution", "common/gemmlowp.cl"}, + {"gemmlowp_offset_contribution_quantize_down", "common/gemmlowp.cl"}, + {"gemmlowp_offset_contribution_quantize_down_fixedpoint", "common/gemmlowp.cl"}, + {"gemmlowp_output_stage_quantize_down", "common/gemmlowp.cl"}, + {"gemmlowp_output_stage_quantize_down_fixedpoint", "common/gemmlowp.cl"}, + {"gemmlowp_output_stage_quantize_down_fixedpoint_qsymm16", "common/gemmlowp.cl"}, + {"gemmlowp_output_stage_quantize_down_float", "common/gemmlowp.cl"}, + {"generate_proposals_compute_all_anchors", "common/generate_proposals.cl"}, + {"generate_proposals_compute_all_anchors_quantized", "common/generate_proposals_quantized.cl"}, + {"instance_normalization", "common/instance_normalization.cl"}, + {"compute_mean_var", "common/instance_normalization.cl"}, + {"l2_normalize_x", "common/l2_normalize.cl"}, + {"l2_normalize_y", "common/l2_normalize.cl"}, + {"l2_normalize_z", "common/l2_normalize.cl"}, + {"mat_mul_native_mmul_nt_nt", "common/mat_mul_mmul.cl"}, + {"mat_mul_native_mmul_t_nt", "common/mat_mul_mmul.cl"}, + {"mat_mul_native_mmul_nt_t", "common/mat_mul_mmul.cl"}, + {"mat_mul_native_mmul_t_t", "common/mat_mul_mmul.cl"}, + {"mat_mul_native_nt_nt", "common/mat_mul.cl"}, + {"mat_mul_native_nt_t", "common/mat_mul.cl"}, + {"mat_mul_native_t_nt", "common/mat_mul.cl"}, + {"mat_mul_native_t_t", "common/mat_mul.cl"}, + {"mat_mul_native_quantized_nt_nt", "common/mat_mul_quantized.cl"}, + {"mat_mul_native_quantized_nt_t", "common/mat_mul_quantized.cl"}, + {"mat_mul_native_quantized_t_nt", "common/mat_mul_quantized.cl"}, + {"mat_mul_native_quantized_t_t", "common/mat_mul_quantized.cl"}, + {"mat_mul_native_quantized_mmul_nt_nt", "common/mat_mul_quantized_mmul.cl"}, + {"mat_mul_native_quantized_mmul_nt_t", "common/mat_mul_quantized_mmul.cl"}, + {"mat_mul_native_quantized_mmul_t_nt", "common/mat_mul_quantized_mmul.cl"}, + {"mat_mul_native_quantized_mmul_t_t", "common/mat_mul_quantized_mmul.cl"}, + {"max_unpooling_layer_2", "common/unpooling_layer.cl"}, + {"mean_stddev_normalization", "common/mean_stddev_normalization.cl"}, + {"memset", "common/memset.cl"}, + {"minmax_layer", "common/minmax_layer.cl"}, + {"non_max_suppression", "common/nonmax.cl"}, + {"pad_layer_constant", "common/pad_layer.cl"}, + {"pad_layer_symmetric_reflect", "common/pad_layer.cl"}, + {"permute", "common/permute.cl"}, + {"pixelwise_mul_complex", "common/pixelwise_mul_float.cl"}, + {"pixelwise_mul_float", "common/pixelwise_mul_float.cl"}, + {"pixelwise_mul_int", "common/pixelwise_mul_int.cl"}, + {"pixelwise_mul_quantized", "common/pixelwise_mul_int.cl"}, + {"qlstm_layer_normalization", "common/qlstm_layer_normalization.cl"}, + {"quantization_layer", "common/quantization_layer.cl"}, + {"range", "common/range.cl"}, + {"range_quantized", "common/range.cl"}, + {"reduction_operation_x", "common/reduction_operation.cl"}, + {"reduction_operation_non_parallel_x", "common/reduction_operation.cl"}, + {"reduction_operation_y", "common/reduction_operation.cl"}, + {"reduction_operation_z", "common/reduction_operation.cl"}, + {"reduction_operation_w", "common/reduction_operation.cl"}, + {"reshape_layer", "common/reshape_layer.cl"}, + {"reshape_to_columns", "common/convolution_layer.cl"}, + {"reverse", "common/reverse.cl"}, + {"roi_align_layer", "common/roi_align_layer.cl"}, + {"roi_align_layer_quantized", "common/roi_align_layer_quantized.cl"}, + {"roi_pooling_layer", "common/roi_pooling_layer.cl"}, + {"select_same_rank", "common/select.cl"}, + {"select_different_rank_2", "common/select.cl"}, + {"select_different_rank_n", "common/select.cl"}, + {"softmax_layer_norm", "common/softmax_layer.cl"}, + {"softmax_layer_norm_quantized", "common/softmax_layer_quantized.cl"}, + {"softmax_layer_max_shift_exp_sum_quantized_serial", "common/softmax_layer_quantized.cl"}, + {"softmax_layer_max_shift_exp_sum_quantized_parallel", "common/softmax_layer_quantized.cl"}, + {"softmax_layer_max_shift_exp_sum_serial", "common/softmax_layer.cl"}, + {"softmax_layer_max_shift_exp_sum_parallel", "common/softmax_layer.cl"}, + {"stack_layer", "common/stack_layer.cl"}, + {"strided_slice", "common/slice_ops.cl"}, + {"tile", "common/tile.cl"}, + {"transpose", "common/transpose.cl"}, #ifdef ENABLE_NCHW_KERNELS - { "batch_to_space_nchw", "nchw/batch_to_space.cl" }, - { "batch_to_space_static_nchw", "nchw/batch_to_space.cl" }, - { "batchnormalization_layer_nchw", "nchw/batchnormalization_layer.cl" }, - { "channel_shuffle_nchw", "nchw/channel_shuffle.cl" }, - { "depth_to_space_nchw", "nchw/depth_to_space.cl" }, - { "dequantization_layer_per_channel_nchw", "nchw/dequantization_layer.cl" }, - { "direct_convolution1x1", "nchw/direct_convolution1x1.cl" }, - { "direct_convolution_nchw", "nchw/direct_convolution.cl" }, + {"batch_to_space_nchw", "nchw/batch_to_space.cl"}, + {"batch_to_space_static_nchw", "nchw/batch_to_space.cl"}, + {"batchnormalization_layer_nchw", "nchw/batchnormalization_layer.cl"}, + {"channel_shuffle_nchw", "nchw/channel_shuffle.cl"}, + {"depth_to_space_nchw", "nchw/depth_to_space.cl"}, + {"dequantization_layer_per_channel_nchw", "nchw/dequantization_layer.cl"}, + {"direct_convolution1x1", "nchw/direct_convolution1x1.cl"}, + {"direct_convolution_nchw", "nchw/direct_convolution.cl"}, - { "im2col1x1_stridex1_nchw", "nchw/im2col.cl" }, - { "im2col3x3_nchw", "nchw/im2col.cl" }, - { "im2col5x5_nchw", "nchw/im2col.cl" }, - { "im2col11x11_padx0_pady0_nchw", "nchw/im2col.cl" }, - { "im2col_generic_nchw", "nchw/im2col.cl" }, - { "im2col_generic_padx0_pady0_nchw", "nchw/im2col.cl" }, - { "normalization_layer_cross_map_nchw", "nchw/normalization_layer.cl" }, - { "normalization_layer_in_map_nchw", "nchw/normalization_layer.cl" }, - { "normalize_planar_yuv_layer_nchw", "nchw/normalize_planar_yuv_layer.cl" }, - { "normalize_planar_yuv_layer_q8_nchw", "nchw/normalize_planar_yuv_layer_quantized.cl" }, - { "pooling_layer_MxN_nchw", "nchw/pooling_layer.cl" }, - { "pooling_layer_2_nchw_indices", "nchw/pooling_layer.cl" }, - { "prior_box_layer_nchw", "nchw/prior_box_layer.cl" }, - { "reorg_layer_nchw", "nchw/reorg_layer.cl" }, - { "scale_nearest_neighbour_nchw", "nchw/scale.cl" }, - { "scale_bilinear_nchw", "nchw/scale.cl" }, - { "space_to_batch_nchw", "nchw/space_to_batch.cl" }, - { "space_to_batch_static_nchw", "nchw/space_to_batch.cl" }, - { "space_to_depth_nchw", "nchw/space_to_depth.cl" }, - { "upsample_layer_nchw", "nchw/upsample_layer.cl" }, - { "winograd_filter_transform_2x2_3x3_nchw", "nchw/winograd_filter_transform.cl" }, - { "winograd_filter_transform_2x1_3x1_nchw", "nchw/winograd_filter_transform.cl" }, - { "winograd_filter_transform_1x2_1x3_nchw", "nchw/winograd_filter_transform.cl" }, - { "winograd_filter_transform_4x4_3x3_nchw", "nchw/winograd_filter_transform.cl" }, - { "winograd_filter_transform_4x1_3x1_nchw", "nchw/winograd_filter_transform.cl" }, - { "winograd_filter_transform_1x4_1x3_nchw", "nchw/winograd_filter_transform.cl" }, - { "winograd_filter_transform_4x4_5x5_nchw", "nchw/winograd_filter_transform.cl" }, - { "winograd_filter_transform_4x1_5x1_nchw", "nchw/winograd_filter_transform.cl" }, - { "winograd_filter_transform_1x4_1x5_nchw", "nchw/winograd_filter_transform.cl" }, - { "winograd_input_transform_2x2_3x3_stepz1_nchw", "nchw/winograd_input_transform.cl" }, - { "winograd_input_transform_2x2_3x3_stepz2_nchw", "nchw/winograd_input_transform.cl" }, - { "winograd_input_transform_2x1_3x1_stepz1_nchw", "nchw/winograd_input_transform.cl" }, - { "winograd_input_transform_2x1_3x1_stepz2_nchw", "nchw/winograd_input_transform.cl" }, - { "winograd_input_transform_1x2_1x3_stepz1_nchw", "nchw/winograd_input_transform.cl" }, - { "winograd_input_transform_1x2_1x3_stepz2_nchw", "nchw/winograd_input_transform.cl" }, - { "winograd_input_transform_4x4_3x3_stepz1_nchw", "nchw/winograd_input_transform.cl" }, - { "winograd_input_transform_4x1_3x1_stepz1_nchw", "nchw/winograd_input_transform.cl" }, - { "winograd_input_transform_1x4_1x3_stepz1_nchw", "nchw/winograd_input_transform.cl" }, - { "winograd_input_transform_4x4_5x5_stepz1_nchw", "nchw/winograd_input_transform.cl" }, - { "winograd_input_transform_4x1_5x1_stepz1_nchw", "nchw/winograd_input_transform.cl" }, - { "winograd_input_transform_1x4_1x5_stepz1_nchw", "nchw/winograd_input_transform.cl" }, - { "winograd_output_transform_2x2_3x3_nchw", "nchw/winograd_output_transform.cl" }, - { "winograd_output_transform_2x1_3x1_nchw", "nchw/winograd_output_transform.cl" }, - { "winograd_output_transform_1x2_1x3_nchw", "nchw/winograd_output_transform.cl" }, - { "winograd_output_transform_4x4_3x3_nchw", "nchw/winograd_output_transform.cl" }, - { "winograd_output_transform_4x1_3x1_nchw", "nchw/winograd_output_transform.cl" }, - { "winograd_output_transform_1x4_1x3_nchw", "nchw/winograd_output_transform.cl" }, - { "winograd_output_transform_4x4_5x5_nchw", "nchw/winograd_output_transform.cl" }, - { "winograd_output_transform_4x1_5x1_nchw", "nchw/winograd_output_transform.cl" }, - { "winograd_output_transform_1x4_1x5_nchw", "nchw/winograd_output_transform.cl" }, + {"im2col1x1_stridex1_nchw", "nchw/im2col.cl"}, + {"im2col3x3_nchw", "nchw/im2col.cl"}, + {"im2col5x5_nchw", "nchw/im2col.cl"}, + {"im2col11x11_padx0_pady0_nchw", "nchw/im2col.cl"}, + {"im2col_generic_nchw", "nchw/im2col.cl"}, + {"im2col_generic_padx0_pady0_nchw", "nchw/im2col.cl"}, + {"normalization_layer_cross_map_nchw", "nchw/normalization_layer.cl"}, + {"normalization_layer_in_map_nchw", "nchw/normalization_layer.cl"}, + {"normalize_planar_yuv_layer_nchw", "nchw/normalize_planar_yuv_layer.cl"}, + {"normalize_planar_yuv_layer_q8_nchw", "nchw/normalize_planar_yuv_layer_quantized.cl"}, + {"pooling_layer_MxN_nchw", "nchw/pooling_layer.cl"}, + {"pooling_layer_2_nchw_indices", "nchw/pooling_layer.cl"}, + {"prior_box_layer_nchw", "nchw/prior_box_layer.cl"}, + {"reorg_layer_nchw", "nchw/reorg_layer.cl"}, + {"scale_nearest_neighbour_nchw", "nchw/scale.cl"}, + {"scale_bilinear_nchw", "nchw/scale.cl"}, + {"space_to_batch_nchw", "nchw/space_to_batch.cl"}, + {"space_to_batch_static_nchw", "nchw/space_to_batch.cl"}, + {"space_to_depth_nchw", "nchw/space_to_depth.cl"}, + {"upsample_layer_nchw", "nchw/upsample_layer.cl"}, + {"winograd_filter_transform_2x2_3x3_nchw", "nchw/winograd_filter_transform.cl"}, + {"winograd_filter_transform_2x1_3x1_nchw", "nchw/winograd_filter_transform.cl"}, + {"winograd_filter_transform_1x2_1x3_nchw", "nchw/winograd_filter_transform.cl"}, + {"winograd_filter_transform_4x4_3x3_nchw", "nchw/winograd_filter_transform.cl"}, + {"winograd_filter_transform_4x1_3x1_nchw", "nchw/winograd_filter_transform.cl"}, + {"winograd_filter_transform_1x4_1x3_nchw", "nchw/winograd_filter_transform.cl"}, + {"winograd_filter_transform_4x4_5x5_nchw", "nchw/winograd_filter_transform.cl"}, + {"winograd_filter_transform_4x1_5x1_nchw", "nchw/winograd_filter_transform.cl"}, + {"winograd_filter_transform_1x4_1x5_nchw", "nchw/winograd_filter_transform.cl"}, + {"winograd_input_transform_2x2_3x3_stepz1_nchw", "nchw/winograd_input_transform.cl"}, + {"winograd_input_transform_2x2_3x3_stepz2_nchw", "nchw/winograd_input_transform.cl"}, + {"winograd_input_transform_2x1_3x1_stepz1_nchw", "nchw/winograd_input_transform.cl"}, + {"winograd_input_transform_2x1_3x1_stepz2_nchw", "nchw/winograd_input_transform.cl"}, + {"winograd_input_transform_1x2_1x3_stepz1_nchw", "nchw/winograd_input_transform.cl"}, + {"winograd_input_transform_1x2_1x3_stepz2_nchw", "nchw/winograd_input_transform.cl"}, + {"winograd_input_transform_4x4_3x3_stepz1_nchw", "nchw/winograd_input_transform.cl"}, + {"winograd_input_transform_4x1_3x1_stepz1_nchw", "nchw/winograd_input_transform.cl"}, + {"winograd_input_transform_1x4_1x3_stepz1_nchw", "nchw/winograd_input_transform.cl"}, + {"winograd_input_transform_4x4_5x5_stepz1_nchw", "nchw/winograd_input_transform.cl"}, + {"winograd_input_transform_4x1_5x1_stepz1_nchw", "nchw/winograd_input_transform.cl"}, + {"winograd_input_transform_1x4_1x5_stepz1_nchw", "nchw/winograd_input_transform.cl"}, + {"winograd_output_transform_2x2_3x3_nchw", "nchw/winograd_output_transform.cl"}, + {"winograd_output_transform_2x1_3x1_nchw", "nchw/winograd_output_transform.cl"}, + {"winograd_output_transform_1x2_1x3_nchw", "nchw/winograd_output_transform.cl"}, + {"winograd_output_transform_4x4_3x3_nchw", "nchw/winograd_output_transform.cl"}, + {"winograd_output_transform_4x1_3x1_nchw", "nchw/winograd_output_transform.cl"}, + {"winograd_output_transform_1x4_1x3_nchw", "nchw/winograd_output_transform.cl"}, + {"winograd_output_transform_4x4_5x5_nchw", "nchw/winograd_output_transform.cl"}, + {"winograd_output_transform_4x1_5x1_nchw", "nchw/winograd_output_transform.cl"}, + {"winograd_output_transform_1x4_1x5_nchw", "nchw/winograd_output_transform.cl"}, #endif /* ENABLE_NCHW_KERNELS */ #ifdef ENABLE_NHWC_KERNELS - { "batch_to_space_nhwc", "nhwc/batch_to_space.cl" }, - { "batch_to_space_static_nhwc", "nhwc/batch_to_space.cl" }, - { "batchnormalization_layer_nhwc", "nhwc/batchnormalization_layer.cl" }, - { "channel_shuffle_nhwc", "nhwc/channel_shuffle.cl" }, - { "depth_to_space_nhwc", "nhwc/depth_to_space.cl" }, - { "dequantization_layer_per_channel_nhwc", "nhwc/dequantization_layer.cl" }, - { "dwc_native_fp_nhwc", "nhwc/dwc_native_fp_nhwc.cl" }, - { "dwc_native_quantized_nhwc", "nhwc/dwc_native_quantized_nhwc.cl" }, - { "direct_convolution_nhwc", "nhwc/direct_convolution.cl" }, - { "direct_convolution3d_ndhwc", "nhwc/direct_convolution3d.cl" }, - { "im2col3x3_nhwc", "nhwc/im2col.cl" }, - { "im2col9x9_nhwc", "nhwc/im2col.cl" }, - { "im2col_generic_nhwc", "nhwc/im2col.cl" }, - { "indirect_convolution_nhwc", "nhwc/indirect_convolution.cl" }, - { "indirect_convolution_address_precalculation", "nhwc/indirect_convolution.cl" }, - { "normalization_layer_cross_map_nhwc", "nhwc/normalization_layer.cl" }, - { "normalization_layer_in_map_nhwc", "nhwc/normalization_layer.cl" }, - { "normalize_planar_yuv_layer_nhwc", "nhwc/normalize_planar_yuv_layer.cl" }, - { "normalize_planar_yuv_layer_q8_nhwc", "nhwc/normalize_planar_yuv_layer_quantized.cl" }, - { "pooling_layer_MxN_nhwc", "nhwc/pooling_layer.cl" }, - { "pooling_layer_2x2_nhwc", "nhwc/pooling_layer.cl" }, - { "pooling_layer_MxN_quantized_nhwc", "nhwc/pooling_layer_quantized.cl" }, - { "pooling_3d_layer_MxN_ndhwc", "nhwc/pooling_3d_layer.cl" }, - { "pooling_3d_layer_MxN_ndhwc_quantized", "nhwc/pooling_3d_layer_quantized.cl" }, - { "reorg_layer_nhwc", "nhwc/reorg_layer.cl" }, - { "scale_nearest_neighbour_nhwc", "nhwc/scale.cl" }, - { "scale_bilinear_nhwc", "nhwc/scale.cl" }, - { "space_to_batch_nhwc", "nhwc/space_to_batch.cl" }, - { "space_to_batch_static_nhwc", "nhwc/space_to_batch.cl" }, - { "space_to_depth_nhwc", "nhwc/space_to_depth.cl" }, - { "transposed_convolution_nhwc", "nhwc/transposed_convolution.cl" }, - { "upsample_layer_nhwc", "nhwc/upsample_layer.cl" }, - { "winograd_filter_transform_4x1_3x1_nhwc", "nhwc/winograd_filter_transform.cl" }, - { "winograd_filter_transform_1x4_1x3_nhwc", "nhwc/winograd_filter_transform.cl" }, - { "winograd_filter_transform_4x4_3x3_nhwc", "nhwc/winograd_filter_transform.cl" }, - { "winograd_filter_transform_4x4_5x5_nhwc", "nhwc/winograd_filter_transform.cl" }, - { "winograd_filter_transform_4x1_5x1_nhwc", "nhwc/winograd_filter_transform.cl" }, - { "winograd_filter_transform_1x4_1x5_nhwc", "nhwc/winograd_filter_transform.cl" }, - { "winograd_filter_transform_2x2_7x7_nhwc", "nhwc/winograd_filter_transform.cl" }, - { "winograd_filter_transform_2x1_7x1_nhwc", "nhwc/winograd_filter_transform.cl" }, - { "winograd_filter_transform_1x2_1x7_nhwc", "nhwc/winograd_filter_transform.cl" }, - { "winograd_input_transform_4x1_3x1_stepz1_nhwc", "nhwc/winograd_input_transform.cl" }, - { "winograd_input_transform_1x4_1x3_stepz1_nhwc", "nhwc/winograd_input_transform.cl" }, - { "winograd_input_transform_4x4_3x3_stepz1_nhwc", "nhwc/winograd_input_transform.cl" }, - { "winograd_input_transform_4x4_5x5_stepz1_nhwc", "nhwc/winograd_input_transform.cl" }, - { "winograd_input_transform_4x1_5x1_stepz1_nhwc", "nhwc/winograd_input_transform.cl" }, - { "winograd_input_transform_1x4_1x5_stepz1_nhwc", "nhwc/winograd_input_transform.cl" }, - { "winograd_input_transform_2x2_7x7_stepz1_nhwc", "nhwc/winograd_input_transform.cl" }, - { "winograd_input_transform_2x1_7x1_stepz1_nhwc", "nhwc/winograd_input_transform.cl" }, - { "winograd_input_transform_1x2_1x7_stepz1_nhwc", "nhwc/winograd_input_transform.cl" }, - { "winograd_output_transform_4x1_3x1_nhwc", "nhwc/winograd_output_transform.cl" }, - { "winograd_output_transform_1x4_1x3_nhwc", "nhwc/winograd_output_transform.cl" }, - { "winograd_output_transform_4x4_3x3_nhwc", "nhwc/winograd_output_transform.cl" }, - { "winograd_output_transform_4x4_5x5_nhwc", "nhwc/winograd_output_transform.cl" }, - { "winograd_output_transform_4x1_5x1_nhwc", "nhwc/winograd_output_transform.cl" }, - { "winograd_output_transform_1x4_1x5_nhwc", "nhwc/winograd_output_transform.cl" }, - { "winograd_output_transform_2x2_7x7_nhwc", "nhwc/winograd_output_transform.cl" }, - { "winograd_output_transform_2x1_7x1_nhwc", "nhwc/winograd_output_transform.cl" }, - { "winograd_output_transform_1x2_1x7_nhwc", "nhwc/winograd_output_transform.cl" }, + {"batch_to_space_nhwc", "nhwc/batch_to_space.cl"}, + {"batch_to_space_static_nhwc", "nhwc/batch_to_space.cl"}, + {"batchnormalization_layer_nhwc", "nhwc/batchnormalization_layer.cl"}, + {"channel_shuffle_nhwc", "nhwc/channel_shuffle.cl"}, + {"depth_to_space_nhwc", "nhwc/depth_to_space.cl"}, + {"dequantization_layer_per_channel_nhwc", "nhwc/dequantization_layer.cl"}, + {"dwc_native_fp_nhwc", "nhwc/dwc_native_fp_nhwc.cl"}, + {"dwc_native_quantized_nhwc", "nhwc/dwc_native_quantized_nhwc.cl"}, + {"direct_convolution_nhwc", "nhwc/direct_convolution.cl"}, + {"direct_convolution3d_ndhwc", "nhwc/direct_convolution3d.cl"}, + {"im2col3x3_nhwc", "nhwc/im2col.cl"}, + {"im2col9x9_nhwc", "nhwc/im2col.cl"}, + {"im2col_generic_nhwc", "nhwc/im2col.cl"}, + {"indirect_convolution_nhwc", "nhwc/indirect_convolution.cl"}, + {"indirect_convolution_address_precalculation", "nhwc/indirect_convolution.cl"}, + {"normalization_layer_cross_map_nhwc", "nhwc/normalization_layer.cl"}, + {"normalization_layer_in_map_nhwc", "nhwc/normalization_layer.cl"}, + {"normalize_planar_yuv_layer_nhwc", "nhwc/normalize_planar_yuv_layer.cl"}, + {"normalize_planar_yuv_layer_q8_nhwc", "nhwc/normalize_planar_yuv_layer_quantized.cl"}, + {"pooling_layer_MxN_nhwc", "nhwc/pooling_layer.cl"}, + {"pooling_layer_2x2_nhwc", "nhwc/pooling_layer.cl"}, + {"pooling_layer_MxN_quantized_nhwc", "nhwc/pooling_layer_quantized.cl"}, + {"pooling_3d_layer_MxN_ndhwc", "nhwc/pooling_3d_layer.cl"}, + {"pooling_3d_layer_MxN_ndhwc_quantized", "nhwc/pooling_3d_layer_quantized.cl"}, + {"reorg_layer_nhwc", "nhwc/reorg_layer.cl"}, + {"scale_nearest_neighbour_nhwc", "nhwc/scale.cl"}, + {"scale_bilinear_nhwc", "nhwc/scale.cl"}, + {"space_to_batch_nhwc", "nhwc/space_to_batch.cl"}, + {"space_to_batch_static_nhwc", "nhwc/space_to_batch.cl"}, + {"space_to_depth_nhwc", "nhwc/space_to_depth.cl"}, + {"transposed_convolution_nhwc", "nhwc/transposed_convolution.cl"}, + {"upsample_layer_nhwc", "nhwc/upsample_layer.cl"}, + {"winograd_filter_transform_4x1_3x1_nhwc", "nhwc/winograd_filter_transform.cl"}, + {"winograd_filter_transform_1x4_1x3_nhwc", "nhwc/winograd_filter_transform.cl"}, + {"winograd_filter_transform_4x4_3x3_nhwc", "nhwc/winograd_filter_transform.cl"}, + {"winograd_filter_transform_4x4_5x5_nhwc", "nhwc/winograd_filter_transform.cl"}, + {"winograd_filter_transform_4x1_5x1_nhwc", "nhwc/winograd_filter_transform.cl"}, + {"winograd_filter_transform_1x4_1x5_nhwc", "nhwc/winograd_filter_transform.cl"}, + {"winograd_filter_transform_2x2_7x7_nhwc", "nhwc/winograd_filter_transform.cl"}, + {"winograd_filter_transform_2x1_7x1_nhwc", "nhwc/winograd_filter_transform.cl"}, + {"winograd_filter_transform_1x2_1x7_nhwc", "nhwc/winograd_filter_transform.cl"}, + {"winograd_input_transform_4x1_3x1_stepz1_nhwc", "nhwc/winograd_input_transform.cl"}, + {"winograd_input_transform_1x4_1x3_stepz1_nhwc", "nhwc/winograd_input_transform.cl"}, + {"winograd_input_transform_4x4_3x3_stepz1_nhwc", "nhwc/winograd_input_transform.cl"}, + {"winograd_input_transform_4x4_5x5_stepz1_nhwc", "nhwc/winograd_input_transform.cl"}, + {"winograd_input_transform_4x1_5x1_stepz1_nhwc", "nhwc/winograd_input_transform.cl"}, + {"winograd_input_transform_1x4_1x5_stepz1_nhwc", "nhwc/winograd_input_transform.cl"}, + {"winograd_input_transform_2x2_7x7_stepz1_nhwc", "nhwc/winograd_input_transform.cl"}, + {"winograd_input_transform_2x1_7x1_stepz1_nhwc", "nhwc/winograd_input_transform.cl"}, + {"winograd_input_transform_1x2_1x7_stepz1_nhwc", "nhwc/winograd_input_transform.cl"}, + {"winograd_output_transform_4x1_3x1_nhwc", "nhwc/winograd_output_transform.cl"}, + {"winograd_output_transform_1x4_1x3_nhwc", "nhwc/winograd_output_transform.cl"}, + {"winograd_output_transform_4x4_3x3_nhwc", "nhwc/winograd_output_transform.cl"}, + {"winograd_output_transform_4x4_5x5_nhwc", "nhwc/winograd_output_transform.cl"}, + {"winograd_output_transform_4x1_5x1_nhwc", "nhwc/winograd_output_transform.cl"}, + {"winograd_output_transform_1x4_1x5_nhwc", "nhwc/winograd_output_transform.cl"}, + {"winograd_output_transform_2x2_7x7_nhwc", "nhwc/winograd_output_transform.cl"}, + {"winograd_output_transform_2x1_7x1_nhwc", "nhwc/winograd_output_transform.cl"}, + {"winograd_output_transform_1x2_1x7_nhwc", "nhwc/winograd_output_transform.cl"}, #endif /* ENABLE_NHWC_KERNELS */ }; -const std::map<std::string, std::string> ClKernelLibrary::_program_source_map = -{ +const std::map<std::string, std::string> ClKernelLibrary::_program_source_map = { #ifdef EMBEDDED_KERNELS { "activation_float_helpers.h", @@ -996,7 +985,7 @@ std::string ClKernelLibrary::program_name(const std::string &kernel_name) const // Find which program contains the kernel auto kernel_program_it = _kernel_program_map.find(kernel_name); - if(_kernel_program_map.end() == kernel_program_it) + if (_kernel_program_map.end() == kernel_program_it) { ARM_COMPUTE_ERROR_VAR("Kernel %s not found in the CLKernelLibrary", kernel_name.c_str()); } @@ -1022,14 +1011,14 @@ ClKernelLibrary::ClProgramInfo ClKernelLibrary::program(const std::string &progr #ifdef EMBEDDED_KERNELS #ifdef ARM_COMPUTE_COMPRESSED_KERNELS const auto inflatted_program_source_it = _decompressed_source_map.find(program_name); - if(inflatted_program_source_it != _decompressed_source_map.end()) + if (inflatted_program_source_it != _decompressed_source_map.end()) { - return ClProgramInfo{ inflatted_program_source_it->second, false }; + return ClProgramInfo{inflatted_program_source_it->second, false}; } #endif /* ARM_COMPUTE_COMPRESSED_KERNELS */ const auto program_source_it = _program_source_map.find(program_name); - if(program_source_it == _program_source_map.end()) + if (program_source_it == _program_source_map.end()) { ARM_COMPUTE_ERROR_VAR("Embedded program for %s does not exist.", program_name.c_str()); } @@ -1042,7 +1031,7 @@ ClKernelLibrary::ClProgramInfo ClKernelLibrary::program(const std::string &progr program_source = std::move(decompressed_program_source); #endif /* ARM_COMPUTE_COMPRESSED_KERNELS */ - return ClProgramInfo{ program_source, false }; + return ClProgramInfo{program_source, false}; #else /* EMBEDDED_KERNELS */ // Check for binary std::string source_name = _kernel_path + program_name; @@ -1050,12 +1039,12 @@ ClKernelLibrary::ClProgramInfo ClKernelLibrary::program(const std::string &progr std::string program_source{}; bool is_binary = false; - if(std::ifstream(binary_name).is_open()) + if (std::ifstream(binary_name).is_open()) { program_source = read_file(binary_name, true); is_binary = true; } - else if(std::ifstream(source_name).is_open()) + else if (std::ifstream(source_name).is_open()) { program_source = read_file(source_name, false); } @@ -1064,7 +1053,7 @@ ClKernelLibrary::ClProgramInfo ClKernelLibrary::program(const std::string &progr ARM_COMPUTE_ERROR_VAR("Kernel file %s does not exist.", source_name.c_str()); } - return ClProgramInfo{ program_source, is_binary }; + return ClProgramInfo{program_source, is_binary}; #endif /* EMBEDDED_KERNELS */ } } // namespace opencl |