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。

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