add hsaKmtGetRuntimeCapabilities API

Queries for runtime capabilities after its being enabled

Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Change-Id: I098c0e9862c0c1d5e304b111cdc281c0ccd09691


[ROCm/ROCR-Runtime commit: 5e0a32d7b3]
This commit is contained in:
Alex Sierra
2023-03-27 15:47:55 -05:00
parent ab3b0098ba
commit b5ba77994a
4 changed files with 16 additions and 1 deletions
+6
View File
@@ -728,6 +728,12 @@ HSAKMT_STATUS
HSAKMTAPI
hsaKmtRuntimeDisable(void);
HSAKMT_STATUS
HSAKMTAPI
hsaKmtGetRuntimeCapabilities(
HSAuint32 *caps_mask // OUT
);
/**
Gets GPU and CPU clock counters for particular Node
*/
@@ -893,6 +893,7 @@ typedef enum HSA_DBG_NODE_CONTROL {
HSA_DBG_NODE_CONTROL_FLAG_MAX = 0x01
} HSA_DBG_NODE_CONTROL;
#define HSA_RUNTIME_ENABLE_CAPS_SUPPORTS_CORE_DUMP_MASK 0x80000000
//This structure is hardware specific and may change in the future
typedef struct _HsaDbgWaveMsgAMDGen2
+8 -1
View File
@@ -31,7 +31,7 @@
#include <unistd.h>
static bool *is_device_debugged;
static uint32_t runtime_capabilities_mask = 0;
HSAKMT_STATUS init_device_debugging_memory(unsigned int NumNodes)
{
@@ -324,6 +324,7 @@ HSAKMT_STATUS HSAKMTAPI hsaKmtRuntimeEnable(void *rDebug,
else
return HSAKMT_STATUS_ERROR;
}
runtime_capabilities_mask= args.capabilities_mask;
return HSAKMT_STATUS_SUCCESS;
}
@@ -344,3 +345,9 @@ HSAKMT_STATUS HSAKMTAPI hsaKmtRuntimeDisable(void)
return HSAKMT_STATUS_SUCCESS;
}
HSAKMT_STATUS HSAKMTAPI hsaKmtGetRuntimeCapabilities(HSAuint32 *caps_mask)
{
*caps_mask = runtime_capabilities_mask;
return HSAKMT_STATUS_SUCCESS;
}
+1
View File
@@ -61,6 +61,7 @@ hsaKmtGetQueueInfo;
hsaKmtAllocQueueGWS;
hsaKmtRuntimeEnable;
hsaKmtRuntimeDisable;
hsaKmtGetRuntimeCapabilities;
hsaKmtSPMAcquire;
hsaKmtSPMRelease;
hsaKmtSPMSetDestBuffer;