Vengineerの戯言

人生は短いけど、長いです。人生を楽しみましょう!

GlowのRuntimeの図が更新されていたよ

 

GlowのRuntimeが更新されていますよ。

 

Runtimeのソースコードの場所には、
 ・HostManager
 ・Executor
 ・Provisioner
の3つしかないけど、PartitionerDeviceManagerが必要です。

 

モデルを分割するのが Partitionerで、分割したグラフの実行するのが Executor、Executorが各デバイス(アクセラレータ)に対応した DeviceManager を起動する感じ。

 

で、Provisioner は何をするのか?

 

    The Provisioner takes in the list of executionDAG and assigns sub-function to specific devices. 
    The Provisioner compiles each sub-function and stores them in a map, 
    it then passes a pointer to the compiledFunction and a Module reference to the DeviceManager 
    to initialize the function on the device. 

    It fills in the remaining fields of the excecutionDAGs and returns them in a list to the HostManager.
とありますね。

 

分割したグラフから各デバイスへのサブ関数への割り当てを行い、サブ関数のコンパイルをして、
DeviceManagerにコンパイル済みの関数(compiledFunction)をわたすして、HostManagerに渡す。。。

 

HostManagerが全体を管理。。。。

 

HostManagerのaddNetworkメソッドの中で、Provisionerのprovisionを呼んでいますね。

 

Partitionもこの addNetwork メソッドの中で、provisionの前にpartitioner.Partition()を呼んでいますね。