提交 81eecf12 编写于 作者: 李寅

Merge branch 'remove_hta' into 'master'

Remove HTA libraries

See merge request !1147
# These files are generated fron nnlib project
licenses(["notice"])
exports_files(["license.txt"])
load(
"//mace:mace.bzl",
"if_android_armv7",
"if_android_arm64",
)
cc_library(
name = "hta",
srcs = if_android_armv7([
"armeabi-v7a/libhta_controller.so",
"armeabi-v7a/libhta_hexagon_runtime.so",
"armeabi-v7a/libnpu.so",
]) + if_android_arm64([
"arm64-v8a/libhta_controller.so",
"arm64-v8a/libhta_hexagon_runtime.so",
"arm64-v8a/libnpu.so",
]),
hdrs = [
"hta_hexagon_api.h",
"hta_hexagon_nn_ops.h",
"hta_ops.h",
],
visibility = ["//visibility:public"],
)
set(HTA_INSTALL_DIR "${PROJECT_SOURCE_DIR}/third_party/hta")
set(HTA_INCLUDE_DIR "${HTA_INSTALL_DIR}")
include_directories(SYSTEM "${HTA_INCLUDE_DIR}")
set(HTA_CONTROLLER
"${HTA_INSTALL_DIR}/${ANDROID_ABI}/libhta_controller.so"
)
set(HTA_RUNTIME
"${HTA_INSTALL_DIR}/${ANDROID_ABI}/libhta_hexagon_runtime.so"
)
set(HTA_NPU
"${HTA_INSTALL_DIR}/${ANDROID_ABI}/libnpu.so"
)
add_library(hta_controller SHARED IMPORTED GLOBAL)
add_library(hta_hexagon_runtime SHARED IMPORTED GLOBAL)
add_library(npu SHARED IMPORTED GLOBAL)
set_target_properties(hta_controller PROPERTIES IMPORTED_LOCATION ${HTA_CONTROLLER})
set_target_properties(hta_hexagon_runtime PROPERTIES IMPORTED_LOCATION ${HTA_RUNTIME})
set_target_properties(npu PROPERTIES IMPORTED_LOCATION ${HTA_NPU})
install(FILES ${HTA_CONTROLLER} DESTINATION lib)
install(FILES ${HTA_RUNTIME} DESTINATION lib)
install(FILES ${HTA_NPU} DESTINATION lib)
/*
* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted (subject to the limitations in the
* disclaimer below) provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* * Neither the name of The Linux Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
* GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
* HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef THIRD_PARTY_HTA_HEXAGON_API_H_
#define THIRD_PARTY_HTA_HEXAGON_API_H_
#include "hta_hexagon_nn_ops.h"
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef int hexagon_hta_nn_nn_id;
struct input {
uint32_t src_id;
uint32_t output_idx;
};
#define NODE_ID_RESERVED_CONSTANT 0
#define MAX_DIMENSIONS 8
struct output {
uint32_t rank; // dimensions in the tensor
uint32_t max_sizes[MAX_DIMENSIONS]; // max num elements in each dimension
uint32_t elementsize; // size of each element
int32_t zero_offset; // 0 for float / integer values
float stepsize; // 0 for float/integer values
};
struct perfinfo {
uint32_t node_id;
uint32_t executions;
union {
uint64_t counter;
struct {
uint32_t counter_lo;
uint32_t counter_hi;
};
};
};
typedef struct input hexagon_hta_nn_input;
typedef struct output hexagon_hta_nn_output;
typedef struct perfinfo hexagon_hta_nn_perfinfo;
typedef int32_t hexagon_hta_nn_padding_type;
typedef enum padding_type_enum {
HTA_NN_PAD_NA = 0,
HTA_NN_PAD_SAME,
HTA_NN_PAD_VALID,
HTA_NN_PAD_MIRROR_REFLECT,
HTA_NN_PAD_MIRROR_SYMMETRIC,
HTA_NN_PAD_SAME_CAFFE,
} hta_padding_type;
typedef struct {
unsigned int batches;
unsigned int height;
unsigned int width;
unsigned int depth;
unsigned char *data;
int dataLen; /* For input and output */
unsigned int data_valid_len; /* for output only */
unsigned int unused;
} hexagon_hta_nn_tensordef;
typedef struct hexagon_nn_op_node hexagon_nn_op_node;
struct hexagon_nn_op_node {
unsigned int node_id;
hta_op_type operation;
hta_padding_type padding;
hexagon_hta_nn_input* inputs;
int inputsLen;
hexagon_hta_nn_output* outputs;
int outputsLen;
};
typedef struct hexagon_nn_const_node hexagon_nn_const_node;
struct hexagon_nn_const_node {
unsigned int node_id;
hexagon_hta_nn_tensordef tensor;
};
/* Actual functions in the interface */
/* Returns 0 on success, nonzero on error unless otherwise noted */
/* Configure the hardware and software environment. Should be called once before doing anything */
int hexagon_hta_nn_config( void );
/* Initialize a new graph, returns a new nn_id or -1 on error */
int hexagon_hta_nn_init(hexagon_hta_nn_nn_id *g);
/* Set debug verbosity. Default is 0, higher values are more verbose */
int hexagon_hta_nn_set_debug_level(hexagon_hta_nn_nn_id id, int level);
/* Append a node to the graph. Nodes are executed in the appended order. */
int hexagon_hta_nn_append_node(
hexagon_hta_nn_nn_id id,
uint32_t node_id,
hta_op_type operation,
hta_padding_type padding,
const struct input *inputs,
uint32_t num_inputs,
const struct output *outputs,
uint32_t num_outputs);
/*
* Append a const node into the graph. The data is copied locally during this
* call, the caller does not need it to persist.
*/
int hexagon_hta_nn_append_const_node(
hexagon_hta_nn_nn_id id,
uint32_t node_id,
uint32_t batches,
uint32_t height,
uint32_t width,
uint32_t depth,
const uint8_t *data,
uint32_t data_len);
/*
* Prepare a graph for execution. Must be done before attempting to execute the graph.
*/
int hexagon_hta_nn_prepare(hexagon_hta_nn_nn_id id);
/* Execute the graph with a single input and a single output. */
int hexagon_hta_nn_execute(
hexagon_hta_nn_nn_id id,
uint32_t batches_in,
uint32_t height_in,
uint32_t width_in,
uint32_t depth_in,
const uint8_t *data_in,
uint32_t data_len_in,
uint32_t *batches_out,
uint32_t *height_out,
uint32_t *width_out,
uint32_t *depth_out,
uint8_t *data_out,
uint32_t data_out_max,
uint32_t *data_out_size);
/* Tear down a graph, destroying it and freeing resources. */
int hexagon_hta_nn_teardown(hexagon_hta_nn_nn_id id);
/* Get the version of the library */
int hexagon_hta_nn_version(int *ver);
/* Execute the graph with a multiple input and a multiple output. */
int hexagon_hta_nn_execute_new(
hexagon_hta_nn_nn_id id,
const hexagon_hta_nn_tensordef *inputs,
uint32_t n_inputs,
hexagon_hta_nn_tensordef *outputs,
uint32_t n_outputs);
int hexagon_hta_nn_serialize_size(hexagon_hta_nn_nn_id id, unsigned int *serialized_obj_size_out);
int hexagon_hta_nn_serialize(hexagon_hta_nn_nn_id id, void *buf, unsigned int buf_len);
int hexagon_hta_nn_deserialize(void *buf, unsigned len, hexagon_hta_nn_nn_id *g);
#ifdef __cplusplus
}
#endif
#endif //THIRD_PARTY_HTA_HEXAGON_API_H_
/*
* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted (subject to the limitations in the
* disclaimer below) provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* * Neither the name of The Linux Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
* GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
* HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef THIRD_PARTY_HTA_HEXAGON_NN_OPS_H_
#define THIRD_PARTY_HTA_HEXAGON_NN_OPS_H_
typedef enum hta_op_type_enum {
#define HTA_DEF_OP(NAME, ...) HTA_OP_##NAME,
#include "hta_ops.h"
HTA_NN_OPS_MAX
#undef HTA_DEF_OP
} hta_op_type;
#endif // THIRD_PARTY_HTA_HEXAGON_NN_OPS_H_
/*
* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted (subject to the limitations in the
* disclaimer below) provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* * Neither the name of The Linux Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
* GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
* HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/*
* You probably want to
*
* ## ##### #####
* # # # # # #
* # # # # # #
* ###### # # # #
* # # # # # #
* # # ##### #####
*
*
* # # #### ##### ###### ####
* ## # # # # # # #
* # # # # # # # ##### ####
* # # # # # # # # #
* # ## # # # # # # #
* # # #### ##### ###### ####
*
*
* ## #####
* # # #
* # # #
* ###### #
* # # #
* # # #
*
*
* ##### # # ######
* # # # #
* # ###### #####
* # # # #
* # # # #
* # # # ######
*
*
* ###### # # #####
* # ## # # #
* ##### # # # # #
* # # # # # #
* # # ## # #
* ###### # # #####
*
* otherwise the interface becomes incompatible.
*/
HTA_DEF_OP(INPUT)
HTA_DEF_OP(OUTPUT)
HTA_DEF_OP(Nop)
HTA_DEF_OP(Const)
HTA_DEF_OP(Check)
HTA_DEF_OP(Close_f)
HTA_DEF_OP(Close_quint8)
HTA_DEF_OP(Close_q_quint8)
HTA_DEF_OP(Close_int32)
HTA_DEF_OP(Close_qint32)
HTA_DEF_OP(PPrint_8)
HTA_DEF_OP(PPrint_32)
HTA_DEF_OP(PPrint_f)
HTA_DEF_OP(PreFree)
HTA_DEF_OP(Flatten)
#ifndef HTA_DEF_OP_WREF
#define HTA_DEF_OP_WREF(NAME) HTA_DEF_OP(NAME) HTA_DEF_OP(NAME##_ref)
#define __SELF_HTA_DEF_OP_WREF
#endif
HTA_DEF_OP_WREF(QuantizedConv2d_8x8to32)
HTA_DEF_OP_WREF(QuantizedMatMul_8x8to32)
HTA_DEF_OP_WREF(QuantizeDownAndShrinkRange_32to8)
HTA_DEF_OP_WREF(QuantizedRelu_8)
HTA_DEF_OP_WREF(QuantizedReluX_8)
HTA_DEF_OP_WREF(QuantizedMaxPool_8)
HTA_DEF_OP_WREF(QuantizedAvgPool_8)
HTA_DEF_OP_WREF(QuantizedL2Pool_8)
HTA_DEF_OP_WREF(QuantizedConcat_8)
HTA_DEF_OP_WREF(QuantizedBiasAdd_8p8to32)
HTA_DEF_OP_WREF(Min_f)
HTA_DEF_OP_WREF(Max_f)
HTA_DEF_OP_WREF(Quantize)
HTA_DEF_OP_WREF(Dequantize)
HTA_DEF_OP_WREF(Supernode_8x8p8to8)
HTA_DEF_OP(QuantizedFlatten)
HTA_DEF_OP(Softmax_f)
HTA_DEF_OP(Conv2d_f)
HTA_DEF_OP(MatMul_f)
HTA_DEF_OP(Relu_f)
HTA_DEF_OP(ReluX_f)
HTA_DEF_OP(AvgPool_f)
HTA_DEF_OP(L2Pool_f)
HTA_DEF_OP(MaxPool_f)
HTA_DEF_OP(Concat_f)
HTA_DEF_OP(BiasAdd_f)
HTA_DEF_OP(LRN_f)
HTA_DEF_OP(Variable)
HTA_DEF_OP(Assign)
HTA_DEF_OP(Reshape)
HTA_DEF_OP(QuantizedReshape)
HTA_DEF_OP(Tanh_f)
HTA_DEF_OP(Sigmoid_f)
HTA_DEF_OP(Slice_8)
HTA_DEF_OP(Slice_f)
HTA_DEF_OP(QuantizedSlice_8)
HTA_DEF_OP(Add_f)
HTA_DEF_OP(Mul_f)
HTA_DEF_OP(Minimum_f)
HTA_DEF_OP(Maximum_f)
HTA_DEF_OP_WREF(Requantize_32to8)
HTA_DEF_OP_WREF(RequantizationRange_32)
HTA_DEF_OP(Neg_f)
HTA_DEF_OP(Sub_f)
HTA_DEF_OP(AddN_f)
HTA_DEF_OP(Range_int32)
HTA_DEF_OP(Rank_int32)
HTA_DEF_OP(Transpose_int32)
HTA_DEF_OP(Transpose_f)
HTA_DEF_OP(InstanceNorm_f)
HTA_DEF_OP_WREF(QuantizedInstanceNorm_8)
HTA_DEF_OP(Sub_int32)
HTA_DEF_OP(Add_int32)
HTA_DEF_OP(Split_f)
HTA_DEF_OP(Dequantize_qint32_f)
HTA_DEF_OP(PRelu_f)
HTA_DEF_OP_WREF(QuantizedPRelu_8)
HTA_DEF_OP(Sum_f)
HTA_DEF_OP(Prod_f)
HTA_DEF_OP(Mul_int32)
HTA_DEF_OP(LogicalAnd_int32)
HTA_DEF_OP(LogicalOr_int32)
HTA_DEF_OP(LogicalXor_int32)
HTA_DEF_OP(Shape_int32)
HTA_DEF_OP(Pack_int32)
HTA_DEF_OP(MirrorPad_f)
HTA_DEF_OP(ResizeNearestNeighbor_f)
HTA_DEF_OP(StridedSlice_int32)
HTA_DEF_OP(StridedSlice_f)
HTA_DEF_OP(ExpandDims_int32)
HTA_DEF_OP(ExpandDims_f)
HTA_DEF_OP(LogSoftmax_f)
HTA_DEF_OP(Split_int32)
HTA_DEF_OP(QuantizedSplit_8)
HTA_DEF_OP(Deconv_f)
HTA_DEF_OP_WREF(QuantizedDeconv_8x8to32)
HTA_DEF_OP_WREF(QuantizedMul_8x8to32)
HTA_DEF_OP_WREF(QuantizedAdd_8p8to32)
HTA_DEF_OP_WREF(QuantizedSigmoid_8)
HTA_DEF_OP_WREF(QuantizedTanh_8)
HTA_DEF_OP_WREF(QuantizedSoftmax_8)
HTA_DEF_OP_WREF(QuantizedLRN_8)
HTA_DEF_OP_WREF(Quantizedpad2d_frame_8p)
HTA_DEF_OP_WREF(QuantizedSub_8p8to32)
HTA_DEF_OP_WREF(QuantizedMaximum_8)
HTA_DEF_OP_WREF(QuantizedMinimum_8)
HTA_DEF_OP(Pad_f)
HTA_DEF_OP(SpaceToBatchND_f)
HTA_DEF_OP(BatchToSpaceND_f)
HTA_DEF_OP(QuantizedPad_8)
HTA_DEF_OP(ResizeBilinear_f)
HTA_DEF_OP(ConcatV2_f)
HTA_DEF_OP(ConcatV2_int32)
HTA_DEF_OP(Prod_int32)
HTA_DEF_OP(Slice_int32)
HTA_DEF_OP(QuantizedAdd_8p8to8)
HTA_DEF_OP(QuantizedResizeBilinear_8)
HTA_DEF_OP(Supernode_8x8p8to8_d32)
HTA_DEF_OP(Convert_to_d32)
HTA_DEF_OP(Convert_from_d32)
HTA_DEF_OP_WREF(QuantizedMaxPool_8_d32)
HTA_DEF_OP_WREF(QuantizedConcat_8_d32)
HTA_DEF_OP_WREF(QuantizedAvgPool_8_d32)
HTA_DEF_OP(Sink)
HTA_DEF_OP_WREF(QuantizedPRelu_8_d32)
HTA_DEF_OP_WREF(AutoQuantize)
HTA_DEF_OP_WREF(QuantizedDepthwiseConv2d_8x8to32)
HTA_DEF_OP_WREF(DepthwiseConv2d_f)
HTA_DEF_OP(DepthwiseSupernode_8x8p8to8)
HTA_DEF_OP(DepthwiseSupernode_8x8p8to8_d32)
HTA_DEF_OP_WREF(QuantizedMul_8x8to8_d32)
HTA_DEF_OP(FullyConnected_u8)
#if 0
HTA_DEF_OP_WREF(QuantizedFC_8x8p8to8)
#endif
HTA_DEF_OP_WREF(QuantizedAdd_8p8to8_d32)
HTA_DEF_OP_WREF(QuantizedClamp_8)
HTA_DEF_OP(Clamp_f)
HTA_DEF_OP(QuantizeForTest_d32)
HTA_DEF_OP(Close_d32)
HTA_DEF_OP_WREF(QuantizedSub_8p8to8_d32)
HTA_DEF_OP(InputSupernode_8x8p8to8_outd32)
HTA_DEF_OP(QuantizedLRN_8_d32)
HTA_DEF_OP_WREF(QuantizedBiasAdd_32p32to32)
HTA_DEF_OP_WREF(Quantize_int32)
HTA_DEF_OP(Supernode_8x8p32to8)
HTA_DEF_OP(DepthwiseSupernode_8x8p32to8)
HTA_DEF_OP(Supernode_8x8p32to8_d32)
HTA_DEF_OP(DepthwiseSupernode_8x8p32to8_d32)
HTA_DEF_OP(InputSupernode_8x8p32to8_outd32)
HTA_DEF_OP(PPrint_8_d32)
HTA_DEF_OP(PPrintWithPadding_8_d32)
HTA_DEF_OP_WREF(AutoQuantize_d32)
HTA_DEF_OP_WREF(QuantizedTanh_8_d32)
HTA_DEF_OP_WREF(QuantizedSigmoid_8_d32)
HTA_DEF_OP_WREF(QuantizedSoftmax_8_d32)
HTA_DEF_OP_WREF(QuantizedL2Pool_8_d32)
HTA_DEF_OP(Gather_f)
HTA_DEF_OP(Gather_int32)
HTA_DEF_OP(Gather_8)
HTA_DEF_OP(Table_f)
HTA_DEF_OP(Table_int32)
HTA_DEF_OP(Table_8)
HTA_DEF_OP(FillPadding_8_d32)
HTA_DEF_OP(QuantizedResizeBilinear_8_d32)
HTA_DEF_OP(QuantizeINPUT_f_to_8)
HTA_DEF_OP_WREF(DeconvBias_8x8to32)
HTA_DEF_OP(SpaceToBatchND_8)
HTA_DEF_OP(BatchToSpaceND_8)
HTA_DEF_OP(SpaceToDepth_f)
HTA_DEF_OP(DepthToSpace_f)
HTA_DEF_OP(SpaceToDepth_8)
HTA_DEF_OP(DepthToSpace_8)
HTA_DEF_OP(DequantizeOUTPUT_8tof)
HTA_DEF_OP(QuantizedBatchNorm_8x8p8to8)
HTA_DEF_OP(QuantizedBatchNorm_8x8p32to8)
HTA_DEF_OP(QuantizedBatchNorm_8x8p8to8_d32)
HTA_DEF_OP(QuantizedBatchNorm_8x8p32to8_d32)
HTA_DEF_OP_WREF(QuantizedInstanceNorm_8_d32)
HTA_DEF_OP_WREF(QuantizedInstanceNormBG_8)
HTA_DEF_OP_WREF(QuantizedInstanceNormBG_8_d32)
HTA_DEF_OP(SuperFC_8x8p32to8)
HTA_DEF_OP(SuperFC_8x8p32to8_ref)
HTA_DEF_OP(SuperFC_8x8p32to8_d32)
HTA_DEF_OP(ChannelShuffle_f)
HTA_DEF_OP(ChannelShuffle_int32)
HTA_DEF_OP_WREF(QuantizedChannelShuffle_8)
HTA_DEF_OP(QuantizedChannelShuffle_8_d32)
/* this is in op_chanshuffle_d32.c*/
HTA_DEF_OP(QuantizedSplit_8_d32)
HTA_DEF_OP(QuantizedCrop_8)
HTA_DEF_OP(ResizeUnitSquare_f)
HTA_DEF_OP_WREF(ResizeUnitSquare_8)
HTA_DEF_OP_WREF(Nv21ToRgb_8)
HTA_DEF_OP_WREF(RgbaToRgb_8)
HTA_DEF_OP_WREF(Argb32ToRgb_8)
HTA_DEF_OP(Permute_f)
HTA_DEF_OP(QuantizedPermute_8)
HTA_DEF_OP_WREF(QuantizedRoiPool_8)
HTA_DEF_OP(Proposal_f)
HTA_DEF_OP(RoiAlign_f)
HTA_DEF_OP_WREF(QuantizedRoiAlign_8)
HTA_DEF_OP_WREF(Implode_8)
HTA_DEF_OP(QuantizedConcat_8_nond32)
HTA_DEF_OP(Close_16tof)
HTA_DEF_OP(QuantizedLstmInput_16x16to16)
HTA_DEF_OP(QuantizedLstmOutput_16x16to8)
HTA_DEF_OP(Quantize_16)
HTA_DEF_OP(Dequantize_16)
HTA_DEF_OP(Convert_8_16)
HTA_DEF_OP(QuantizedTanh_16)
HTA_DEF_OP(QuantizedSigmoid_16)
HTA_DEF_OP_WREF(QuantizeDownAndShrinkRange_32to16)
HTA_DEF_OP_WREF(Requantize_32to16)
HTA_DEF_OP_WREF(QuantizedMatMul_8x8p32to16)
HTA_DEF_OP(QuantizedStridedSlice_8)
HTA_DEF_OP(Bbox_Transform_f)
HTA_DEF_OP(Softmax_uint8)
HTA_DEF_OP(QuantizedFakeConcat_8_d32)
HTA_DEF_OP(DepthToSpace_8_d32)
HTA_DEF_OP(OemNode)
HTA_DEF_OP(QuantizedPad_8_d32)
// Add new operations above this line
#ifdef __SELF_HTA_DEF_OP_WREF
#undef __SELF_HTA_DEF_OP_WREF
#undef HTA_DEF_OP_WREF
#endif
/*
* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted (subject to the limitations in the
* disclaimer below) provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* * Neither the name of The Linux Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
* GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
* HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
......@@ -14,7 +14,7 @@ cmake -DANDROID_ABI="arm64-v8a" \
-DMACE_ENABLE_QUANTIZE=ON \
-DMACE_ENABLE_OPENCL=ON \
-DMACE_ENABLE_HEXAGON_DSP=ON \
-DMACE_ENABLE_HEXAGON_HTA=ON \
-DMACE_ENABLE_HEXAGON_HTA=OFF \
-DMACE_ENABLE_MTK_APU=ON \
-DMACE_ENABLE_OPT_SIZE=ON \
-DMACE_ENABLE_OBFUSCATE=ON \
......
......@@ -15,7 +15,7 @@ cmake -DANDROID_ABI="armeabi-v7a" \
-DMACE_ENABLE_QUANTIZE=ON \
-DMACE_ENABLE_OPENCL=ON \
-DMACE_ENABLE_HEXAGON_DSP=ON \
-DMACE_ENABLE_HEXAGON_HTA=ON \
-DMACE_ENABLE_HEXAGON_HTA=OFF \
-DMACE_ENABLE_MTK_APU=OFF \
-DMACE_ENABLE_OPT_SIZE=ON \
-DMACE_ENABLE_OBFUSCATE=ON \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册