TVM代码库结构概述

前言

在看一个开源的项目,之前必须要先了解其代码库的组织结构以及每部分的功能作用。

tvm根目录

首先在TVM的的根目录下,有以下几个子目录,它们一起构成了大量的代码库。
在这里插入图片描述

  1. Src:C++ code for operator compilation and deployment runtimes.
    用于运算符编译和部署运行时的C++代码。

  2. src/relay:Implementation of Relay, a new IR for deep learning framework superseding nnvm below.
    Relay的实现,一种用于深度学习框架的新的IR(中间表示),它取代了下面的nnvm。我之后对tvm的讲解以及修改都是基于relay。

  3. python:Python frontend that wraps C++ functions and objects implemented in src.
    Python前端,它封装了在src中实现的c++函数和对象。

  4. topi:Compute definitions and backend schedules for standard neural network operators.
    标准神经网络operators的计算定义和后端调度。

  5. nnvm:C++ code and Python frontend for graph optimization and compilation. After the introduction of Relay, it remains in the codebase for backward compatibility.
    用于图形优化和编译的C++代码和Python前端。在引入Relay之后,为了向后兼容,它仍然保留在代码库中。

  6. include:Header files in include are public APIs that share across modules.
    include中的头文件是是跨模块共享的公共API。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章