Mercurial > hg > Members > innparusu > slides
diff 2017/2017_10_31/slide.md @ 28:382cd93f2a60
Update slide
author | Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 31 Oct 2017 18:16:16 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/2017/2017_10_31/slide.md Tue Oct 31 18:16:16 2017 +0900 @@ -0,0 +1,64 @@ +title: Gears OS +author: Tatsuki IHA +profile: +lang: Japanese +code-engine: coderay + +## 研究目的 +- 当研究室では 処理の単位を Code Gear、 データの単位を Data Gear を用いて 信頼性が高い並列処理を行う Gears OS を開発している +- Gears OS では Task を Code Gear と実行するときに必要な Input Data Gear と出力するための Output Data Gear の組で表現される。 Input Data Gear/Output Data Gear によって依存関係が決定し、それにそって並列実行を行う. +- 信頼性の確保はモデルチェック、検証等を使用して行う。この信頼性のための計算は通常の計算とは別の階層のメタ計算として記述する。 +- また、 メタ計算は信頼性の他に CPU, GPU などの実行環境の切り替え, データ拡張等の柔軟性を提供する。 +- 本研究では、 Gears OS の並列処理機構の実装を行う。また、並列処理の検証をメタ計算として記述することで、 並列処理の信頼性を保証する。 + +## 今週 +- cuda 関連のものを Interface にする(まだ途中) +- Jenkins の update + +## Executor interface +- 今は実装としてはCuda のみ, OpenCL とかも実装する +- 将来的にはパイプラインで乗っけられるようにするために methodは + - read + - exec + - write +- task, buffer は引数として取る + +``` +typedef struct Executor<Impl>{ + union Data* Executor; + struct Context* task; + struct Buffer* buffer; + __code read(Impl* executor, struct Context* task, struct Buffer* buffer, __code next(...)); + __code exec(Impl* executor, struct Context* task, struct Buffer* buffer, __code next(...)); + __code write(Impl* executor, struct Context* task, struct Buffer* buffer, __code next(...)); +} +``` + +``` +struct CudaExecutor { + void** kernelParams; +} CudaExecutor; +``` + + +## CudaExecutor +- create は他のinterface の実装と基本同じ +- read, write, exec 辺りは前回の発表のコードを CG に書き換え + - 前回注意された for の中で calloc 等は修正 + - 最終的には CuDevicePtr とかも ALLOCATE(context, CuDevicePtr) みたいに取れるようにしたい + +``` +Executor* createCudaExecutor(struct Context* context) { + struct Executor* executor = new Executor(); + struct CudaExecutor* cudaExecutor = new CudaExecutor(); + executor->executor = (union Data*)cudaExecutor; + executor->read = C_readCudaExecutor; + executor->exec = C_execCudaExecutor; + executor->write = C_writeCudaExecutor; + return executor; +} +``` + +## まだできてない +- このinterface を呼び出す部分(基本的には関数呼び出しの場所をgoto にしてきちんと継続すればいいはず) +- このinteface のメソッド呼び出しは stub でやるべき?