|
| base::Status | addNet (Net *net, bool is_external) |
| |
| TensorWrapper * | addTensor (device::Tensor *tensor, bool is_external=true, bool is_weight=false) |
| |
| base::Status | copyToInputTensor (device::Tensor *tensor) |
| | 将输入tensor复制到输入tensor More...
|
| |
| op::Op * | createOp (base::DeviceType device_type, const std::string &name, ir::OpType op_type, std::initializer_list< std::string > inputs, std::initializer_list< std::string > outputs) |
| |
| op::Op * | createOp (base::DeviceType device_type, const std::string &name, ir::OpType op_type, std::vector< std::string > &inputs, std::vector< std::string > &outputs) |
| |
| TensorWrapper * | createTensor (const std::string &name, bool is_weight=false) |
| |
| virtual base::Status | deinit () |
| |
| base::Status | dump (std::ostream &oss) |
| |
| base::Status | enableOpt (bool flag) |
| | 设置开启图优化的开关 flag: true 启用图优化 false:关闭图优化 More...
|
| |
| virtual uint64_t | getFlops () |
| | 得到op的flops More...
|
| |
| virtual int64_t | getMemorySize () |
| | 获取推理所需的内存大小 More...
|
| |
| std::shared_ptr< base::Param > | getOpParam (const std::string &op_name) |
| |
| device::Tensor * | getOutputTensorAfterRun (const std::string &name, base::DeviceType device_type, bool is_copy, base::DataFormat data_format) |
| | 获取推理后的输出tensor More...
|
| |
| device::Tensor * | getTensor (const std::string &name) |
| |
| device::Tensor * | getWeight (const std::string &weight) |
| |
| virtual base::Status | inferDataFormat () |
| | 数据格式推理 More...
|
| |
| virtual base::Status | inferDataType () |
| | 类型推理 More...
|
| |
| virtual base::Status | inferShape () |
| | 形状推理 More...
|
| |
| virtual base::Status | init () |
| | 初始化 More...
|
| |
| bool | isDynamicShape () |
| |
| bool | isWeight (const std::string &name) |
| |
| | Net () |
| |
| virtual base::Status | postRun () |
| |
| virtual base::Status | preRun () |
| |
| virtual base::Status | reshape (base::ShapeMap &shape_map) |
| | 重新推理形状,通常在初始化之后、preRun前调用 More...
|
| |
| virtual base::Status | run () |
| |
| base::Status | setDisablePass (std::set< OptPassType >) |
| | 在图优化时禁用这些pass,如果为空则启用全部pass More...
|
| |
| base::Status | setDynamicShape (bool is_dynamic_shape, base::ShapeMap &min_shape, base::ShapeMap &opt_shape, base::ShapeMap &max_shape) |
| |
| base::Status | setEnablePass (std::set< OptPassType >) |
| | 在图优化时仅启用这些pass,如果为空则启用全部pass More...
|
| |
| base::Status | setInterpret (ir::Interpret *interpret) |
| |
| virtual base::Status | setMemory (device::Buffer *buffer) |
| | 设置推理所需的内存(推理内存由外部分配) More...
|
| |
| base::Status | setModelDesc (ir::ModelDesc *model_desc) |
| |
| base::Status | setOpParam (const std::string &op_name, std::shared_ptr< base::Param > param) |
| |
| base::Status | setTensorPoolMemory (bool is_external) |
| |
| base::Status | setTensorPoolType (TensorPoolType tensor_pool_type) |
| |
| base::Status | setWorkers (int worker_num, std::vector< base::DeviceType > device_types=std::vector< base::DeviceType >()) |
| | 设置推理并行数量 More...
|
| |
| virtual | ~Net () |
| |
| virtual base::Status | allocateWorkspace () |
| |
| virtual base::Status | checkOrAllocOutput () |
| | 检查输出tensor More...
|
| |
| std::vector< device::Tensor * > | getAllInput () |
| |
| std::vector< std::string > | getAllInputName () |
| |
| std::vector< device::Tensor * > | getAllOutput () |
| |
| std::vector< std::string > | getAllOutputName () |
| |
| bool | getConstructed () |
| |
| bool | getDebugFlag () |
| |
| base::DeviceType | getDeviceType () |
| |
| bool | getInitialized () |
| |
| device::Tensor * | getInput (int index=0) |
| |
| std::string | getInputName (int index=0) |
| |
| device::Tensor * | getInputTensor (const std::string &name) |
| |
| std::string | getName () |
| |
| ir::OpType | getOpType () |
| |
| device::Tensor * | getOutput (int index=0) |
| |
| std::string | getOutputName (int index=0) |
| |
| device::Tensor * | getOutputTensor (const std::string &name) |
| |
| base::ParallelType | getParallelType () |
| |
| virtual std::shared_ptr< base::Param > | getParam () |
| |
| base::PrecisionType | getPrecisionType () |
| |
| device::Stream * | getStream () |
| |
| bool | getTimeProfileFlag () |
| |
| virtual uint64_t | getWorkspaceSize () |
| | 得到op的workspace大小 note: op在运行时的workspace大小,在输入确定后调用 eg:例如Conv,当存在padding时,需要分配额外的内存,存放padding后的内存 More...
|
| |
| bool | isRunning () |
| |
| | Op () |
| |
| base::Status | replaceInputTensor (const std::string &name, device::Tensor *tensor) |
| |
| base::Status | replaceOutputTensor (const std::string &name, device::Tensor *tensor) |
| |
| base::Status | rmInput (device::Tensor *tensor) |
| |
| base::Status | setAllInput (std::vector< device::Tensor * > inputs) |
| |
| base::Status | setAllInputName (std::initializer_list< std::string >) |
| |
| base::Status | setAllInputName (std::vector< std::string > &) |
| |
| base::Status | setAllOutput (std::vector< device::Tensor * > outputs) |
| |
| base::Status | setAllOutputName (std::initializer_list< std::string >) |
| |
| base::Status | setAllOutputName (std::vector< std::string > &) |
| |
| void | setDebugFlag (bool flag) |
| |
| base::Status | setDeviceType (base::DeviceType device_type) |
| |
| void | setInitializedFlag (bool flag) |
| |
| void | setInnerFlag (bool flag) |
| |
| virtual base::Status | setInput (device::Tensor *input) |
| |
| base::Status | setInput (device::Tensor *input, int index) |
| |
| base::Status | setName (std::string name) |
| |
| base::Status | setOpType (ir::OpType op_type) |
| |
| virtual base::Status | setOutput (device::Tensor *output) |
| |
| base::Status | setOutput (device::Tensor *output, int index) |
| |
| base::Status | setParallelType (const base::ParallelType ¶lle_type) |
| |
| virtual base::Status | setParam (std::shared_ptr< base::Param > param) |
| |
| virtual base::Status | setPrecisionType (base::PrecisionType precision_type) |
| | 设置精度类型 精度不同,计算方式不同,内存分配不同 More...
|
| |
| void | setRunningFlag (bool flag) |
| |
| void | setStream (device::Stream *stream) |
| |
| void | setTimeProfileFlag (bool flag) |
| |
| virtual void | setWorkspace (void *workspace) |
| |
| virtual | ~Op () |
| |
Definition at line 15 of file net.h.