Device Profiling API#
Data Structures | |
struct | rocprofiler_counter_value_t |
struct | rocprofiler_device_profile_metric_t |
Detailed Description
Function Documentation
◆ rocprofiler_device_profiling_session_create()
ROCPROFILER_API rocprofiler_status_t rocprofiler_device_profiling_session_create | ( | const char ** | counter_names, |
uint64_t | num_counters, | ||
rocprofiler_session_id_t * | session_id, | ||
int | cpu_index, | ||
int | gpu_index | ||
) |
Create a device profiling session.
A device profiling session allows the user to profile the GPU device for counters irrespective of the running applications on the GPU. This is different from application profiling. device profiling session doesn't care about the host running processes and threads. It directly provides low level profiling information.
- Parameters
-
[in] counter_names The names of the counters to be collected. [in] num_counters The number of counters specifief to be collected [out] session_id Pointer to the created session id. [in] cpu_index index of the cpu to be used [in] gpu_index index of the gpu to be used
- Return values
-
ROCPROFILER_STATUS_SUCCESS The function has been executed successfully.
◆ rocprofiler_device_profiling_session_destroy()
ROCPROFILER_API rocprofiler_status_t rocprofiler_device_profiling_session_destroy | ( | rocprofiler_session_id_t | session_id | ) |
Destroy the device profiling session that was created previously.
- Parameters
-
[in] session_id session id of the session to start
- Return values
-
ROCPROFILER_STATUS_SUCCESS The function has been executed successfully.
◆ rocprofiler_device_profiling_session_poll()
ROCPROFILER_API rocprofiler_status_t rocprofiler_device_profiling_session_poll | ( | rocprofiler_session_id_t | session_id, |
rocprofiler_device_profile_metric_t * | data | ||
) |
Poll the device profiling session to read counters from the GPU device.
This will read out the values of the counters from the GPU device at the specific instant when this API is called. This is a thread-blocking call. Any thread that calls this API will have to wait until the counter values are being read out.
- Parameters
-
[in] session_id session id of the session to start [out] data records of counter data read out from device
- Return values
-
ROCPROFILER_STATUS_SUCCESS The function has been executed successfully.
◆ rocprofiler_device_profiling_session_start()
ROCPROFILER_API rocprofiler_status_t rocprofiler_device_profiling_session_start | ( | rocprofiler_session_id_t | session_id | ) |
Start the device profiling session that was created previously.
This will enable the GPU device to start incrementing counters
- Parameters
-
[in] session_id session id of the session to start
- Return values
-
ROCPROFILER_STATUS_SUCCESS The function has been executed successfully.
◆ rocprofiler_device_profiling_session_stop()
ROCPROFILER_API rocprofiler_status_t rocprofiler_device_profiling_session_stop | ( | rocprofiler_session_id_t | session_id | ) |
Stop the device profiling session that was created previously.
This will inform the GPU device to stop counters collection.
- Parameters
-
[in] session_id session id of the session to start
- Return values
-
ROCPROFILER_STATUS_SUCCESS The function has been executed successfully.