Skip to content

Commit

Permalink
Updating OneAPI support, still examining timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
khuck committed Jun 28, 2022
1 parent f2070c0 commit 9a14556
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/apex/apex_level0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,26 @@ void EnableProfiling() {
DEBUG_PRINT("APEX: Real CPU timestamp= %ld \n",first_clock_timestamp);
DEBUG_PRINT("APEX: CPU delta= %ld \n",cpu_delta);
DEBUG_PRINT("APEX: GPU delta= %ld \n",gpu_delta);
utils::ze::GetDeviceTimestamps(device, &first_cpu_timestamp, &first_gpu_timestamp);
first_clock_timestamp = profiler::now_ns();
DEBUG_PRINT("APEX: Second CPU timestamp= %ld \n",first_cpu_timestamp);
DEBUG_PRINT("APEX: Second GPU timestamp= %ld \n",first_gpu_timestamp);
DEBUG_PRINT("APEX: Real CPU timestamp= %ld \n",first_clock_timestamp);
utils::ze::GetDeviceTimestamps(device, &first_cpu_timestamp, &first_gpu_timestamp);
first_clock_timestamp = profiler::now_ns();
DEBUG_PRINT("APEX: Third CPU timestamp= %ld \n",first_cpu_timestamp);
DEBUG_PRINT("APEX: Third GPU timestamp= %ld \n",first_gpu_timestamp);
DEBUG_PRINT("APEX: Real CPU timestamp= %ld \n",first_clock_timestamp);
utils::ze::GetDeviceTimestamps(device, &first_cpu_timestamp, &first_gpu_timestamp);
first_clock_timestamp = profiler::now_ns();
DEBUG_PRINT("APEX: Fourth CPU timestamp= %ld \n",first_cpu_timestamp);
DEBUG_PRINT("APEX: Fourth GPU timestamp= %ld \n",first_gpu_timestamp);
DEBUG_PRINT("APEX: Real CPU timestamp= %ld \n",first_clock_timestamp);
utils::ze::GetDeviceTimestamps(device, &first_cpu_timestamp, &first_gpu_timestamp);
first_clock_timestamp = profiler::now_ns();
DEBUG_PRINT("APEX: Fifth CPU timestamp= %ld \n",first_cpu_timestamp);
DEBUG_PRINT("APEX: Fifth GPU timestamp= %ld \n",first_gpu_timestamp);
DEBUG_PRINT("APEX: Real CPU timestamp= %ld \n",first_clock_timestamp);

// For API calls, we create a new task and trigger the start/stop based on its
// timestamps.
Expand Down
1 change: 1 addition & 0 deletions src/scripts/apex_exec
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ while (( "$#" )); do
;;
--apex:level0)
export APEX_ENABLE_LEVEL0=1
export ZE_ENABLE_TRACING_LAYER=1
shift
;;
--apex:hip_counters)
Expand Down

0 comments on commit 9a14556

Please sign in to comment.