Replace name direct_map_op with builtin_op
Signed-off-by: Chen Xin <jack.chen@verisilicon.com>
This commit is contained in:
parent
113c3722cb
commit
9b13b6f677
8
BUILD
8
BUILD
|
|
@ -28,7 +28,7 @@ cc_library(
|
||||||
],
|
],
|
||||||
hdrs = [
|
hdrs = [
|
||||||
"include/tim/vx/context.h",
|
"include/tim/vx/context.h",
|
||||||
"include/tim/vx/direct_map_op.h",
|
"include/tim/vx/builtin_op.h",
|
||||||
"include/tim/vx/graph.h",
|
"include/tim/vx/graph.h",
|
||||||
"include/tim/vx/operation.h",
|
"include/tim/vx/operation.h",
|
||||||
"include/tim/vx/ops.h",
|
"include/tim/vx/ops.h",
|
||||||
|
|
@ -45,9 +45,9 @@ cc_library(
|
||||||
"src/tim/vx/compile_option.cc",
|
"src/tim/vx/compile_option.cc",
|
||||||
"src/tim/vx/graph_private.h",
|
"src/tim/vx/graph_private.h",
|
||||||
"src/tim/vx/graph.cc",
|
"src/tim/vx/graph.cc",
|
||||||
"src/tim/vx/direct_map_op_impl.cc",
|
"src/tim/vx/builtin_op_impl.cc",
|
||||||
"src/tim/vx/direct_map_op.cc",
|
"src/tim/vx/builtin_op.cc",
|
||||||
"src/tim/vx/direct_map_op_impl.h",
|
"src/tim/vx/builtin_op_impl.h",
|
||||||
"src/tim/vx/op_impl.cc",
|
"src/tim/vx/op_impl.cc",
|
||||||
"src/tim/vx/op_impl.h",
|
"src/tim/vx/op_impl.h",
|
||||||
"src/tim/vx/operation.cc",
|
"src/tim/vx/operation.cc",
|
||||||
|
|
|
||||||
|
|
@ -21,17 +21,17 @@
|
||||||
* DEALINGS IN THE SOFTWARE.
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_DIRECTMAPOP_H
|
#ifndef TIM_VX_BUILTIN_OP_H_
|
||||||
#define TIM_VX_DIRECTMAPOP_H
|
#define TIM_VX_BUILTIN_OP_H_
|
||||||
|
|
||||||
#include "tim/vx/operation.h"
|
#include "tim/vx/operation.h"
|
||||||
|
#define DirectMapOp BuiltinOp
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
// interface
|
// interface
|
||||||
class DirectMapOp : public Operation {
|
class BuiltinOp : public Operation {
|
||||||
public:
|
public:
|
||||||
DirectMapOp(Graph* graph, uint32_t kind, int in_cnt = 0, int out_cnt = 0,
|
BuiltinOp(Graph* graph, uint32_t kind, int in_cnt = 0, int out_cnt = 0,
|
||||||
DataLayout layout = DataLayout::ANY);
|
DataLayout layout = DataLayout::ANY);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_ACTIVATIONS_H_
|
#ifndef TIM_VX_OPS_ACTIVATIONS_H_
|
||||||
#define TIM_VX_OPS_ACTIVATIONS_H_
|
#define TIM_VX_OPS_ACTIVATIONS_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -73,7 +73,7 @@ namespace ops {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DECLARE_NO_PARAMETER_ACTIVATION(NAME) \
|
#define DECLARE_NO_PARAMETER_ACTIVATION(NAME) \
|
||||||
class NAME : public DirectMapOp { \
|
class NAME : public BuiltinOp { \
|
||||||
public: \
|
public: \
|
||||||
NAME(Graph* graph); \
|
NAME(Graph* graph); \
|
||||||
std::shared_ptr<Operation> Clone( \
|
std::shared_ptr<Operation> Clone( \
|
||||||
|
|
@ -92,7 +92,7 @@ DECLARE_NO_PARAMETER_ACTIVATION(SoftRelu)
|
||||||
|
|
||||||
#undef DEFINE_NO_PARAMETER_ACTIVATION
|
#undef DEFINE_NO_PARAMETER_ACTIVATION
|
||||||
|
|
||||||
class Elu : public DirectMapOp {
|
class Elu : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Elu(Graph* graph);
|
Elu(Graph* graph);
|
||||||
Elu(Graph* graph, float alpha);
|
Elu(Graph* graph, float alpha);
|
||||||
|
|
@ -103,7 +103,7 @@ class Elu : public DirectMapOp {
|
||||||
float alpha_;
|
float alpha_;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Prelu : public DirectMapOp {
|
class Prelu : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Prelu(Graph* graph, int axis);
|
Prelu(Graph* graph, int axis);
|
||||||
std::shared_ptr<Operation> Clone(
|
std::shared_ptr<Operation> Clone(
|
||||||
|
|
@ -113,7 +113,7 @@ class Prelu : public DirectMapOp {
|
||||||
int axis_;
|
int axis_;
|
||||||
};
|
};
|
||||||
|
|
||||||
class HardSigmoid : public DirectMapOp {
|
class HardSigmoid : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
HardSigmoid(Graph* graph, float alpha, float beta);
|
HardSigmoid(Graph* graph, float alpha, float beta);
|
||||||
std::shared_ptr<Operation> Clone(
|
std::shared_ptr<Operation> Clone(
|
||||||
|
|
@ -124,7 +124,7 @@ class HardSigmoid : public DirectMapOp {
|
||||||
float beta_;
|
float beta_;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LeakyRelu : public DirectMapOp {
|
class LeakyRelu : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
LeakyRelu(Graph* graph, float alpha);
|
LeakyRelu(Graph* graph, float alpha);
|
||||||
std::shared_ptr<Operation> Clone(
|
std::shared_ptr<Operation> Clone(
|
||||||
|
|
@ -134,7 +134,7 @@ class LeakyRelu : public DirectMapOp {
|
||||||
float alpha_;
|
float alpha_;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Linear : public DirectMapOp {
|
class Linear : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Linear(Graph* graph, float a, float b = 0.0);
|
Linear(Graph* graph, float a, float b = 0.0);
|
||||||
std::shared_ptr<Operation> Clone(
|
std::shared_ptr<Operation> Clone(
|
||||||
|
|
@ -145,7 +145,7 @@ class Linear : public DirectMapOp {
|
||||||
float b_;
|
float b_;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Gelu : public DirectMapOp {
|
class Gelu : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
*Non-approximate calculations will also have errors when the data type is
|
*Non-approximate calculations will also have errors when the data type is
|
||||||
|
|
@ -156,7 +156,7 @@ class Gelu : public DirectMapOp {
|
||||||
std::shared_ptr<Graph>& graph) const override;
|
std::shared_ptr<Graph>& graph) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Selu : public DirectMapOp {
|
class Selu : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Selu(Graph* graph, float alpha = 1.67326, float gamma = 1.0507);
|
Selu(Graph* graph, float alpha = 1.67326, float gamma = 1.0507);
|
||||||
|
|
||||||
|
|
@ -168,7 +168,7 @@ class Selu : public DirectMapOp {
|
||||||
float gamma_;
|
float gamma_;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Celu : public DirectMapOp {
|
class Celu : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Celu(Graph* graph, float alpha);
|
Celu(Graph* graph, float alpha);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_ADDN_H_
|
#ifndef TIM_VX_OPS_ADDN_H_
|
||||||
#define TIM_VX_OPS_ADDN_H_
|
#define TIM_VX_OPS_ADDN_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -37,7 +37,7 @@ namespace ops {
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class AddN : public DirectMapOp {
|
class AddN : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
AddN(Graph* graph, uint32_t num_inputs);
|
AddN(Graph* graph, uint32_t num_inputs);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_ARG_H_
|
#ifndef TIM_VX_OPS_ARG_H_
|
||||||
#define TIM_VX_OPS_ARG_H_
|
#define TIM_VX_OPS_ARG_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -37,7 +37,7 @@ namespace ops {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DECLARE_ARG_OP(NAME) \
|
#define DECLARE_ARG_OP(NAME) \
|
||||||
class Arg##NAME : public DirectMapOp { \
|
class Arg##NAME : public BuiltinOp { \
|
||||||
public: \
|
public: \
|
||||||
Arg##NAME(Graph* graph, int32_t axis); \
|
Arg##NAME(Graph* graph, int32_t axis); \
|
||||||
std::shared_ptr<Operation> Clone( \
|
std::shared_ptr<Operation> Clone( \
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -43,7 +43,7 @@ namespace ops {
|
||||||
* - crop : corp the output tensor for ROI usage.
|
* - crop : corp the output tensor for ROI usage.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Batch2Space : public DirectMapOp {
|
class Batch2Space : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Batch2Space(Graph* graph, const std::vector<int>& block_size,
|
Batch2Space(Graph* graph, const std::vector<int>& block_size,
|
||||||
const std::vector<int>& crop,
|
const std::vector<int>& crop,
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef OVXLIBXX_OPERATIONS_BATCHNORM_H_
|
#ifndef OVXLIBXX_OPERATIONS_BATCHNORM_H_
|
||||||
#define OVXLIBXX_OPERATIONS_BATCHNORM_H_
|
#define OVXLIBXX_OPERATIONS_BATCHNORM_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -40,7 +40,7 @@ namespace ops {
|
||||||
* $$y_i=\gamma\hat x_i+\beta\equiv BN_{\gamma,\beta}(x_i)$$
|
* $$y_i=\gamma\hat x_i+\beta\equiv BN_{\gamma,\beta}(x_i)$$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class BatchNorm : public DirectMapOp {
|
class BatchNorm : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
BatchNorm(Graph* graph, float eps, DataLayout input_layout = DataLayout::WHCN);
|
BatchNorm(Graph* graph, float eps, DataLayout input_layout = DataLayout::WHCN);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef OVXLIBXX_OPERATIONS_BROADCAST_H_
|
#ifndef OVXLIBXX_OPERATIONS_BROADCAST_H_
|
||||||
#define OVXLIBXX_OPERATIONS_BROADCAST_H_
|
#define OVXLIBXX_OPERATIONS_BROADCAST_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -43,7 +43,7 @@ namespace ops {
|
||||||
* of the operand shape corresponds to. For BroadcastInDim.
|
* of the operand shape corresponds to. For BroadcastInDim.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Broadcast : public DirectMapOp {
|
class Broadcast : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Broadcast(Graph* graph, const std::vector<int32_t>& shape, const std::vector<int32_t>& dimensions = {});
|
Broadcast(Graph* graph, const std::vector<int32_t>& shape, const std::vector<int32_t>& dimensions = {});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef OVXLIBXX_OPERATIONS_CLIP_H_
|
#ifndef OVXLIBXX_OPERATIONS_CLIP_H_
|
||||||
#define OVXLIBXX_OPERATIONS_CLIP_H_
|
#define OVXLIBXX_OPERATIONS_CLIP_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
|
|
@ -36,7 +36,7 @@ namespace ops {
|
||||||
* Clip(x) : min if x <= min; x if min < x < max; max if x >= max
|
* Clip(x) : min if x <= min; x if min < x < max; max if x >= max
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Clip : public DirectMapOp {
|
class Clip : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Clip(Graph* graph, float min, float max);
|
Clip(Graph* graph, float min, float max);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_CONCAT_H_
|
#ifndef TIM_VX_OPS_CONCAT_H_
|
||||||
#define TIM_VX_OPS_CONCAT_H_
|
#define TIM_VX_OPS_CONCAT_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -37,7 +37,7 @@ namespace ops {
|
||||||
* - axis : Which axis to concat on.
|
* - axis : Which axis to concat on.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Concat : public DirectMapOp {
|
class Concat : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Concat(Graph* graph, uint32_t axis, int input_cnt);
|
Concat(Graph* graph, uint32_t axis, int input_cnt);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,13 +26,13 @@
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
namespace ops {
|
namespace ops {
|
||||||
|
|
||||||
class Conv1d : public DirectMapOp {
|
class Conv1d : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Conv1d(Graph* graph, PadType padding, uint32_t stride,
|
Conv1d(Graph* graph, PadType padding, uint32_t stride,
|
||||||
uint32_t dilation, int32_t multiplier = 0,
|
uint32_t dilation, int32_t multiplier = 0,
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -55,7 +55,7 @@ namespace ops {
|
||||||
* - layout : WHCN or CWHN.
|
* - layout : WHCN or CWHN.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Conv2d : public DirectMapOp {
|
class Conv2d : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Conv2d(Graph* graph, PadType padding,
|
Conv2d(Graph* graph, PadType padding,
|
||||||
const std::array<uint32_t, 2>& stride,
|
const std::array<uint32_t, 2>& stride,
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
#define TIM_VX_OPS_CONV3D_H_
|
#define TIM_VX_OPS_CONV3D_H_
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -54,7 +54,7 @@ namespace ops {
|
||||||
* - kernel_layout : WHDIcOc
|
* - kernel_layout : WHDIcOc
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Conv3d : public DirectMapOp {
|
class Conv3d : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Conv3d(Graph* graph, PadType padding,
|
Conv3d(Graph* graph, PadType padding,
|
||||||
const std::array<int32_t, 3>& stride,
|
const std::array<int32_t, 3>& stride,
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
#ifndef TIM_VX_OPS_CUSTOM_BASE_H_
|
#ifndef TIM_VX_OPS_CUSTOM_BASE_H_
|
||||||
#define TIM_VX_OPS_CUSTOM_BASE_H_
|
#define TIM_VX_OPS_CUSTOM_BASE_H_
|
||||||
|
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -53,7 +53,7 @@ namespace ops {
|
||||||
* - kernel_layout: Layout for kernel, WHIO by default.
|
* - kernel_layout: Layout for kernel, WHIO by default.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class DeConv2d : public DirectMapOp {
|
class DeConv2d : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
DeConv2d(Graph* graph, int32_t oc_count_, PadType pad_type,
|
DeConv2d(Graph* graph, int32_t oc_count_, PadType pad_type,
|
||||||
const std::array<uint32_t, 2>& ksize,
|
const std::array<uint32_t, 2>& ksize,
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -49,7 +49,7 @@ namespace ops {
|
||||||
* the output tensor.
|
* the output tensor.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class DeConv1d : public DirectMapOp {
|
class DeConv1d : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
DeConv1d(Graph* graph, PadType pad_type,
|
DeConv1d(Graph* graph, PadType pad_type,
|
||||||
uint32_t stride, uint32_t output_padding, uint32_t group = 1,
|
uint32_t stride, uint32_t output_padding, uint32_t group = 1,
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_DEPTH2SPACE_H_
|
#ifndef TIM_VX_OPS_DEPTH2SPACE_H_
|
||||||
#define TIM_VX_OPS_DEPTH2SPACE_H_
|
#define TIM_VX_OPS_DEPTH2SPACE_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -45,7 +45,7 @@ namespace ops {
|
||||||
* - crop : corp the output tensor for ROI usage.
|
* - crop : corp the output tensor for ROI usage.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class DepthToSpace : public DirectMapOp {
|
class DepthToSpace : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
enum depth2space_mode {
|
enum depth2space_mode {
|
||||||
CRD_mode = 0,
|
CRD_mode = 0,
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef OVXLIBXX_OPERATIONS_DROPOUT_H_
|
#ifndef OVXLIBXX_OPERATIONS_DROPOUT_H_
|
||||||
#define OVXLIBXX_OPERATIONS_DROPOUT_H_
|
#define OVXLIBXX_OPERATIONS_DROPOUT_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
|
|
@ -40,7 +40,7 @@ namespace ops {
|
||||||
* for Dropout operator.
|
* for Dropout operator.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Dropout : public DirectMapOp {
|
class Dropout : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Dropout(Graph* graph, float ratio);
|
Dropout(Graph* graph, float ratio);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_ELEMENTWISE_H_
|
#ifndef TIM_VX_OPS_ELEMENTWISE_H_
|
||||||
#define TIM_VX_OPS_ELEMENTWISE_H_
|
#define TIM_VX_OPS_ELEMENTWISE_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -67,7 +67,7 @@ namespace ops {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DECLARE_ELEMENTWISE_OP(NAME) \
|
#define DECLARE_ELEMENTWISE_OP(NAME) \
|
||||||
class NAME : public DirectMapOp { \
|
class NAME : public BuiltinOp { \
|
||||||
public: \
|
public: \
|
||||||
NAME(Graph* graph); \
|
NAME(Graph* graph); \
|
||||||
std::shared_ptr<Operation> Clone( \
|
std::shared_ptr<Operation> Clone( \
|
||||||
|
|
@ -81,14 +81,14 @@ DECLARE_ELEMENTWISE_OP(Sub)
|
||||||
DECLARE_ELEMENTWISE_OP(Pow)
|
DECLARE_ELEMENTWISE_OP(Pow)
|
||||||
DECLARE_ELEMENTWISE_OP(FloorDiv)
|
DECLARE_ELEMENTWISE_OP(FloorDiv)
|
||||||
|
|
||||||
class Multiply : public DirectMapOp {
|
class Multiply : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Multiply(Graph* graph, float scale = 1.0f);
|
Multiply(Graph* graph, float scale = 1.0f);
|
||||||
|
|
||||||
std::shared_ptr<Operation> Clone(std::shared_ptr<Graph>& graph) const override;
|
std::shared_ptr<Operation> Clone(std::shared_ptr<Graph>& graph) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Div : public DirectMapOp {
|
class Div : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Div(Graph* graph, float scale = 1.0f);
|
Div(Graph* graph, float scale = 1.0f);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
#ifndef TIM_VX_OPS_ERF_H_
|
#ifndef TIM_VX_OPS_ERF_H_
|
||||||
#define TIM_VX_OPS_ERF_H_
|
#define TIM_VX_OPS_ERF_H_
|
||||||
|
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
#include "tim/vx/types.h"
|
#include "tim/vx/types.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
|
|
@ -39,7 +39,7 @@ namespace ops {
|
||||||
* - no parameters
|
* - no parameters
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Erf : public DirectMapOp {
|
class Erf : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Erf(Graph* graph);
|
Erf(Graph* graph);
|
||||||
std::shared_ptr<Operation> Clone(std::shared_ptr<Graph>& graph) const override;
|
std::shared_ptr<Operation> Clone(std::shared_ptr<Graph>& graph) const override;
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_FULLYCONNECTED_H_
|
#ifndef TIM_VX_OPS_FULLYCONNECTED_H_
|
||||||
#define TIM_VX_OPS_FULLYCONNECTED_H_
|
#define TIM_VX_OPS_FULLYCONNECTED_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -39,7 +39,7 @@ namespace ops {
|
||||||
* - weights: the output channel number for weight tensor.
|
* - weights: the output channel number for weight tensor.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class FullyConnected : public DirectMapOp {
|
class FullyConnected : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
FullyConnected(Graph* graph, uint32_t axis);
|
FullyConnected(Graph* graph, uint32_t axis);
|
||||||
FullyConnected(Graph* graph, uint32_t axis, uint32_t weights);
|
FullyConnected(Graph* graph, uint32_t axis, uint32_t weights);
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_GATHER_H_
|
#ifndef TIM_VX_OPS_GATHER_H_
|
||||||
#define TIM_VX_OPS_GATHER_H_
|
#define TIM_VX_OPS_GATHER_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -35,7 +35,7 @@ namespace ops {
|
||||||
* Gather slices from input, **axis** according to **indices**.
|
* Gather slices from input, **axis** according to **indices**.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Gather : public DirectMapOp {
|
class Gather : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Gather(Graph* Graph, int axis, int batch_dims = 0);
|
Gather(Graph* Graph, int axis, int batch_dims = 0);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_GATHER_ELEMENTS_H_
|
#ifndef TIM_VX_OPS_GATHER_ELEMENTS_H_
|
||||||
#define TIM_VX_OPS_GATHER_ELEMENTS_H_
|
#define TIM_VX_OPS_GATHER_ELEMENTS_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -39,7 +39,7 @@ namespace ops {
|
||||||
* https://github.com/onnx/onnx/blob/main/docs/Operators.md#GatherElements
|
* https://github.com/onnx/onnx/blob/main/docs/Operators.md#GatherElements
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class GatherElements : public DirectMapOp {
|
class GatherElements : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
GatherElements(Graph* Graph, int axis);
|
GatherElements(Graph* Graph, int axis);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_GATHERND_H_
|
#ifndef TIM_VX_OPS_GATHERND_H_
|
||||||
#define TIM_VX_OPS_GATHERND_H_
|
#define TIM_VX_OPS_GATHERND_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -35,7 +35,7 @@ namespace ops {
|
||||||
* An operation similar to Gather but gathers across multiple axis at once.
|
* An operation similar to Gather but gathers across multiple axis at once.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class GatherNd : public DirectMapOp {
|
class GatherNd : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
GatherNd(Graph* Graph);
|
GatherNd(Graph* Graph);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -53,7 +53,7 @@ namespace ops {
|
||||||
* - layout : WCN or CWN.
|
* - layout : WCN or CWN.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class GroupedConv1d : public DirectMapOp {
|
class GroupedConv1d : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
GroupedConv1d(Graph* graph, PadType padding, std::array<uint32_t, 2> pad,
|
GroupedConv1d(Graph* graph, PadType padding, std::array<uint32_t, 2> pad,
|
||||||
uint32_t stride, uint32_t dilation, uint32_t group,
|
uint32_t stride, uint32_t dilation, uint32_t group,
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -53,7 +53,7 @@ namespace ops {
|
||||||
* - layout : WHCN or CWHN.
|
* - layout : WHCN or CWHN.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class GroupedConv2d : public DirectMapOp {
|
class GroupedConv2d : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
GroupedConv2d(Graph* graph, PadType padding,
|
GroupedConv2d(Graph* graph, PadType padding,
|
||||||
const std::array<uint32_t, 2>& strides,
|
const std::array<uint32_t, 2>& strides,
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
#define TIM_VX_OPS_GRUCELL_H_
|
#define TIM_VX_OPS_GRUCELL_H_
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
#include "vsi_nn_pub.h"
|
#include "vsi_nn_pub.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
|
|
@ -42,7 +42,7 @@ namespace ops {
|
||||||
* False = "before", True = "after".
|
* False = "before", True = "after".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class GRUCell : public DirectMapOp {
|
class GRUCell : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
enum ActivationType {
|
enum ActivationType {
|
||||||
kNONE = 0,
|
kNONE = 0,
|
||||||
|
|
|
||||||
|
|
@ -23,12 +23,12 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_INSTANCENOMALIZATION_H_
|
#ifndef TIM_VX_OPS_INSTANCENOMALIZATION_H_
|
||||||
#define TIM_VX_OPS_INSTANCENOMALIZATION_H_
|
#define TIM_VX_OPS_INSTANCENOMALIZATION_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
namespace ops {
|
namespace ops {
|
||||||
class InstanceNormalization : public DirectMapOp {
|
class InstanceNormalization : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
InstanceNormalization(Graph* graph, float eps = 1e-5f);
|
InstanceNormalization(Graph* graph, float eps = 1e-5f);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_L2NOMALIZATION_H_
|
#ifndef TIM_VX_OPS_L2NOMALIZATION_H_
|
||||||
#define TIM_VX_OPS_L2NOMALIZATION_H_
|
#define TIM_VX_OPS_L2NOMALIZATION_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ## L2Normalization
|
* ## L2Normalization
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
namespace ops {
|
namespace ops {
|
||||||
class L2Normalization : public DirectMapOp {
|
class L2Normalization : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
L2Normalization(Graph* graph, int32_t axis);
|
L2Normalization(Graph* graph, int32_t axis);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,12 +25,12 @@
|
||||||
#define TIM_VX_OPS_LAYERNOMALIZATION_H_
|
#define TIM_VX_OPS_LAYERNOMALIZATION_H_
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
namespace ops {
|
namespace ops {
|
||||||
class LayerNormalization : public DirectMapOp {
|
class LayerNormalization : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
LayerNormalization(Graph* graph, int32_t axis = 0, float eps = 1e-5f);
|
LayerNormalization(Graph* graph, int32_t axis = 0, float eps = 1e-5f);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_LOCALRESPONSENORMALIZATION_H_
|
#ifndef TIM_VX_OPS_LOCALRESPONSENORMALIZATION_H_
|
||||||
#define TIM_VX_OPS_LOCALRESPONSENORMALIZATION_H_
|
#define TIM_VX_OPS_LOCALRESPONSENORMALIZATION_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ## LocalResponseNormalization
|
* ## LocalResponseNormalization
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
namespace ops {
|
namespace ops {
|
||||||
class LocalResponseNormalization : public DirectMapOp {
|
class LocalResponseNormalization : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
LocalResponseNormalization(Graph* graph, uint32_t size, float alpha,
|
LocalResponseNormalization(Graph* graph, uint32_t size, float alpha,
|
||||||
float beta, float bias, int32_t axis);
|
float beta, float bias, int32_t axis);
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_LOGICAL_H_
|
#ifndef TIM_VX_OPS_LOGICAL_H_
|
||||||
#define TIM_VX_OPS_LOGICAL_H_
|
#define TIM_VX_OPS_LOGICAL_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -40,7 +40,7 @@ namespace ops {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DECLARE_LOGICAL_OP(NAME) \
|
#define DECLARE_LOGICAL_OP(NAME) \
|
||||||
class Logical##NAME : public DirectMapOp { \
|
class Logical##NAME : public BuiltinOp { \
|
||||||
public: \
|
public: \
|
||||||
Logical##NAME(Graph* graph); \
|
Logical##NAME(Graph* graph); \
|
||||||
std::shared_ptr<Operation> Clone( \
|
std::shared_ptr<Operation> Clone( \
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_LOG_SOFTMAX_H_
|
#ifndef TIM_VX_OPS_LOG_SOFTMAX_H_
|
||||||
#define TIM_VX_OPS_LOG_SOFTMAX_H_
|
#define TIM_VX_OPS_LOG_SOFTMAX_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -39,7 +39,7 @@ namespace ops {
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class LogSoftmax : public DirectMapOp {
|
class LogSoftmax : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
LogSoftmax(Graph* graph, int32_t axis, float beta = 1.f);
|
LogSoftmax(Graph* graph, int32_t axis, float beta = 1.f);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_MATMUL_H_
|
#ifndef TIM_VX_OPS_MATMUL_H_
|
||||||
#define TIM_VX_OPS_MATMUL_H_
|
#define TIM_VX_OPS_MATMUL_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -40,7 +40,7 @@ namespace ops {
|
||||||
* - adjoint_b: If True, b is conjugated and transposed before multiplication.
|
* - adjoint_b: If True, b is conjugated and transposed before multiplication.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Matmul : public DirectMapOp {
|
class Matmul : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Matmul(Graph* graph, bool transpose_a = false, bool transpose_b = false,
|
Matmul(Graph* graph, bool transpose_a = false, bool transpose_b = false,
|
||||||
bool adjoint_a = false, bool adjoint_b = false);
|
bool adjoint_a = false, bool adjoint_b = false);
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
#include "tim/vx/types.h"
|
#include "tim/vx/types.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
|
|
@ -44,7 +44,7 @@ namespace ops {
|
||||||
* - round_type : CEILING or FLOOR.
|
* - round_type : CEILING or FLOOR.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class MaxpoolWithArgmax : public DirectMapOp {
|
class MaxpoolWithArgmax : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
MaxpoolWithArgmax(Graph* graph, PadType padding,
|
MaxpoolWithArgmax(Graph* graph, PadType padding,
|
||||||
const std::array<uint32_t, 2>& ksize,
|
const std::array<uint32_t, 2>& ksize,
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
#include "tim/vx/types.h"
|
#include "tim/vx/types.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
|
|
@ -45,7 +45,7 @@ namespace ops {
|
||||||
* - round_type : CEILING or FLOOR.
|
* - round_type : CEILING or FLOOR.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class MaxpoolWithArgmax2 : public DirectMapOp {
|
class MaxpoolWithArgmax2 : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
MaxpoolWithArgmax2(Graph* graph, PadType padding,
|
MaxpoolWithArgmax2(Graph* graph, PadType padding,
|
||||||
const std::array<uint32_t, 2>& ksize,
|
const std::array<uint32_t, 2>& ksize,
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
#include "tim/vx/types.h"
|
#include "tim/vx/types.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
|
|
@ -42,7 +42,7 @@ namespace ops {
|
||||||
* - ksize : filter size.
|
* - ksize : filter size.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class MaxUnpool2d : public DirectMapOp {
|
class MaxUnpool2d : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
MaxUnpool2d(Graph* graph, const std::array<uint32_t, 2>& ksize,
|
MaxUnpool2d(Graph* graph, const std::array<uint32_t, 2>& ksize,
|
||||||
const std::array<uint32_t, 2>& stride, DataLayout layout = DataLayout::WHCN);
|
const std::array<uint32_t, 2>& stride, DataLayout layout = DataLayout::WHCN);
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_MOMENTS_H_
|
#ifndef TIM_VX_OPS_MOMENTS_H_
|
||||||
#define TIM_VX_OPS_MOMENTS_H_
|
#define TIM_VX_OPS_MOMENTS_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -39,7 +39,7 @@ namespace ops {
|
||||||
* - keep_dims : Produce moments with the same dimensionality as input.
|
* - keep_dims : Produce moments with the same dimensionality as input.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Moments : public DirectMapOp {
|
class Moments : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Moments(Graph* graph, const std::vector<int32_t>& axes,
|
Moments(Graph* graph, const std::vector<int32_t>& axes,
|
||||||
bool keep_dims = false);
|
bool keep_dims = false);
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_NBG_H_
|
#ifndef TIM_VX_OPS_NBG_H_
|
||||||
#define TIM_VX_OPS_NBG_H_
|
#define TIM_VX_OPS_NBG_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -36,7 +36,7 @@ namespace ops {
|
||||||
* a bianry file.
|
* a bianry file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class NBG : public DirectMapOp {
|
class NBG : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
NBG(Graph* graph, const char* binary, size_t input_count, size_t output_count);
|
NBG(Graph* graph, const char* binary, size_t input_count, size_t output_count);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPERATION_ONE_HOT_H_
|
#ifndef TIM_VX_OPERATION_ONE_HOT_H_
|
||||||
#define TIM_VX_OPERATION_ONE_HOT_H_
|
#define TIM_VX_OPERATION_ONE_HOT_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -40,7 +40,7 @@ namespace ops {
|
||||||
* - axis : The axis to fill.
|
* - axis : The axis to fill.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class OneHot : public DirectMapOp {
|
class OneHot : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
OneHot(Graph* graph, int32_t depth, float on_value = 1, float off_value = 0,
|
OneHot(Graph* graph, int32_t depth, float on_value = 1, float off_value = 0,
|
||||||
int32_t axis = 0);
|
int32_t axis = 0);
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPERATION_PAD_H_
|
#ifndef TIM_VX_OPERATION_PAD_H_
|
||||||
#define TIM_VX_OPERATION_PAD_H_
|
#define TIM_VX_OPERATION_PAD_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -40,7 +40,7 @@ namespace ops {
|
||||||
* - back_size : Add pad values to the right and bottom.
|
* - back_size : Add pad values to the right and bottom.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Pad : public DirectMapOp {
|
class Pad : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
typedef enum {
|
typedef enum {
|
||||||
// signature
|
// signature
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
#include "tim/vx/types.h"
|
#include "tim/vx/types.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
|
|
@ -64,7 +64,7 @@ namespace ops {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Pool2d : public DirectMapOp {
|
class Pool2d : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
/* for Classic Pool2d, pool does not support auto-completion of pad value,
|
/* for Classic Pool2d, pool does not support auto-completion of pad value,
|
||||||
you need to specify pad size explicitly, it is recommended to use the second api.*/
|
you need to specify pad size explicitly, it is recommended to use the second api.*/
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_REDUCE_H_
|
#ifndef TIM_VX_OPS_REDUCE_H_
|
||||||
#define TIM_VX_OPS_REDUCE_H_
|
#define TIM_VX_OPS_REDUCE_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -95,7 +95,7 @@ namespace ops {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DECLARE_REDUCE_OP(NAME) \
|
#define DECLARE_REDUCE_OP(NAME) \
|
||||||
class Reduce##NAME : public DirectMapOp { \
|
class Reduce##NAME : public BuiltinOp { \
|
||||||
public: \
|
public: \
|
||||||
Reduce##NAME(Graph* graph, const std::vector<int32_t>& axis, \
|
Reduce##NAME(Graph* graph, const std::vector<int32_t>& axis, \
|
||||||
bool keep_dims); \
|
bool keep_dims); \
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_RELATIONAL_H_
|
#ifndef TIM_VX_OPS_RELATIONAL_H_
|
||||||
#define TIM_VX_OPS_RELATIONAL_H_
|
#define TIM_VX_OPS_RELATIONAL_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -56,7 +56,7 @@ namespace ops {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DECLARE_RELATIONAL_OP(NAME) \
|
#define DECLARE_RELATIONAL_OP(NAME) \
|
||||||
class NAME : public DirectMapOp { \
|
class NAME : public BuiltinOp { \
|
||||||
public: \
|
public: \
|
||||||
NAME(Graph* graph); \
|
NAME(Graph* graph); \
|
||||||
std::shared_ptr<Operation> Clone( \
|
std::shared_ptr<Operation> Clone( \
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_REORG_H_
|
#ifndef TIM_VX_OPS_REORG_H_
|
||||||
#define TIM_VX_OPS_REORG_H_
|
#define TIM_VX_OPS_REORG_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -35,7 +35,7 @@ namespace ops {
|
||||||
* The layer used in YOLOv2. See also https://github.com/pjreddie/darknet/blob/master/src/reorg_layer.c
|
* The layer used in YOLOv2. See also https://github.com/pjreddie/darknet/blob/master/src/reorg_layer.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Reorg : public DirectMapOp {
|
class Reorg : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Reorg(Graph* graph, const uint32_t stride);
|
Reorg(Graph* graph, const uint32_t stride);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_RESHAPE_H_
|
#ifndef TIM_VX_OPS_RESHAPE_H_
|
||||||
#define TIM_VX_OPS_RESHAPE_H_
|
#define TIM_VX_OPS_RESHAPE_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_RESIZE_H_
|
#ifndef TIM_VX_OPS_RESIZE_H_
|
||||||
#define TIM_VX_OPS_RESIZE_H_
|
#define TIM_VX_OPS_RESIZE_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -44,7 +44,7 @@ namespace ops {
|
||||||
* - target_height / target_width : output height / width. DO NOT use it with factor together.
|
* - target_height / target_width : output height / width. DO NOT use it with factor together.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Resize : public DirectMapOp {
|
class Resize : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Resize(Graph* graph, ResizeType type, float factor, bool align_corners,
|
Resize(Graph* graph, ResizeType type, float factor, bool align_corners,
|
||||||
bool half_pixel_centers, int target_height, int target_width,
|
bool half_pixel_centers, int target_height, int target_width,
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_RESIZE1D_H_
|
#ifndef TIM_VX_OPS_RESIZE1D_H_
|
||||||
#define TIM_VX_OPS_RESIZE1D_H_
|
#define TIM_VX_OPS_RESIZE1D_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -44,7 +44,7 @@ namespace ops {
|
||||||
* - target_height / target_width : output height / width. DO NOT use it with factor together.
|
* - target_height / target_width : output height / width. DO NOT use it with factor together.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Resize1d : public DirectMapOp {
|
class Resize1d : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Resize1d(Graph* graph, ResizeType type, float factor, bool align_corners,
|
Resize1d(Graph* graph, ResizeType type, float factor, bool align_corners,
|
||||||
bool half_pixel_centers, int target_size,
|
bool half_pixel_centers, int target_size,
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_REVERSE_H_
|
#ifndef TIM_VX_OPS_REVERSE_H_
|
||||||
#define TIM_VX_OPS_REVERSE_H_
|
#define TIM_VX_OPS_REVERSE_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -37,7 +37,7 @@ namespace ops {
|
||||||
* - axis : The indices of the dimensions to reverse.
|
* - axis : The indices of the dimensions to reverse.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Reverse : public DirectMapOp {
|
class Reverse : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Reverse(Graph* graph, const std::vector<int32_t>& axis);
|
Reverse(Graph* graph, const std::vector<int32_t>& axis);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_ROI_ALIGN_H_
|
#ifndef TIM_VX_OPS_ROI_ALIGN_H_
|
||||||
#define TIM_VX_OPS_ROI_ALIGN_H_
|
#define TIM_VX_OPS_ROI_ALIGN_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -47,7 +47,7 @@ namespace ops {
|
||||||
* used to compute the output.
|
* used to compute the output.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class RoiAlign : public DirectMapOp {
|
class RoiAlign : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
RoiAlign(Graph* graph, int32_t output_height, int32_t output_width,
|
RoiAlign(Graph* graph, int32_t output_height, int32_t output_width,
|
||||||
float height_ratio, float width_ratio, int32_t height_sample_num,
|
float height_ratio, float width_ratio, int32_t height_sample_num,
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
#define TIM_VX_OPS_ROI_POOL_H_
|
#define TIM_VX_OPS_ROI_POOL_H_
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
#include "tim/vx/types.h"
|
#include "tim/vx/types.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
|
|
@ -44,7 +44,7 @@ namespace ops {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class RoiPool : public DirectMapOp {
|
class RoiPool : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
RoiPool(Graph* graph, PoolType type, float scale,
|
RoiPool(Graph* graph, PoolType type, float scale,
|
||||||
const std::array<uint32_t, 2>& size);
|
const std::array<uint32_t, 2>& size);
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_SCATTERND_H_
|
#ifndef TIM_VX_OPS_SCATTERND_H_
|
||||||
#define TIM_VX_OPS_SCATTERND_H_
|
#define TIM_VX_OPS_SCATTERND_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -37,7 +37,7 @@ namespace ops {
|
||||||
* - shape : The shape of the resulting tensor.
|
* - shape : The shape of the resulting tensor.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ScatterND : public DirectMapOp {
|
class ScatterND : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
ScatterND(Graph* graph, const std::vector<uint32_t>& shape);
|
ScatterND(Graph* graph, const std::vector<uint32_t>& shape);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_SELECT_H_
|
#ifndef TIM_VX_OPS_SELECT_H_
|
||||||
#define TIM_VX_OPS_SELECT_H_
|
#define TIM_VX_OPS_SELECT_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -36,7 +36,7 @@ namespace ops {
|
||||||
* from both input tensors: O[i] = C[i] ? x[i] : y[i].
|
* from both input tensors: O[i] = C[i] ? x[i] : y[i].
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Select : public DirectMapOp {
|
class Select : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Select(Graph* graph);
|
Select(Graph* graph);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_SHUFFLE_H_
|
#ifndef TIM_VX_OPS_SHUFFLE_H_
|
||||||
#define TIM_VX_OPS_SHUFFLE_H_
|
#define TIM_VX_OPS_SHUFFLE_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -38,7 +38,7 @@ namespace ops {
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ShuffleChannel : public DirectMapOp {
|
class ShuffleChannel : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
explicit ShuffleChannel(Graph* graph, int32_t num_groups, int32_t index_axis);
|
explicit ShuffleChannel(Graph* graph, int32_t num_groups, int32_t index_axis);
|
||||||
std::shared_ptr<Operation> Clone(std::shared_ptr<Graph>& graph) const override;
|
std::shared_ptr<Operation> Clone(std::shared_ptr<Graph>& graph) const override;
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_SIGNALFRAME_H_
|
#ifndef TIM_VX_OPS_SIGNALFRAME_H_
|
||||||
#define TIM_VX_OPS_SIGNALFRAME_H_
|
#define TIM_VX_OPS_SIGNALFRAME_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -39,7 +39,7 @@ namespace ops {
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class SignalFrame : public DirectMapOp {
|
class SignalFrame : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
SignalFrame(Graph* graph, uint32_t window_length, uint32_t step, uint32_t pad_end=0,
|
SignalFrame(Graph* graph, uint32_t window_length, uint32_t step, uint32_t pad_end=0,
|
||||||
uint32_t axis=0);
|
uint32_t axis=0);
|
||||||
|
|
|
||||||
|
|
@ -23,14 +23,14 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_SIMPLE_OPERATIONS_H_
|
#ifndef TIM_VX_OPS_SIMPLE_OPERATIONS_H_
|
||||||
#define TIM_VX_OPS_SIMPLE_OPERATIONS_H_
|
#define TIM_VX_OPS_SIMPLE_OPERATIONS_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
namespace ops {
|
namespace ops {
|
||||||
|
|
||||||
#define DECLARE_SIMPLE_OP(NAME) \
|
#define DECLARE_SIMPLE_OP(NAME) \
|
||||||
class NAME : public DirectMapOp { \
|
class NAME : public BuiltinOp { \
|
||||||
public: \
|
public: \
|
||||||
NAME(Graph* graph); \
|
NAME(Graph* graph); \
|
||||||
std::shared_ptr<Operation> Clone( \
|
std::shared_ptr<Operation> Clone( \
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_SLICE_H_
|
#ifndef TIM_VX_OPS_SLICE_H_
|
||||||
#define TIM_VX_OPS_SLICE_H_
|
#define TIM_VX_OPS_SLICE_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -38,7 +38,7 @@ namespace ops {
|
||||||
* - length : the size of the slice in each dimension.
|
* - length : the size of the slice in each dimension.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Slice : public DirectMapOp {
|
class Slice : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Slice(Graph* graph, uint32_t dims, const std::vector<int32_t>& start,
|
Slice(Graph* graph, uint32_t dims, const std::vector<int32_t>& start,
|
||||||
const std::vector<int32_t>& length);
|
const std::vector<int32_t>& length);
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_SOFTMAX_H_
|
#ifndef TIM_VX_OPS_SOFTMAX_H_
|
||||||
#define TIM_VX_OPS_SOFTMAX_H_
|
#define TIM_VX_OPS_SOFTMAX_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -42,7 +42,7 @@ namespace ops {
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Softmax : public DirectMapOp {
|
class Softmax : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Softmax(Graph* graph, float beta, int32_t axis);
|
Softmax(Graph* graph, float beta, int32_t axis);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -46,7 +46,7 @@ namespace ops {
|
||||||
* - pad : the paddings for each spatial dimension of the input tensor.
|
* - pad : the paddings for each spatial dimension of the input tensor.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Space2Batch : public DirectMapOp {
|
class Space2Batch : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Space2Batch(Graph* graph, const std::vector<int>& block_size,
|
Space2Batch(Graph* graph, const std::vector<int>& block_size,
|
||||||
const std::vector<int>& pad,
|
const std::vector<int>& pad,
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_SPACE2DEPTH_H_
|
#ifndef TIM_VX_OPS_SPACE2DEPTH_H_
|
||||||
#define TIM_VX_OPS_SPACE2DEPTH_H_
|
#define TIM_VX_OPS_SPACE2DEPTH_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -38,7 +38,7 @@ namespace ops {
|
||||||
* transformation of DepthToSpace.
|
* transformation of DepthToSpace.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class SpaceToDepth : public DirectMapOp {
|
class SpaceToDepth : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
SpaceToDepth(Graph* graph, std::vector<int> block_size,
|
SpaceToDepth(Graph* graph, std::vector<int> block_size,
|
||||||
DataLayout layout = DataLayout::WHCN);
|
DataLayout layout = DataLayout::WHCN);
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_SPATIAL_TRANSFORMER_H_
|
#ifndef TIM_VX_OPS_SPATIAL_TRANSFORMER_H_
|
||||||
#define TIM_VX_OPS_SPATIAL_TRANSFORMER_H_
|
#define TIM_VX_OPS_SPATIAL_TRANSFORMER_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -40,7 +40,7 @@ namespace ops {
|
||||||
It is the output of the localization network.
|
It is the output of the localization network.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class SpatialTransformer : public DirectMapOp {
|
class SpatialTransformer : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
SpatialTransformer(Graph* graph, uint32_t output_h, uint32_t output_w,
|
SpatialTransformer(Graph* graph, uint32_t output_h, uint32_t output_w,
|
||||||
bool has_theta_1_1, bool has_theta_1_2, bool has_theta_1_3,
|
bool has_theta_1_1, bool has_theta_1_2, bool has_theta_1_3,
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
#define TIM_VX_OPS_SPLIT_H_
|
#define TIM_VX_OPS_SPLIT_H_
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -40,7 +40,7 @@ namespace ops {
|
||||||
* - slices : indicating the number of splits along given axis.
|
* - slices : indicating the number of splits along given axis.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Split : public DirectMapOp {
|
class Split : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Split(Graph* graph, uint32_t axis, std::vector<uint32_t> slices);
|
Split(Graph* graph, uint32_t axis, std::vector<uint32_t> slices);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
#ifndef TIM_VX_OPS_SQUEEZE_H_
|
#ifndef TIM_VX_OPS_SQUEEZE_H_
|
||||||
#define TIM_VX_OPS_SQUEEZE_H_
|
#define TIM_VX_OPS_SQUEEZE_H_
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -38,7 +38,7 @@ namespace ops {
|
||||||
* - axis : the dimensions to squeeze.
|
* - axis : the dimensions to squeeze.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Squeeze : public DirectMapOp {
|
class Squeeze : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Squeeze(Graph* graph, std::vector<uint32_t> axis);
|
Squeeze(Graph* graph, std::vector<uint32_t> axis);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_STACK_H_
|
#ifndef TIM_VX_OPS_STACK_H_
|
||||||
#define TIM_VX_OPS_STACK_H_
|
#define TIM_VX_OPS_STACK_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -37,7 +37,7 @@ namespace ops {
|
||||||
* Dimensions below the dimension specified by axis will be packed together with other inputs.
|
* Dimensions below the dimension specified by axis will be packed together with other inputs.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Stack : public DirectMapOp {
|
class Stack : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Stack(Graph* graph, uint32_t axis, int input_cnt);
|
Stack(Graph* graph, uint32_t axis, int input_cnt);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_STRIDEDSLICE_H_
|
#ifndef TIM_VX_OPS_STRIDEDSLICE_H_
|
||||||
#define TIM_VX_OPS_STRIDEDSLICE_H_
|
#define TIM_VX_OPS_STRIDEDSLICE_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -52,7 +52,7 @@ namespace ops {
|
||||||
* e.g. begin[i] = x, end[i] = x + 1.
|
* e.g. begin[i] = x, end[i] = x + 1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class StridedSlice : public DirectMapOp {
|
class StridedSlice : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
StridedSlice(Graph* graph, const std::vector<int32_t> begin_dims,
|
StridedSlice(Graph* graph, const std::vector<int32_t> begin_dims,
|
||||||
const std::vector<int32_t> end_dims,
|
const std::vector<int32_t> end_dims,
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
#include "tim/vx/types.h"
|
#include "tim/vx/types.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
|
|
@ -43,7 +43,7 @@ namespace ops {
|
||||||
* - spectrogram_length : corresponds to the fixed-size of the memory.
|
* - spectrogram_length : corresponds to the fixed-size of the memory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Svdf : public DirectMapOp {
|
class Svdf : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Svdf(Graph* graph, int32_t rank, int32_t num_units, int32_t spectrogram_length);
|
Svdf(Graph* graph, int32_t rank, int32_t num_units, int32_t spectrogram_length);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_TILE_H_
|
#ifndef TIM_VX_OPS_TILE_H_
|
||||||
#define TIM_VX_OPS_TILE_H_
|
#define TIM_VX_OPS_TILE_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -37,7 +37,7 @@ namespace ops {
|
||||||
* Length must be the same as the number of dimensions in input.
|
* Length must be the same as the number of dimensions in input.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Tile : public DirectMapOp {
|
class Tile : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Tile(Graph* graph, const std::vector<int32_t>& multiples);
|
Tile(Graph* graph, const std::vector<int32_t>& multiples);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
#include "tim/vx/types.h"
|
#include "tim/vx/types.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
|
|
@ -41,7 +41,7 @@ namespace ops {
|
||||||
* - k : Number of top elements to look for along the last dimension.
|
* - k : Number of top elements to look for along the last dimension.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Topk : public DirectMapOp {
|
class Topk : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Topk(Graph* graph, uint32_t k);
|
Topk(Graph* graph, uint32_t k);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_TRANSPOSE_H_
|
#ifndef TIM_VX_OPS_TRANSPOSE_H_
|
||||||
#define TIM_VX_OPS_TRANSPOSE_H_
|
#define TIM_VX_OPS_TRANSPOSE_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -41,7 +41,7 @@ namespace ops {
|
||||||
* 2-D input Tensors.
|
* 2-D input Tensors.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Transpose : public DirectMapOp {
|
class Transpose : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Transpose(Graph* graph, const std::vector<uint32_t>& perm);
|
Transpose(Graph* graph, const std::vector<uint32_t>& perm);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
#define TIM_VX_OPS_UNIDIRECTIONAL_SEQUENCE_GRU_H_
|
#define TIM_VX_OPS_UNIDIRECTIONAL_SEQUENCE_GRU_H_
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
#include "vsi_nn_pub.h"
|
#include "vsi_nn_pub.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
|
|
@ -46,7 +46,7 @@ namespace ops {
|
||||||
* in the False case, it will be [feature, timesteps, batch].
|
* in the False case, it will be [feature, timesteps, batch].
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class UnidirectionalSequenceGRU : public DirectMapOp {
|
class UnidirectionalSequenceGRU : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
enum ActivationType {
|
enum ActivationType {
|
||||||
kNONE = 0,
|
kNONE = 0,
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_UNIDIRECTIONAL_SEQUENCE_LSTM_H_
|
#ifndef TIM_VX_OPS_UNIDIRECTIONAL_SEQUENCE_LSTM_H_
|
||||||
#define TIM_VX_OPS_UNIDIRECTIONAL_SEQUENCE_LSTM_H_
|
#define TIM_VX_OPS_UNIDIRECTIONAL_SEQUENCE_LSTM_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -32,7 +32,7 @@ namespace ops {
|
||||||
* ## Unidirectional sequence lstm
|
* ## Unidirectional sequence lstm
|
||||||
* how to bind input/output: take unidirectional_sequence_lstm_test.cc
|
* how to bind input/output: take unidirectional_sequence_lstm_test.cc
|
||||||
*/
|
*/
|
||||||
class UnidirectionalSequenceLstm: public DirectMapOp {
|
class UnidirectionalSequenceLstm: public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
enum ActivationType {
|
enum ActivationType {
|
||||||
kNONE = 0,
|
kNONE = 0,
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifndef TIM_VX_OPS_UNSTACK_H_
|
#ifndef TIM_VX_OPS_UNSTACK_H_
|
||||||
#define TIM_VX_OPS_UNSTACK_H_
|
#define TIM_VX_OPS_UNSTACK_H_
|
||||||
#include "tim/vx/direct_map_op.h"
|
#include "tim/vx/builtin_op.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace vx {
|
namespace vx {
|
||||||
|
|
@ -37,7 +37,7 @@ namespace ops {
|
||||||
* Negative values wrap around, so the valid range is [-R, R).
|
* Negative values wrap around, so the valid range is [-R, R).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Unstack : public DirectMapOp {
|
class Unstack : public BuiltinOp {
|
||||||
public:
|
public:
|
||||||
Unstack(Graph* graph, int32_t axis, uint32_t output_num);
|
Unstack(Graph* graph, int32_t axis, uint32_t output_num);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "permute_vector.h"
|
#include "permute_vector.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace transform {
|
namespace transform {
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
#define TIM_LAYOUT_INFER_ADDN_LAYOUT_INFERENCE_H_
|
#define TIM_LAYOUT_INFER_ADDN_LAYOUT_INFERENCE_H_
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
#include "tim/vx/ops/addn.h"
|
#include "tim/vx/ops/addn.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
#define TIM_LAYOUT_INFER_ARG_OPS_LAYOUT_INFERENCE_H_
|
#define TIM_LAYOUT_INFER_ARG_OPS_LAYOUT_INFERENCE_H_
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
#include "tim/vx/ops/arg.h"
|
#include "tim/vx/ops/arg.h"
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace transform {
|
namespace transform {
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "permute_vector.h"
|
#include "permute_vector.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace transform {
|
namespace transform {
|
||||||
class Batch2SpaceLayoutInfer : public OpLayoutInfer {
|
class Batch2SpaceLayoutInfer : public OpLayoutInfer {
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "permute_vector.h"
|
#include "permute_vector.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace transform {
|
namespace transform {
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "permute_vector.h"
|
#include "permute_vector.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace transform {
|
namespace transform {
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include "tim/vx/ops/conv2d.h"
|
#include "tim/vx/ops/conv2d.h"
|
||||||
|
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
#include "permute_vector.h"
|
#include "permute_vector.h"
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "permute_vector.h"
|
#include "permute_vector.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
#include "tim/vx/ops/deconv.h"
|
#include "tim/vx/ops/deconv.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "permute_vector.h"
|
#include "permute_vector.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace transform {
|
namespace transform {
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "permute_vector.h"
|
#include "permute_vector.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace transform {
|
namespace transform {
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "permute_vector.h"
|
#include "permute_vector.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace transform {
|
namespace transform {
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "permute_vector.h"
|
#include "permute_vector.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace transform {
|
namespace transform {
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
#define TIM_LAYOUT_INFER_GATHER_LAYOUT_INFERENCE_H_
|
#define TIM_LAYOUT_INFER_GATHER_LAYOUT_INFERENCE_H_
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
#include "tim/vx/ops/gather.h"
|
#include "tim/vx/ops/gather.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
#define TIM_LAYOUT_INFER_GATHER_ND_LAYOUT_INFERENCE_H_
|
#define TIM_LAYOUT_INFER_GATHER_ND_LAYOUT_INFERENCE_H_
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
#include "tim/vx/ops/gathernd.h"
|
#include "tim/vx/ops/gathernd.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include "tim/vx/ops/groupedconv2d.h"
|
#include "tim/vx/ops/groupedconv2d.h"
|
||||||
|
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
#include "permute_vector.h"
|
#include "permute_vector.h"
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
#define TIM_LAYOUT_INFER_L2_NORMALIZATION_LAYOUT_INFERENCE_H_
|
#define TIM_LAYOUT_INFER_L2_NORMALIZATION_LAYOUT_INFERENCE_H_
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
#include "tim/vx/ops/l2normalization.h"
|
#include "tim/vx/ops/l2normalization.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
#define TIM_LAYOUT_INFER_LOGICAL_OPS_LAYOUT_INFERENCE_H_
|
#define TIM_LAYOUT_INFER_LOGICAL_OPS_LAYOUT_INFERENCE_H_
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
#include "tim/vx/ops/logical.h"
|
#include "tim/vx/ops/logical.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
#include "tim/vx/ops/localresponsenormalization.h"
|
#include "tim/vx/ops/localresponsenormalization.h"
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace transform {
|
namespace transform {
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
#include "op_layout_inference.h"
|
#include "op_layout_inference.h"
|
||||||
#include "permute_vector.h"
|
#include "permute_vector.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
#include "tim/vx/ops/transpose.h"
|
#include "tim/vx/ops/transpose.h"
|
||||||
#include "type_utils.h"
|
#include "type_utils.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "permute_vector.h"
|
#include "permute_vector.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace transform {
|
namespace transform {
|
||||||
class PadLayoutInfer : public OpLayoutInfer {
|
class PadLayoutInfer : public OpLayoutInfer {
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "permute_vector.h"
|
#include "permute_vector.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
#include "tim/vx/ops/pool2d.h"
|
#include "tim/vx/ops/pool2d.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "permute_vector.h"
|
#include "permute_vector.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace transform {
|
namespace transform {
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "permute_vector.h"
|
#include "permute_vector.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace transform {
|
namespace transform {
|
||||||
class ResizeLayoutInfer : public OpLayoutInfer {
|
class ResizeLayoutInfer : public OpLayoutInfer {
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
#define TIM_LAYOUT_INFER_REVERSE_LAYOUT_INFERENCE_H_
|
#define TIM_LAYOUT_INFER_REVERSE_LAYOUT_INFERENCE_H_
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
#include "tim/vx/ops/reverse.h"
|
#include "tim/vx/ops/reverse.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
#define TIM_LAYOUT_INFER_SELECT_LAYOUT_INFERENCE_H_
|
#define TIM_LAYOUT_INFER_SELECT_LAYOUT_INFERENCE_H_
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
#include "tim/vx/ops/select.h"
|
#include "tim/vx/ops/select.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "permute_vector.h"
|
#include "permute_vector.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
namespace transform {
|
namespace transform {
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
#define TIM_LAYOUT_INFER_SLICE_LAYOUT_INFERENCE_H_
|
#define TIM_LAYOUT_INFER_SLICE_LAYOUT_INFERENCE_H_
|
||||||
|
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
#include "tim/vx/ops/slice.h"
|
#include "tim/vx/ops/slice.h"
|
||||||
|
|
||||||
namespace tim {
|
namespace tim {
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include "tim/vx/ops/softmax.h"
|
#include "tim/vx/ops/softmax.h"
|
||||||
|
|
||||||
#include "direct_map_op_impl.h"
|
#include "builtin_op_impl.h"
|
||||||
#include "permute_vector.h"
|
#include "permute_vector.h"
|
||||||
#include "ops/op_layout_inference.h"
|
#include "ops/op_layout_inference.h"
|
||||||
|
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue