Add hipDeviceAttributeExpertSchedMode (#2435)

* Add hipDeviceAttributeExpertSchedMode

---------

Co-authored-by: Stefan Sokolovic <stefan.sokolovic2@amd.com>

* Update hipDeviceAttributeExpertSchedMode unit test

* Move check to ROCr from thunk interface

* Revert unrelated whitespace changes

* Revert version bump

---------

Co-authored-by: Stefan Sokolovic <stefan.sokolovic2@amd.com>
Αυτή η υποβολή περιλαμβάνεται σε:
Filip Jankovic
2026-01-15 17:41:39 +01:00
υποβλήθηκε από GitHub
γονέας 940488ed58
υποβολή 29cd25df66
7 αρχεία άλλαξαν με 32 προσθήκες και 2 διαγραφές
@@ -1716,6 +1716,15 @@ hsa_status_t GpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const {
static_cast<hsa_luid_t*>(value)->low = properties_.LuidLowPart;
static_cast<hsa_luid_t*>(value)->high = properties_.LuidHighPart;
break;
case HSA_AMD_AGENT_INFO_HAS_EXPERT_SCHED_MODE: {
// Requires KFD version >= 1.20 AND GFX major version >= 12
auto kfd_version = core::Runtime::runtime_singleton_->KfdVersion().version;
*((bool*)value) = (kfd_version.KernelInterfaceMajorVersion > 1 ||
(kfd_version.KernelInterfaceMajorVersion == 1 &&
kfd_version.KernelInterfaceMinorVersion >= 20)) &&
properties_.EngineId.ui32.Major >= 12;
break;
}
default:
return HSA_STATUS_ERROR_INVALID_ARGUMENT;
break;
@@ -715,6 +715,10 @@ typedef enum hsa_amd_agent_info_s {
* valid on Windows. The type of this attribute is LUID.
*/
HSA_AMD_AGENT_INFO_LUID = 0xA11A,
/**
* The agent supports expert scheduling mode. The type of this attribute is bool.
*/
HSA_AMD_AGENT_INFO_HAS_EXPERT_SCHED_MODE = 0xA11B,
} hsa_amd_agent_info_t;
/**