rocr: Add hsa-agent Queries for Clock Counters
Support has been added to query the following
HSA_AMD_INFO_GET_CLOCK_COUNTERS agent info exposed through the hsa api
in rocr, rather than the user having to make a direct IOCTL call
through the kernel driver.
Signed-off-by: Sunday Clement <Sunday.Clement@amd.com>
[ROCm/ROCR-Runtime commit: e97d06530e]
Bu işleme şunda yer alıyor:
işlemeyi yapan:
Clement, Sunday
ebeveyn
a62368e2ba
işleme
315b1abaf9
@@ -61,9 +61,10 @@
|
||||
* - 1.8 - hsa_amd_memory_get_preferred_copy_engine
|
||||
* - 1.9 - hsa_amd_portable_export_dmabuf_v2
|
||||
* - 1.10 - hsa_amd_vmem_address_reserve: HSA_AMD_VMEM_ADDRESS_NO_REGISTER
|
||||
* - 1.11 - hsa_amd_agent_info_t: HSA_AMD_AGENT_INFO_CLOCK_COUNTERS
|
||||
*/
|
||||
#define HSA_AMD_INTERFACE_VERSION_MAJOR 1
|
||||
#define HSA_AMD_INTERFACE_VERSION_MINOR 10
|
||||
#define HSA_AMD_INTERFACE_VERSION_MINOR 11
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -476,6 +477,16 @@ typedef enum {
|
||||
HSA_IOMMU_SUPPORT_V2 = 1,
|
||||
} hsa_amd_iommu_version_t;
|
||||
|
||||
/**
|
||||
* @brief Structure containing information on the agent's clock counters.
|
||||
*/
|
||||
typedef struct hsa_amd_clock_counters_s {
|
||||
uint64_t gpu_clock_counter;
|
||||
uint64_t cpu_clock_counter;
|
||||
uint64_t system_clock_counter;
|
||||
uint64_t system_clock_frequency;
|
||||
} hsa_amd_clock_counters_t;
|
||||
|
||||
/**
|
||||
* @brief Agent attributes.
|
||||
*/
|
||||
@@ -685,7 +696,12 @@ typedef enum hsa_amd_agent_info_s {
|
||||
*
|
||||
* The type of this attribute is uint64_t.
|
||||
*/
|
||||
HSA_AMD_AGENT_INFO_SCRATCH_LIMIT_CURRENT = 0xA117
|
||||
HSA_AMD_AGENT_INFO_SCRATCH_LIMIT_CURRENT = 0xA117,
|
||||
/**
|
||||
* Queries the driver for clock counters of the agent.
|
||||
* The type of this attribute is hsa_amd_clock_counters_t.
|
||||
*/
|
||||
HSA_AMD_AGENT_INFO_CLOCK_COUNTERS = 0xA118
|
||||
} hsa_amd_agent_info_t;
|
||||
|
||||
/**
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle