当前位置: 首页 > news >正文

kuiperInfer学习笔记

kuiperInfer使用的模型格式是PNNX(PyTorch Neural Network Exchange)

PNNX由图结构(Graph)、运算符(Operator)和操作数(Operand)这三种结构组成。

1. Graph 图结构

 Graph是管理计算图中的运算符(Operator)和操作数(Operand)。

class Graph
{Operator* new_operator(const std::string& type, const std::string& name);Operator* new_operator_before(const std::string& type, const std::string& name, const Operator* cur);Operand* new_operand(const torch::jit::Value* v);Operand* new_operand(const std::string& name);Operand* get_operand(const std::string& name);std::vector<Operator*> ops;std::vector<Operand*> operands;
};

2. Operator 运算符结构

class Operator
{
public:std::vector<Operand*> inputs;std::vector<Operand*> outputs;std::string type;std::string name;std::vector<std::string> inputnames;std::map<std::string, Parameter> params;std::map<std::string, Attribute> attrs;
};

3. Operand 操作数结构

class Operand
{
public:void remove_consumer(const Operator* c);Operator* producer;std::vector<Operator*> consumers;int type;std::vector<int> shape;std::string name;std::map<std::string, Parameter> params;
};


http://www.mrgr.cn/news/17942.html

相关文章:

  • 共享自助台球厅小程序系统
  • 平价蓝牙耳机哪个音质好性价比高?四大超值平价机型推荐
  • 开学季儿童护眼台灯怎么选择?盘点央视公布十大护眼灯!
  • vue2和vue3双向绑定的原理
  • Cmake的基本语法操作
  • 基于Java+MySQL实现在线书店订购系统
  • 第11章 第9节 基于软件质量特性的测试(软件评测师)
  • 米家“智能中枢网关”和“智能多模网关”有什么区别?
  • 三十一、gorm快速入门
  • AI Agent开发实战1-Agent开发绪论与国产大模型的架构与工作机制原理
  • 自闭症自言自语会好吗
  • Vue(十一)默认插槽、具名插槽、作用域插槽
  • 同事用10分钟给公司做了一套数据大屏,实力选手非他莫属!
  • 实现一个队列
  • 设施农业气象站
  • js-浏览器沙箱
  • LongWriter环境安装推理测试
  • sportbugs报告路径在linux和windows中的配置差异
  • 要点(Key Ideas)
  • 基于PCL实现RGB-D图像转换为点云