Dispatch counting service#
-
typedef void (*rocprofiler_dispatch_counting_service_cb_t)(rocprofiler_dispatch_counting_service_data_t dispatch_data, rocprofiler_counter_config_id_t *config, rocprofiler_user_data_t *user_data, void *callback_data_args)#
(experimental) 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.
- Param dispatch_data:
[in]
- Param config:
[out] Profile config detailing the counters to collect for this kernel
- Param user_data:
[out] User data unique to this dispatch. Returned in record callback
- Param callback_data_args:
[in] Callback supplied via buffered_dispatch_counting_service
-
typedef void (*rocprofiler_dispatch_counting_record_cb_t)(rocprofiler_dispatch_counting_service_data_t dispatch_data, rocprofiler_counter_record_t *record_data, unsigned long record_count, rocprofiler_user_data_t user_data, void *callback_data_args)#
(experimental) 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_cb_t. Only used with rocprofiler_configure_callback_dispatch_counting_service.
- Param dispatch_data:
[in]
- Param record_data:
[in] Counter record data.
- Param record_count:
[in] Number of counter records.
- Param user_data:
[in] User data instance from dispatch callback
- Param callback_data_args:
[in] Callback supplied via buffered_dispatch_counting_service
-
rocprofiler_status_t rocprofiler_configure_buffer_dispatch_counting_service(rocprofiler_context_id_t context_id, rocprofiler_buffer_id_t buffer_id, rocprofiler_dispatch_counting_service_cb_t callback, void *callback_data_args)#
(experimental) 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_cb_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_cb_t (i.e. tool code checking the agent param to see if they want to profile it).
- Parameters:
context_id – [in] context id
buffer_id – [in] id of the buffer to use for the counting service
callback – [in] callback to perform when dispatch is enqueued
callback_data_args – [in] callback data
- Returns:
-
rocprofiler_status_t rocprofiler_configure_callback_dispatch_counting_service(rocprofiler_context_id_t context_id, rocprofiler_dispatch_counting_service_cb_t dispatch_callback, void *dispatch_callback_args, rocprofiler_dispatch_counting_record_cb_t record_callback, void *record_callback_args)#
(experimental) Configure buffered dispatch profile Counting Service. Collects the counters in dispatch packets and calls a callback with the counters collected during that dispatch.
- Parameters:
context_id – [in] context id
dispatch_callback – [in] callback to perform when dispatch is enqueued
dispatch_callback_args – [in] callback data for dispatch callback
record_callback – [in] Record callback for completed profile data
record_callback_args – [in] Callback args for record callback
- Returns:
-
struct rocprofiler_dispatch_counting_service_data_t#
- #include <rocprofiler-sdk/dispatch_counting_service.h>
(experimental) Kernel dispatch data for profile counting callbacks.
-
struct rocprofiler_dispatch_counting_service_record_t#
- #include <rocprofiler-sdk/dispatch_counting_service.h>
(experimental) ROCProfiler Profile Counting Counter Record Header Information
This is buffer equivalent of rocprofiler_dispatch_counting_service_data_t