oneapi-src / oneapi-src/oneAPI-samples
The Execution Time Difference Between Event_Profiling and Steady Clock
まだ誰も着手していません。
- 主要言語
- C++
- スター
- 1.2k
- フォーク
- 745
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I am trying to profile my code and I am getting different results each time I run the code.
auto start = std::chrono::steady_clock::now();
foo()
auto end = std::chrono::steady_clock::now();
time = std::chrono::duration_cast<std::chrono::nanoseconds>(end - start).count();
why is this giving me different results than using
start_kernel_time = event.get_profiling_info<info::event_profiling::command_start>();
end_kernel_time = event.get_profiling_info<info::event_profiling::command_end>();
time_kernel = (end_kernel_time - start_kernel_time) / kNs; // kNs = 1e9
I run the code several times and interesting thing is steady_clock version first printed out 6.7 seconds and then in the second run printed out 0.07 seconds ( unrealistic) then the event profiling was printed the ~0.64 seconds which made more sense. Why it is different ?
I am using oneapi 2023 with icpx compiler
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ソースファイル、テスト、サンプルのエントリポイントは指定されていません。まず、記載されている oneAPI 2023 と icpx のセットアップで2つのタイミングスニペットを再現し、次にホストの steady-clock の間隔と event_profiling command_start および command_end を比較してください。不一致の原因と、実行時間を測定する信頼できる方法を文書化できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cpp
- 領域
- performance
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100