Adding start and end timestamp columns in csv (#1128)
* Adding start and end timestamp columns in csv * Adding assert check for the counter timestamps --------- Co-authored-by: Gopesh Bhardwaj <gopesh.bhardwaj@amd.com>
Šī revīzija ir iekļauta:
revīziju iesūtīja
GitHub
vecāks
28a6918b33
revīzija
673c21c6db
@@ -103,6 +103,7 @@ Full documentation for ROCprofiler-SDK is available at [Click Here](source/docs/
|
||||
- Support `--marker-trace` on application linked against old (roctracer) ROCTx (i.e. `libroctx64.so`)
|
||||
- Replaced deprecated hipHostMalloc and hipHostFree functions with hipExtHostAlloc and hipFreeHost in when ROCm version is greater than or equal to 6.3
|
||||
- Updated `rocprofv3` `--help` options.
|
||||
- Adding start and end timestamp columns to the counter collection csv output.
|
||||
|
||||
### Fixes
|
||||
|
||||
|
||||
@@ -616,11 +616,11 @@ To collect counters for the kernels matching the filters specified in the preced
|
||||
rocprofv3 -i input.yml -- <app_relative_path>
|
||||
|
||||
$ cat pass_1/312_counter_collection.csv
|
||||
"Correlation_Id","Dispatch_Id","Agent_Id","Queue_Id","Process_Id","Thread_Id","Grid_Size","Kernel_Name","Workgroup_Size","LDS_Block_Size","Scratch_Size","VGPR_Count","SGPR_Count","Counter_Name","Counter_Value"
|
||||
4,4,1,1,36499,36499,1048576,"divide_kernel(float*, float const*, float const*, int, int)",64,0,0,12,16,"SQ_WAVES",16384
|
||||
8,8,1,2,36499,36499,1048576,"divide_kernel(float*, float const*, float const*, int, int)",64,0,0,12,16,"SQ_WAVES",16384
|
||||
12,12,1,3,36499,36499,1048576,"divide_kernel(float*, float const*, float const*, int, int)",64,0,0,12,16,"SQ_WAVES",16384
|
||||
16,16,1,4,36499,36499,1048576,"divide_kernel(float*, float const*, float const*, int, int)",64,0,0,12,16,"SQ_WAVES",16384
|
||||
"Correlation_Id","Dispatch_Id","Agent_Id","Queue_Id","Process_Id","Thread_Id","Grid_Size","Kernel_Name","Workgroup_Size","LDS_Block_Size","Scratch_Size","VGPR_Count","SGPR_Count","Counter_Name","Counter_Value","Start_Timestamp","End_Timestamp"
|
||||
4,4,1,1,36499,36499,1048576,"divide_kernel(float*, float const*, float const*, int, int)",64,0,0,12,16,"SQ_WAVES",16384,2228955885095594,2228955885119754
|
||||
8,8,1,2,36499,36499,1048576,"divide_kernel(float*, float const*, float const*, int, int)",64,0,0,12,16,"SQ_WAVES",16384,2228955885095594,2228955885119754
|
||||
12,12,1,3,36499,36499,1048576,"divide_kernel(float*, float const*, float const*, int, int)",64,0,0,12,16,"SQ_WAVES",16384,2228955892986914,2228955893006114
|
||||
16,16,1,4,36499,36499,1048576,"divide_kernel(float*, float const*, float const*, int, int)",64,0,0,12,16,"SQ_WAVES",16384,2228955892986914,2228955893006114
|
||||
|
||||
.. _output-file-fields:
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ struct csv_encoder
|
||||
using api_csv_encoder = csv_encoder<7>;
|
||||
using agent_info_csv_encoder = csv_encoder<53>;
|
||||
using kernel_trace_csv_encoder = csv_encoder<18>;
|
||||
using counter_collection_csv_encoder = csv_encoder<16>;
|
||||
using counter_collection_csv_encoder = csv_encoder<18>;
|
||||
using memory_copy_csv_encoder = csv_encoder<7>;
|
||||
using marker_csv_encoder = csv_encoder<7>;
|
||||
using list_basic_metrics_csv_encoder = csv_encoder<5>;
|
||||
|
||||
@@ -483,7 +483,9 @@ generate_csv(tool_table* too
|
||||
"VGPR_Count",
|
||||
"SGPR_Count",
|
||||
"Counter_Name",
|
||||
"Counter_Value"}};
|
||||
"Counter_Value",
|
||||
"Start_Timestamp",
|
||||
"End_Timestamp"}};
|
||||
for(const auto& record : data)
|
||||
{
|
||||
auto kernel_id = record.dispatch_data.dispatch_info.kernel_id;
|
||||
@@ -525,7 +527,9 @@ generate_csv(tool_table* too
|
||||
record.arch_vgpr_count,
|
||||
record.sgpr_count,
|
||||
itr.first,
|
||||
itr.second);
|
||||
itr.second,
|
||||
record.dispatch_data.start_timestamp,
|
||||
record.dispatch_data.end_timestamp);
|
||||
}
|
||||
ofs << row_ss.str();
|
||||
}
|
||||
|
||||
@@ -60,6 +60,7 @@ def test_counter_values(input_data):
|
||||
agent = get_agent(agent_id)
|
||||
scaling_factor = get_scaling_factor(agent_id)
|
||||
assert agent is not None, f"itr={itr}\nagent={agent}"
|
||||
assert itr["start_timestamp"] < itr["end_timestamp"]
|
||||
for ritr in itr["records"]:
|
||||
value = ritr["counter_value"]
|
||||
if int(round(value, 0)) > 0:
|
||||
|
||||
Atsaukties uz šo jaunā problēmā
Block a user