mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
feature(sysman): Expose the config pair to the Engine Handle
Related-To: NEO-14635 Signed-off-by: Pratik Bari <pratik.bari@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
2ea6c09f51
commit
2113882bf5
@@ -95,7 +95,7 @@ ze_result_t LinuxEngineImp::getProperties(zes_engine_properties_t &properties) {
|
||||
}
|
||||
|
||||
void LinuxEngineImp::init() {
|
||||
initStatus = pSysmanKmdInterface->getEngineActivityFdList(engineGroup, engineInstance, gtId, pPmuInterface, fdList);
|
||||
initStatus = pSysmanKmdInterface->getEngineActivityFdListAndConfigPair(engineGroup, engineInstance, gtId, pPmuInterface, fdList, pmuConfigPair);
|
||||
}
|
||||
|
||||
bool LinuxEngineImp::isEngineModuleSupported() {
|
||||
@@ -105,8 +105,13 @@ bool LinuxEngineImp::isEngineModuleSupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void LinuxEngineImp::getConfigPair(std::pair<uint64_t, uint64_t> &configPair) {
|
||||
configPair = pmuConfigPair;
|
||||
return;
|
||||
}
|
||||
|
||||
LinuxEngineImp::LinuxEngineImp(OsSysman *pOsSysman, zes_engine_group_t type, uint32_t engineInstance, uint32_t gtId, ze_bool_t onSubDevice) : engineGroup(type), engineInstance(engineInstance), gtId(gtId), onSubDevice(onSubDevice) {
|
||||
LinuxSysmanImp *pLinuxSysmanImp = static_cast<LinuxSysmanImp *>(pOsSysman);
|
||||
pLinuxSysmanImp = static_cast<LinuxSysmanImp *>(pOsSysman);
|
||||
pDrm = pLinuxSysmanImp->getDrm();
|
||||
pDevice = pLinuxSysmanImp->getSysmanDeviceImp();
|
||||
pPmuInterface = pLinuxSysmanImp->getPmuInterface();
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace Sysman {
|
||||
|
||||
class SysmanKmdInterface;
|
||||
class PmuInterface;
|
||||
class LinuxSysmanImp;
|
||||
struct Device;
|
||||
class LinuxEngineImp : public OsEngine, NEO::NonCopyableAndNonMovableClass {
|
||||
public:
|
||||
@@ -29,6 +30,7 @@ class LinuxEngineImp : public OsEngine, NEO::NonCopyableAndNonMovableClass {
|
||||
ze_result_t getProperties(zes_engine_properties_t &properties) override;
|
||||
bool isEngineModuleSupported() override;
|
||||
static zes_engine_group_t getGroupFromEngineType(zes_engine_group_t type);
|
||||
void getConfigPair(std::pair<uint64_t, uint64_t> &configPair) override;
|
||||
LinuxEngineImp() = default;
|
||||
LinuxEngineImp(OsSysman *pOsSysman, zes_engine_group_t type, uint32_t engineInstance, uint32_t gtId, ze_bool_t onSubDevice);
|
||||
~LinuxEngineImp() override;
|
||||
@@ -36,6 +38,7 @@ class LinuxEngineImp : public OsEngine, NEO::NonCopyableAndNonMovableClass {
|
||||
|
||||
protected:
|
||||
SysmanKmdInterface *pSysmanKmdInterface = nullptr;
|
||||
LinuxSysmanImp *pLinuxSysmanImp = nullptr;
|
||||
zes_engine_group_t engineGroup = ZES_ENGINE_GROUP_ALL;
|
||||
uint32_t engineInstance = 0;
|
||||
PmuInterface *pPmuInterface = nullptr;
|
||||
@@ -47,6 +50,7 @@ class LinuxEngineImp : public OsEngine, NEO::NonCopyableAndNonMovableClass {
|
||||
private:
|
||||
void init();
|
||||
std::vector<std::pair<int64_t, int64_t>> fdList{};
|
||||
std::pair<uint64_t, uint64_t> pmuConfigPair{};
|
||||
ze_result_t initStatus = ZE_RESULT_SUCCESS;
|
||||
};
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ class Engine : _zes_engine_handle_t {
|
||||
}
|
||||
inline zes_engine_handle_t toHandle() { return this; }
|
||||
bool initSuccess = false;
|
||||
std::pair<uint64_t, uint64_t> configPair{};
|
||||
};
|
||||
|
||||
struct EngineHandleContext {
|
||||
|
||||
@@ -26,6 +26,7 @@ ze_result_t EngineImp::engineGetProperties(zes_engine_properties_t *pProperties)
|
||||
void EngineImp::init() {
|
||||
if (pOsEngine->isEngineModuleSupported()) {
|
||||
pOsEngine->getProperties(engineProperties);
|
||||
pOsEngine->getConfigPair(this->configPair);
|
||||
this->initSuccess = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
* Copyright (C) 2020-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -22,6 +22,7 @@ class OsEngine {
|
||||
virtual ze_result_t getActivity(zes_engine_stats_t *pStats) = 0;
|
||||
virtual ze_result_t getActivityExt(uint32_t *pCount, zes_engine_stats_t *pStats) = 0;
|
||||
virtual ze_result_t getProperties(zes_engine_properties_t &properties) = 0;
|
||||
virtual void getConfigPair(std::pair<uint64_t, uint64_t> &configPair) = 0;
|
||||
virtual bool isEngineModuleSupported() = 0;
|
||||
static std::unique_ptr<OsEngine> create(OsSysman *pOsSysman, zes_engine_group_t engineType, uint32_t engineInstance, uint32_t subDeviceId, ze_bool_t onSubdevice);
|
||||
static ze_result_t getNumEngineTypeAndInstances(std::set<std::pair<zes_engine_group_t, EngineInstanceSubDeviceId>> &engineGroupInstance, OsSysman *pOsSysman);
|
||||
|
||||
@@ -20,6 +20,7 @@ class WddmEngineImp : public OsEngine, NEO::NonCopyableAndNonMovableClass {
|
||||
ze_result_t getActivityExt(uint32_t *pCount, zes_engine_stats_t *pStats) override;
|
||||
ze_result_t getProperties(zes_engine_properties_t &properties) override;
|
||||
bool isEngineModuleSupported() override;
|
||||
void getConfigPair(std::pair<uint64_t, uint64_t> &configPair) override { return; }
|
||||
|
||||
WddmEngineImp() = default;
|
||||
WddmEngineImp(OsSysman *pOsSysman, zes_engine_group_t type, uint32_t engineInstance, uint32_t gtId);
|
||||
|
||||
Reference in New Issue
Block a user