rocprofiler_kernel_dispatch_info_t + header record for buffered counter collection (#758)

* Update include/rocprofiler-sdk

- defines.h
  - ROCPROFILER_VERSION_10_0 -> ROCPROFILER_SDK_VERSION_0_0
- fwd.h
  - rocprofiler_counter_record_kind_t
  - rocprofiler_kernel_dispatch_info_t
  - rocprofiler_record_counter_t
    - has dispatch id instead of correlation id
  - rocprofiler_counter_info_v0_t
    - added rocprofiler_counter_id_t field
    - added is_constant field
    - reordered better packing
- dispatch_profile.h
  - added rocprofiler_profile_counting_dispatch_record_t for use as a header record for rocprofiler_profile_counting_dispatch_data_t
- callback_tracing.h
  - rocprofiler_callback_tracing_kernel_dispatch_data_t uses rocprofiler_kernel_dispatch_info_t
- buffer_tracing.h
  - rocprofiler_buffer_tracing_kernel_dispatch_record_t uses rocprofiler_kernel_dispatch_info_t

* Update lib/rocprofiler-sdk/*

- transition to rocprofiler_kernel_dispatch_info_t
- set id and is_constant values for rocprofiler_counter_info_v0_t in rocprofiler_query_counter_info

* Update lib/rocprofiler-sdk-tool

- transition to rocprofiler_kernel_dispatch_info_t

* Update lib/rocprofiler-sdk/counters/tests/core.cpp

- transition to rocprofiler_kernel_dispatch_info_t

* Update samples

- transition to rocprofiler_kernel_dispatch_info_t
- transition to rocprofiler_counter_record_kind_t

* Update tests

- transition to rocprofiler_kernel_dispatch_info_t
- transition to rocprofiler_counter_record_kind_t
- improve integration test validation for counter-collection
- update serialization for new/additional types

* Fix tests/counter-collection/validate.py

- loosen restrictions on the length of counter description

* Update include/rocprofiler-sdk/buffer_tracing.h

- remove accidental packed attribute

* Update lib/rocprofiler-sdk/counters/xml/derived_counters.xml

- Add description for TCC_TAG_STALL_sum (reference: https://rocm.docs.amd.com/en/develop/conceptual/gpu-arch/mi300-mi200-performance-counters.html)

* Update tests/page-migration/validate.py
Этот коммит содержится в:
Jonathan R. Madsen authored and GitHub committed 2024-04-12 17:30:34 -05:00
1 родитель fd3d97287c
Коммит 07537b6231
23 files changed
+489 -273

No files matched your search

+8 -7
Просмотреть файл
@@ -180,7 +180,8 @@ buffered_callback(rocprofiler_context_id_t,
for(size_t i = 0; i < num_headers; ++i)
{
auto* header = headers[i];
if(header->category == ROCPROFILER_BUFFER_CATEGORY_COUNTERS && header->kind == 0)
if(header->category == ROCPROFILER_BUFFER_CATEGORY_COUNTERS &&
header->kind == ROCPROFILER_COUNTER_RECORD_VALUE)
{
// Print the returned counter data.
auto* record = static_cast<rocprofiler_record_counter_t*>(header->payload);
@@ -380,11 +381,11 @@ user_dispatch_cb(rocprofiler_profile_counting_dispatch_data_t dispatch_data,
{
expected_dispatch& expected = *static_cast<expected_dispatch*>(callback_data_args);
auto agent_id = dispatch_data.agent_id;
auto queue_id = dispatch_data.queue_id;
auto agent_id = dispatch_data.dispatch_info.agent_id;
auto queue_id = dispatch_data.dispatch_info.queue_id;
auto correlation_id = dispatch_data.correlation_id;
auto kernel_id = dispatch_data.kernel_id;
auto dispatch_id = dispatch_data.dispatch_id;
auto kernel_id = dispatch_data.dispatch_info.kernel_id;
auto dispatch_id = dispatch_data.dispatch_info.dispatch_id;
EXPECT_EQ(sizeof(rocprofiler_profile_counting_dispatch_data_t), dispatch_data.size);
EXPECT_EQ(expected.kernel_id, kernel_id);
@@ -394,8 +395,8 @@ user_dispatch_cb(rocprofiler_profile_counting_dispatch_data_t dispatch_data,
EXPECT_EQ(expected.correlation_id.internal, correlation_id.internal);
EXPECT_EQ(expected.correlation_id.external.ptr, correlation_id.external.ptr);
EXPECT_EQ(expected.correlation_id.external.value, correlation_id.external.value);
EXPECT_EQ(expected.workgroup_size, dispatch_data.workgroup_size);
EXPECT_EQ(expected.grid_size, dispatch_data.grid_size);
EXPECT_EQ(expected.workgroup_size, dispatch_data.dispatch_info.workgroup_size);
EXPECT_EQ(expected.grid_size, dispatch_data.dispatch_info.grid_size);
ASSERT_NE(config, nullptr);
config->handle = expected.id.handle;