Dispatch Profile Counting Service#
Rocprofiler SDK Developer API 0.5.0
ROCm Profiling API and tools
|
Per-dispatch hardware counter collection service. More...
Data Structures | |
struct | rocprofiler_dispatch_counting_service_data_t |
Kernel dispatch data for profile counting callbacks. More... | |
struct | rocprofiler_dispatch_counting_service_record_t |
ROCProfiler Profile Counting Counter Record Header Information. More... | |
Typedefs | |
typedef void(* | rocprofiler_dispatch_counting_service_callback_t) (rocprofiler_dispatch_counting_service_data_t dispatch_data, rocprofiler_profile_config_id_t *config, rocprofiler_user_data_t *user_data, void *callback_data_args) |
Kernel Dispatch Callback. This is a callback that is invoked before the kernel is enqueued into the HSA queue. What counters to collect for a kernel are set via passing back a profile config (config) in this callback. These counters will be collected and emplaced in the buffer with rocprofiler_buffer_id_t used when setting up this callback. | |
typedef void(* | rocprofiler_profile_counting_record_callback_t) (rocprofiler_dispatch_counting_service_data_t dispatch_data, rocprofiler_record_counter_t *record_data, unsigned long record_count, rocprofiler_user_data_t user_data, void *callback_data_args) |
Counting record callback. This is a callback is invoked when the kernel execution is complete and contains the counter profile data requested in rocprofiler_dispatch_counting_service_callback_t. Only used with rocprofiler_configure_callback_dispatch_counting_service. | |
Functions | |
rocprofiler_status_t | rocprofiler_configure_buffered_dispatch_counting_service (rocprofiler_context_id_t context_id, rocprofiler_buffer_id_t buffer_id, rocprofiler_dispatch_counting_service_callback_t callback, void *callback_data_args) |
Configure buffered dispatch profile Counting Service. Collects the counters in dispatch packets and stores them in a buffer with buffer_id . The buffer may contain packets from more than one dispatch (denoted by correlation id). Will trigger the callback based on the parameters setup in buffer_id_t. | |
rocprofiler_status_t | rocprofiler_configure_callback_dispatch_counting_service (rocprofiler_context_id_t context_id, rocprofiler_dispatch_counting_service_callback_t dispatch_callback, void *dispatch_callback_args, rocprofiler_profile_counting_record_callback_t record_callback, void *record_callback_args) |
Configure buffered dispatch profile Counting Service. Collects the counters in dispatch packets and calls a callback with the counters collected during that dispatch. | |
Detailed Description
Per-dispatch hardware counter collection service.
Data Structure Documentation
◆ rocprofiler_dispatch_counting_service_data_t
struct rocprofiler_dispatch_counting_service_data_t |
Kernel dispatch data for profile counting callbacks.
Definition at line 44 of file dispatch_counting_service.h.
Data Fields | ||
---|---|---|
rocprofiler_correlation_id_t | correlation_id | Correlation ID for this dispatch. |
rocprofiler_kernel_dispatch_info_t | dispatch_info | Dispatch info. |
rocprofiler_timestamp_t | end_timestamp | end time in nanoseconds |
uint64_t | size | Size of this struct. |
rocprofiler_timestamp_t | start_timestamp | start time in nanoseconds |
◆ rocprofiler_dispatch_counting_service_record_t
struct rocprofiler_dispatch_counting_service_record_t |
ROCProfiler Profile Counting Counter Record Header Information.
This is buffer equivalent of rocprofiler_dispatch_counting_service_data_t
Definition at line 58 of file dispatch_counting_service.h.
Data Fields | ||
---|---|---|
rocprofiler_correlation_id_t | correlation_id | Correlation ID for this dispatch. |
rocprofiler_kernel_dispatch_info_t | dispatch_info |
Contains the dispatch_id |
rocprofiler_timestamp_t | end_timestamp | end time in nanoseconds |
uint64_t | num_records | number of rocprofiler_record_counter_t records |
uint64_t | size | Size of this struct. |
rocprofiler_timestamp_t | start_timestamp | start time in nanoseconds |
Typedef Documentation
◆ rocprofiler_dispatch_counting_service_callback_t
typedef void(* rocprofiler_dispatch_counting_service_callback_t) (rocprofiler_dispatch_counting_service_data_t dispatch_data, rocprofiler_profile_config_id_t *config, rocprofiler_user_data_t *user_data, void *callback_data_args) |
Kernel Dispatch Callback. This is a callback that is invoked before the kernel is enqueued into the HSA queue. What counters to collect for a kernel are set via passing back a profile config (config) in this callback. These counters will be collected and emplaced in the buffer with rocprofiler_buffer_id_t used when setting up this callback.
- Parameters
-
[in] dispatch_data
- Parameters
-
[out] config Profile config detailing the counters to collect for this kernel [out] user_data User data unique to this dispatch. Returned in record callback [in] callback_data_args Callback supplied via buffered_dispatch_counting_service
Definition at line 80 of file dispatch_counting_service.h.
◆ rocprofiler_profile_counting_record_callback_t
typedef void(* rocprofiler_profile_counting_record_callback_t) (rocprofiler_dispatch_counting_service_data_t dispatch_data, rocprofiler_record_counter_t *record_data, unsigned long record_count, rocprofiler_user_data_t user_data, void *callback_data_args) |
Counting record callback. This is a callback is invoked when the kernel execution is complete and contains the counter profile data requested in rocprofiler_dispatch_counting_service_callback_t. Only used with rocprofiler_configure_callback_dispatch_counting_service.
- Parameters
-
[in] dispatch_data
- Parameters
-
[in] record_data Counter record data. [in] record_count Number of counter records. [in] user_data User data instance from dispatch callback [in] callback_data_args Callback supplied via buffered_dispatch_counting_service
Definition at line 98 of file dispatch_counting_service.h.
Function Documentation
◆ rocprofiler_configure_buffered_dispatch_counting_service()
rocprofiler_status_t rocprofiler_configure_buffered_dispatch_counting_service | ( | rocprofiler_context_id_t | context_id, |
rocprofiler_buffer_id_t | buffer_id, | ||
rocprofiler_dispatch_counting_service_callback_t | callback, | ||
void * | callback_data_args | ||
) |
Configure buffered dispatch profile Counting Service. Collects the counters in dispatch packets and stores them in a buffer with buffer_id
. The buffer may contain packets from more than one dispatch (denoted by correlation id). Will trigger the callback based on the parameters setup in buffer_id_t.
NOTE: Interface is up for comment as to whether restrictions on agent should be made here (limiting the CB based on agent) or if the restriction should be performed by the tool in rocprofiler_dispatch_counting_service_callback_t (i.e. tool code checking the agent param to see if they want to profile it).
Interface is up for comment as to whether restrictions on agent should be made here (limiting the CB based on agent) or if the restriction should be performed by the tool in rocprofiler_dispatch_counting_service_callback_t (i.e. tool code checking the agent param to see if they want to profile it).
- Parameters
-
[in] context_id context id [in] buffer_id id of the buffer to use for the counting service [in] callback callback to perform when dispatch is enqueued [in] callback_data_args callback data
- Returns
- rocprofiler_status_t
◆ rocprofiler_configure_callback_dispatch_counting_service()
rocprofiler_status_t rocprofiler_configure_callback_dispatch_counting_service | ( | rocprofiler_context_id_t | context_id, |
rocprofiler_dispatch_counting_service_callback_t | dispatch_callback, | ||
void * | dispatch_callback_args, | ||
rocprofiler_profile_counting_record_callback_t | record_callback, | ||
void * | record_callback_args | ||
) |
Configure buffered dispatch profile Counting Service. Collects the counters in dispatch packets and calls a callback with the counters collected during that dispatch.
- Parameters
-
[in] context_id context id [in] dispatch_callback callback to perform when dispatch is enqueued [in] dispatch_callback_args callback data for dispatch callback [in] record_callback Record callback for completed profile data [in] record_callback_args Callback args for record callback
- Returns
- rocprofiler_status_t
Generated by 1.9.8