From e3d09e30dcd3a87b29fd3ce051e864b2de7a1255 Mon Sep 17 00:00:00 2001 From: Jonathan Kim Date: Wed, 26 Feb 2025 14:00:30 -0500 Subject: [PATCH] hsakmt: Expose per-SDMA queue reset capabilities Expose new capabilities field that flags per-sdma queue reset support. --- libhsakmt/include/hsakmt/hsakmttypes.h | 11 +++++++++++ libhsakmt/src/topology.c | 2 ++ 2 files changed, 13 insertions(+) diff --git a/libhsakmt/include/hsakmt/hsakmttypes.h b/libhsakmt/include/hsakmt/hsakmttypes.h index 4d1ce15205..41dae8d99e 100644 --- a/libhsakmt/include/hsakmt/hsakmttypes.h +++ b/libhsakmt/include/hsakmt/hsakmttypes.h @@ -222,6 +222,16 @@ typedef union } ui32; } HSA_CAPABILITY; +typedef union +{ + HSAuint32 Value; + struct + { + unsigned int PerSDMAQueueResetSupported : 1; // Indicates per-sdma queue reset supported + unsigned int Reserved : 31; // Reserved + } ui32; +} HSA_CAPABILITY2; + // Debug Properties and values // HSA runtime may expose a subset of the capabilities outlined to the applicati typedef union @@ -281,6 +291,7 @@ typedef struct _HsaNodeProperties // units available on this node HSA_CAPABILITY Capability; // see above + HSA_CAPABILITY2 Capability2; // see above HSAuint32 MaxWavesPerSIMD; // This identifies the max. number of launched waves per SIMD. // If NumFComputeCores is 0, this value is ignored. diff --git a/libhsakmt/src/topology.c b/libhsakmt/src/topology.c index 751305054b..6ae2106ca3 100644 --- a/libhsakmt/src/topology.c +++ b/libhsakmt/src/topology.c @@ -1139,6 +1139,8 @@ static HSAKMT_STATUS topology_sysfs_get_node_props(uint32_t node_id, props->FComputeIdLo = (uint32_t)prop_val; else if (strcmp(prop_name, "capability") == 0) props->Capability.Value = (uint32_t)prop_val; + else if (strcmp(prop_name, "capability2") == 0) + props->Capability2.Value = (uint32_t)prop_val; else if (strcmp(prop_name, "debug_prop") == 0) props->DebugProperties.Value = (uint64_t)prop_val; else if (strcmp(prop_name, "max_waves_per_simd") == 0)