mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 23:56:39 +08:00
add getDeviceHandle() at OS specific level
Change-Id: I95fc24043f8f603d6270323b0f23a78f9d8ad2f1 Signed-off-by: mraghuwa <mayank.raghuwanshi@intel.com>
This commit is contained in:
@@ -39,14 +39,13 @@ ze_result_t GlobalOperationsImp::processesGetState(uint32_t *pCount, zes_process
|
|||||||
}
|
}
|
||||||
|
|
||||||
ze_result_t GlobalOperationsImp::deviceGetProperties(zes_device_properties_t *pProperties) {
|
ze_result_t GlobalOperationsImp::deviceGetProperties(zes_device_properties_t *pProperties) {
|
||||||
Device *device = L0::Device::fromHandle(hCoreDevice);
|
Device *device = pOsGlobalOperations->getDevice();
|
||||||
ze_device_properties_t deviceProperties;
|
ze_device_properties_t deviceProperties;
|
||||||
device->getProperties(&deviceProperties);
|
device->getProperties(&deviceProperties);
|
||||||
sysmanProperties.core = deviceProperties;
|
sysmanProperties.core = deviceProperties;
|
||||||
uint32_t count = 0;
|
uint32_t count = 0;
|
||||||
device->getSubDevices(&count, nullptr);
|
device->getSubDevices(&count, nullptr);
|
||||||
sysmanProperties.numSubdevices = count;
|
sysmanProperties.numSubdevices = count;
|
||||||
|
|
||||||
*pProperties = sysmanProperties;
|
*pProperties = sysmanProperties;
|
||||||
return ZE_RESULT_SUCCESS;
|
return ZE_RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,13 +23,10 @@ class GlobalOperationsImp : public GlobalOperations, NEO::NonCopyableOrMovableCl
|
|||||||
ze_result_t reset(ze_bool_t force) override;
|
ze_result_t reset(ze_bool_t force) override;
|
||||||
ze_result_t deviceGetProperties(zes_device_properties_t *pProperties) override;
|
ze_result_t deviceGetProperties(zes_device_properties_t *pProperties) override;
|
||||||
ze_result_t processesGetState(uint32_t *pCount, zes_process_state_t *pProcesses) override;
|
ze_result_t processesGetState(uint32_t *pCount, zes_process_state_t *pProcesses) override;
|
||||||
|
|
||||||
OsGlobalOperations *pOsGlobalOperations = nullptr;
|
OsGlobalOperations *pOsGlobalOperations = nullptr;
|
||||||
ze_device_handle_t hCoreDevice = {};
|
|
||||||
|
|
||||||
GlobalOperationsImp() = default;
|
GlobalOperationsImp() = default;
|
||||||
GlobalOperationsImp(OsSysman *pOsSysman, ze_device_handle_t hCoreDevice) : hCoreDevice(hCoreDevice),
|
GlobalOperationsImp(OsSysman *pOsSysman) : pOsSysman(pOsSysman){};
|
||||||
pOsSysman(pOsSysman){};
|
|
||||||
~GlobalOperationsImp() override;
|
~GlobalOperationsImp() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -44,6 +44,10 @@ void LinuxGlobalOperationsImp::getSerialNumber(char (&serialNumber)[ZES_STRING_P
|
|||||||
std::strncpy(serialNumber, unknown.c_str(), ZES_STRING_PROPERTY_SIZE);
|
std::strncpy(serialNumber, unknown.c_str(), ZES_STRING_PROPERTY_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Device *LinuxGlobalOperationsImp::getDevice() {
|
||||||
|
return pDevice;
|
||||||
|
}
|
||||||
|
|
||||||
void LinuxGlobalOperationsImp::getBoardNumber(char (&boardNumber)[ZES_STRING_PROPERTY_SIZE]) {
|
void LinuxGlobalOperationsImp::getBoardNumber(char (&boardNumber)[ZES_STRING_PROPERTY_SIZE]) {
|
||||||
std::strncpy(boardNumber, unknown.c_str(), ZES_STRING_PROPERTY_SIZE);
|
std::strncpy(boardNumber, unknown.c_str(), ZES_STRING_PROPERTY_SIZE);
|
||||||
}
|
}
|
||||||
@@ -358,6 +362,7 @@ LinuxGlobalOperationsImp::LinuxGlobalOperationsImp(OsSysman *pOsSysman) {
|
|||||||
|
|
||||||
pSysfsAccess = &pLinuxSysmanImp->getSysfsAccess();
|
pSysfsAccess = &pLinuxSysmanImp->getSysfsAccess();
|
||||||
pFsAccess = &pLinuxSysmanImp->getFsAccess();
|
pFsAccess = &pLinuxSysmanImp->getFsAccess();
|
||||||
|
pDevice = pLinuxSysmanImp->getDeviceHandle();
|
||||||
}
|
}
|
||||||
|
|
||||||
OsGlobalOperations *OsGlobalOperations::create(OsSysman *pOsSysman) {
|
OsGlobalOperations *OsGlobalOperations::create(OsSysman *pOsSysman) {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
namespace L0 {
|
namespace L0 {
|
||||||
class SysfsAccess;
|
class SysfsAccess;
|
||||||
|
struct Device;
|
||||||
|
|
||||||
class LinuxGlobalOperationsImp : public OsGlobalOperations, NEO::NonCopyableOrMovableClass {
|
class LinuxGlobalOperationsImp : public OsGlobalOperations, NEO::NonCopyableOrMovableClass {
|
||||||
public:
|
public:
|
||||||
@@ -20,6 +21,7 @@ class LinuxGlobalOperationsImp : public OsGlobalOperations, NEO::NonCopyableOrMo
|
|||||||
void getModelName(char (&modelName)[ZES_STRING_PROPERTY_SIZE]) override;
|
void getModelName(char (&modelName)[ZES_STRING_PROPERTY_SIZE]) override;
|
||||||
void getVendorName(char (&vendorName)[ZES_STRING_PROPERTY_SIZE]) override;
|
void getVendorName(char (&vendorName)[ZES_STRING_PROPERTY_SIZE]) override;
|
||||||
void getDriverVersion(char (&driverVersion)[ZES_STRING_PROPERTY_SIZE]) override;
|
void getDriverVersion(char (&driverVersion)[ZES_STRING_PROPERTY_SIZE]) override;
|
||||||
|
Device *getDevice() override;
|
||||||
ze_result_t reset(ze_bool_t force) override;
|
ze_result_t reset(ze_bool_t force) override;
|
||||||
ze_result_t scanProcessesState(std::vector<zes_process_state_t> &pProcessList) override;
|
ze_result_t scanProcessesState(std::vector<zes_process_state_t> &pProcessList) override;
|
||||||
LinuxGlobalOperationsImp() = default;
|
LinuxGlobalOperationsImp() = default;
|
||||||
@@ -30,6 +32,7 @@ class LinuxGlobalOperationsImp : public OsGlobalOperations, NEO::NonCopyableOrMo
|
|||||||
FsAccess *pFsAccess = nullptr;
|
FsAccess *pFsAccess = nullptr;
|
||||||
SysfsAccess *pSysfsAccess = nullptr;
|
SysfsAccess *pSysfsAccess = nullptr;
|
||||||
LinuxSysmanImp *pLinuxSysmanImp = nullptr;
|
LinuxSysmanImp *pLinuxSysmanImp = nullptr;
|
||||||
|
Device *pDevice = nullptr;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const std::string deviceDir;
|
static const std::string deviceDir;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "level_zero/core/source/device/device.h"
|
||||||
#include "level_zero/tools/source/sysman/os_sysman.h"
|
#include "level_zero/tools/source/sysman/os_sysman.h"
|
||||||
#include <level_zero/zes_api.h>
|
#include <level_zero/zes_api.h>
|
||||||
|
|
||||||
@@ -23,6 +24,7 @@ class OsGlobalOperations {
|
|||||||
virtual void getModelName(char (&modelName)[ZES_STRING_PROPERTY_SIZE]) = 0;
|
virtual void getModelName(char (&modelName)[ZES_STRING_PROPERTY_SIZE]) = 0;
|
||||||
virtual void getVendorName(char (&vendorName)[ZES_STRING_PROPERTY_SIZE]) = 0;
|
virtual void getVendorName(char (&vendorName)[ZES_STRING_PROPERTY_SIZE]) = 0;
|
||||||
virtual void getDriverVersion(char (&driverVersion)[ZES_STRING_PROPERTY_SIZE]) = 0;
|
virtual void getDriverVersion(char (&driverVersion)[ZES_STRING_PROPERTY_SIZE]) = 0;
|
||||||
|
virtual Device *getDevice() = 0;
|
||||||
virtual ze_result_t reset(ze_bool_t force) = 0;
|
virtual ze_result_t reset(ze_bool_t force) = 0;
|
||||||
virtual ze_result_t scanProcessesState(std::vector<zes_process_state_t> &pProcessList) = 0;
|
virtual ze_result_t scanProcessesState(std::vector<zes_process_state_t> &pProcessList) = 0;
|
||||||
static OsGlobalOperations *create(OsSysman *pOsSysman);
|
static OsGlobalOperations *create(OsSysman *pOsSysman);
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ class WddmGlobalOperationsImp : public OsGlobalOperations {
|
|||||||
void getModelName(char (&modelName)[ZES_STRING_PROPERTY_SIZE]) override;
|
void getModelName(char (&modelName)[ZES_STRING_PROPERTY_SIZE]) override;
|
||||||
void getVendorName(char (&vendorName)[ZES_STRING_PROPERTY_SIZE]) override;
|
void getVendorName(char (&vendorName)[ZES_STRING_PROPERTY_SIZE]) override;
|
||||||
void getDriverVersion(char (&driverVersion)[ZES_STRING_PROPERTY_SIZE]) override;
|
void getDriverVersion(char (&driverVersion)[ZES_STRING_PROPERTY_SIZE]) override;
|
||||||
|
Device *getDevice() override;
|
||||||
ze_result_t reset(ze_bool_t force) override;
|
ze_result_t reset(ze_bool_t force) override;
|
||||||
ze_result_t scanProcessesState(std::vector<zes_process_state_t> &pProcessList) override;
|
ze_result_t scanProcessesState(std::vector<zes_process_state_t> &pProcessList) override;
|
||||||
|
|
||||||
@@ -27,8 +28,15 @@ class WddmGlobalOperationsImp : public OsGlobalOperations {
|
|||||||
// Don't allow copies of the WddmGlobalOperationsImp object
|
// Don't allow copies of the WddmGlobalOperationsImp object
|
||||||
WddmGlobalOperationsImp(const WddmGlobalOperationsImp &obj) = delete;
|
WddmGlobalOperationsImp(const WddmGlobalOperationsImp &obj) = delete;
|
||||||
WddmGlobalOperationsImp &operator=(const WddmGlobalOperationsImp &obj) = delete;
|
WddmGlobalOperationsImp &operator=(const WddmGlobalOperationsImp &obj) = delete;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Device *pDevice = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Device *WddmGlobalOperationsImp::getDevice() {
|
||||||
|
return pDevice;
|
||||||
|
}
|
||||||
|
|
||||||
void WddmGlobalOperationsImp::getSerialNumber(char (&serialNumber)[ZES_STRING_PROPERTY_SIZE]) {
|
void WddmGlobalOperationsImp::getSerialNumber(char (&serialNumber)[ZES_STRING_PROPERTY_SIZE]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,6 +64,8 @@ ze_result_t WddmGlobalOperationsImp::scanProcessesState(std::vector<zes_process_
|
|||||||
}
|
}
|
||||||
|
|
||||||
WddmGlobalOperationsImp::WddmGlobalOperationsImp(OsSysman *pOsSysman) {
|
WddmGlobalOperationsImp::WddmGlobalOperationsImp(OsSysman *pOsSysman) {
|
||||||
|
WddmSysmanImp *pWddmSysmanImp = static_cast<WddmSysmanImp *>(pOsSysman);
|
||||||
|
pDevice = pWddmSysmanImp->getDeviceHandle();
|
||||||
}
|
}
|
||||||
|
|
||||||
OsGlobalOperations *OsGlobalOperations::create(OsSysman *pOsSysman) {
|
OsGlobalOperations *OsGlobalOperations::create(OsSysman *pOsSysman) {
|
||||||
|
|||||||
@@ -20,12 +20,7 @@ ze_result_t LinuxSysmanImp::init() {
|
|||||||
pProcfsAccess = ProcfsAccess::create();
|
pProcfsAccess = ProcfsAccess::create();
|
||||||
UNRECOVERABLE_IF(nullptr == pProcfsAccess);
|
UNRECOVERABLE_IF(nullptr == pProcfsAccess);
|
||||||
|
|
||||||
Device *pDevice = nullptr;
|
pDevice = Device::fromHandle(pParentSysmanDeviceImp->hCoreDevice);
|
||||||
if (pParentSysmanDeviceImp != nullptr) {
|
|
||||||
pDevice = Device::fromHandle(pParentSysmanDeviceImp->hCoreDevice);
|
|
||||||
} else {
|
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
|
||||||
}
|
|
||||||
UNRECOVERABLE_IF(nullptr == pDevice);
|
UNRECOVERABLE_IF(nullptr == pDevice);
|
||||||
NEO::OSInterface &OsInterface = pDevice->getOsInterface();
|
NEO::OSInterface &OsInterface = pDevice->getOsInterface();
|
||||||
pDrm = OsInterface.get()->getDrm();
|
pDrm = OsInterface.get()->getDrm();
|
||||||
@@ -70,6 +65,10 @@ NEO::Drm &LinuxSysmanImp::getDrm() {
|
|||||||
return *pDrm;
|
return *pDrm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Device *LinuxSysmanImp::getDeviceHandle() {
|
||||||
|
return pDevice;
|
||||||
|
}
|
||||||
|
|
||||||
PlatformMonitoringTech &LinuxSysmanImp::getPlatformMonitoringTechAccess() {
|
PlatformMonitoringTech &LinuxSysmanImp::getPlatformMonitoringTechAccess() {
|
||||||
UNRECOVERABLE_IF(nullptr == pPmt);
|
UNRECOVERABLE_IF(nullptr == pPmt);
|
||||||
return *pPmt;
|
return *pPmt;
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ class LinuxSysmanImp : public OsSysman, NEO::NonCopyableOrMovableClass {
|
|||||||
SysfsAccess &getSysfsAccess();
|
SysfsAccess &getSysfsAccess();
|
||||||
NEO::Drm &getDrm();
|
NEO::Drm &getDrm();
|
||||||
PlatformMonitoringTech &getPlatformMonitoringTechAccess();
|
PlatformMonitoringTech &getPlatformMonitoringTechAccess();
|
||||||
|
Device *getDeviceHandle();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
XmlParser *pXmlParser = nullptr;
|
XmlParser *pXmlParser = nullptr;
|
||||||
@@ -39,6 +40,7 @@ class LinuxSysmanImp : public OsSysman, NEO::NonCopyableOrMovableClass {
|
|||||||
SysfsAccess *pSysfsAccess = nullptr;
|
SysfsAccess *pSysfsAccess = nullptr;
|
||||||
PlatformMonitoringTech *pPmt = nullptr;
|
PlatformMonitoringTech *pPmt = nullptr;
|
||||||
NEO::Drm *pDrm = nullptr;
|
NEO::Drm *pDrm = nullptr;
|
||||||
|
Device *pDevice = nullptr;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
LinuxSysmanImp() = delete;
|
LinuxSysmanImp() = delete;
|
||||||
|
|||||||
@@ -16,6 +16,11 @@ namespace L0 {
|
|||||||
LinuxMemoryImp::LinuxMemoryImp(OsSysman *pOsSysman) {
|
LinuxMemoryImp::LinuxMemoryImp(OsSysman *pOsSysman) {
|
||||||
LinuxSysmanImp *pLinuxSysmanImp = static_cast<LinuxSysmanImp *>(pOsSysman);
|
LinuxSysmanImp *pLinuxSysmanImp = static_cast<LinuxSysmanImp *>(pOsSysman);
|
||||||
pDrm = &pLinuxSysmanImp->getDrm();
|
pDrm = &pLinuxSysmanImp->getDrm();
|
||||||
|
pDevice = pLinuxSysmanImp->getDeviceHandle();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool LinuxMemoryImp::isMemoryModuleSupported() {
|
||||||
|
return pDevice->getDriverHandle()->getMemoryManager()->isLocalMemorySupported(pDevice->getRootDeviceIndex());
|
||||||
}
|
}
|
||||||
|
|
||||||
ze_result_t LinuxMemoryImp::getProperties(zes_mem_properties_t *pProperties) {
|
ze_result_t LinuxMemoryImp::getProperties(zes_mem_properties_t *pProperties) {
|
||||||
|
|||||||
@@ -14,17 +14,20 @@
|
|||||||
namespace L0 {
|
namespace L0 {
|
||||||
|
|
||||||
class SysfsAccess;
|
class SysfsAccess;
|
||||||
|
struct Device;
|
||||||
|
|
||||||
class LinuxMemoryImp : public OsMemory, NEO::NonCopyableOrMovableClass {
|
class LinuxMemoryImp : public OsMemory, NEO::NonCopyableOrMovableClass {
|
||||||
public:
|
public:
|
||||||
ze_result_t getProperties(zes_mem_properties_t *pProperties) override;
|
ze_result_t getProperties(zes_mem_properties_t *pProperties) override;
|
||||||
ze_result_t getBandwidth(zes_mem_bandwidth_t *pBandwidth) override;
|
ze_result_t getBandwidth(zes_mem_bandwidth_t *pBandwidth) override;
|
||||||
ze_result_t getState(zes_mem_state_t *pState) override;
|
ze_result_t getState(zes_mem_state_t *pState) override;
|
||||||
|
bool isMemoryModuleSupported() override;
|
||||||
LinuxMemoryImp(OsSysman *pOsSysman);
|
LinuxMemoryImp(OsSysman *pOsSysman);
|
||||||
LinuxMemoryImp() = default;
|
LinuxMemoryImp() = default;
|
||||||
~LinuxMemoryImp() override = default;
|
~LinuxMemoryImp() override = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
NEO::Drm *pDrm = nullptr;
|
NEO::Drm *pDrm = nullptr;
|
||||||
|
Device *pDevice = nullptr;
|
||||||
};
|
};
|
||||||
} // namespace L0
|
} // namespace L0
|
||||||
|
|||||||
@@ -7,8 +7,18 @@
|
|||||||
|
|
||||||
#include "level_zero/tools/source/sysman/memory/linux/os_memory_imp.h"
|
#include "level_zero/tools/source/sysman/memory/linux/os_memory_imp.h"
|
||||||
|
|
||||||
|
#include "sysman/linux/os_sysman_imp.h"
|
||||||
|
|
||||||
namespace L0 {
|
namespace L0 {
|
||||||
|
|
||||||
|
LinuxMemoryImp::LinuxMemoryImp(OsSysman *pOsSysman) {
|
||||||
|
LinuxSysmanImp *pLinuxSysmanImp = static_cast<LinuxSysmanImp *>(pOsSysman);
|
||||||
|
pDevice = pLinuxSysmanImp->getDeviceHandle();
|
||||||
|
}
|
||||||
|
bool LinuxMemoryImp::isMemoryModuleSupported() {
|
||||||
|
return pDevice->getDriverHandle()->getMemoryManager()->isLocalMemorySupported(pDevice->getRootDeviceIndex());
|
||||||
|
}
|
||||||
|
|
||||||
ze_result_t LinuxMemoryImp::getProperties(zes_mem_properties_t *pProperties) {
|
ze_result_t LinuxMemoryImp::getProperties(zes_mem_properties_t *pProperties) {
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||||
}
|
}
|
||||||
@@ -22,7 +32,7 @@ ze_result_t LinuxMemoryImp::getState(zes_mem_state_t *pState) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
OsMemory *OsMemory::create(OsSysman *pOsSysman) {
|
OsMemory *OsMemory::create(OsSysman *pOsSysman) {
|
||||||
LinuxMemoryImp *pLinuxMemoryImp = new LinuxMemoryImp();
|
LinuxMemoryImp *pLinuxMemoryImp = new LinuxMemoryImp(pOsSysman);
|
||||||
return static_cast<OsMemory *>(pLinuxMemoryImp);
|
return static_cast<OsMemory *>(pLinuxMemoryImp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,14 +13,19 @@
|
|||||||
namespace L0 {
|
namespace L0 {
|
||||||
|
|
||||||
class SysfsAccess;
|
class SysfsAccess;
|
||||||
|
struct Device;
|
||||||
|
|
||||||
class LinuxMemoryImp : public OsMemory, NEO::NonCopyableOrMovableClass {
|
class LinuxMemoryImp : public OsMemory, NEO::NonCopyableOrMovableClass {
|
||||||
public:
|
public:
|
||||||
ze_result_t getProperties(zes_mem_properties_t *pProperties) override;
|
ze_result_t getProperties(zes_mem_properties_t *pProperties) override;
|
||||||
ze_result_t getBandwidth(zes_mem_bandwidth_t *pBandwidth) override;
|
ze_result_t getBandwidth(zes_mem_bandwidth_t *pBandwidth) override;
|
||||||
ze_result_t getState(zes_mem_state_t *pState) override;
|
ze_result_t getState(zes_mem_state_t *pState) override;
|
||||||
|
bool isMemoryModuleSupported() override;
|
||||||
LinuxMemoryImp(OsSysman *pOsSysman);
|
LinuxMemoryImp(OsSysman *pOsSysman);
|
||||||
LinuxMemoryImp() = default;
|
LinuxMemoryImp() = default;
|
||||||
~LinuxMemoryImp() override = default;
|
~LinuxMemoryImp() override = default;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
Device *pDevice = nullptr;
|
||||||
};
|
};
|
||||||
} // namespace L0
|
} // namespace L0
|
||||||
|
|||||||
@@ -19,15 +19,17 @@ MemoryHandleContext::~MemoryHandleContext() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ze_result_t MemoryHandleContext::init() {
|
void MemoryHandleContext::createHandle() {
|
||||||
Device *device = L0::Device::fromHandle(hCoreDevice);
|
Memory *pMemory = new MemoryImp(pOsSysman);
|
||||||
|
if (pMemory->initSuccess == true) {
|
||||||
isLmemSupported = device->getDriverHandle()->getMemoryManager()->isLocalMemorySupported(device->getRootDeviceIndex());
|
|
||||||
|
|
||||||
if (isLmemSupported) {
|
|
||||||
Memory *pMemory = new MemoryImp(pOsSysman);
|
|
||||||
handleList.push_back(pMemory);
|
handleList.push_back(pMemory);
|
||||||
|
} else {
|
||||||
|
delete pMemory;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ze_result_t MemoryHandleContext::init() {
|
||||||
|
createHandle();
|
||||||
return ZE_RESULT_SUCCESS;
|
return ZE_RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,10 +28,11 @@ class Memory : _zes_mem_handle_t {
|
|||||||
return static_cast<Memory *>(handle);
|
return static_cast<Memory *>(handle);
|
||||||
}
|
}
|
||||||
inline zes_mem_handle_t toHandle() { return this; }
|
inline zes_mem_handle_t toHandle() { return this; }
|
||||||
|
bool initSuccess = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MemoryHandleContext {
|
struct MemoryHandleContext {
|
||||||
MemoryHandleContext(OsSysman *pOsSysman, ze_device_handle_t hCoreDevice) : pOsSysman(pOsSysman), hCoreDevice(hCoreDevice){};
|
MemoryHandleContext(OsSysman *pOsSysman) : pOsSysman(pOsSysman){};
|
||||||
~MemoryHandleContext();
|
~MemoryHandleContext();
|
||||||
|
|
||||||
ze_result_t init();
|
ze_result_t init();
|
||||||
@@ -41,7 +42,9 @@ struct MemoryHandleContext {
|
|||||||
OsSysman *pOsSysman = nullptr;
|
OsSysman *pOsSysman = nullptr;
|
||||||
bool isLmemSupported = false;
|
bool isLmemSupported = false;
|
||||||
std::vector<Memory *> handleList = {};
|
std::vector<Memory *> handleList = {};
|
||||||
ze_device_handle_t hCoreDevice;
|
|
||||||
|
private:
|
||||||
|
void createHandle();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace L0
|
} // namespace L0
|
||||||
|
|||||||
@@ -23,7 +23,10 @@ ze_result_t MemoryImp::memoryGetProperties(zes_mem_properties_t *pProperties) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MemoryImp::init() {
|
void MemoryImp::init() {
|
||||||
pOsMemory->getProperties(&memoryProperties);
|
this->initSuccess = pOsMemory->isMemoryModuleSupported();
|
||||||
|
if (this->initSuccess == true) {
|
||||||
|
pOsMemory->getProperties(&memoryProperties);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MemoryImp::MemoryImp(OsSysman *pOsSysman) {
|
MemoryImp::MemoryImp(OsSysman *pOsSysman) {
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ class OsMemory {
|
|||||||
virtual ze_result_t getProperties(zes_mem_properties_t *pProperties) = 0;
|
virtual ze_result_t getProperties(zes_mem_properties_t *pProperties) = 0;
|
||||||
virtual ze_result_t getBandwidth(zes_mem_bandwidth_t *pBandwidth) = 0;
|
virtual ze_result_t getBandwidth(zes_mem_bandwidth_t *pBandwidth) = 0;
|
||||||
virtual ze_result_t getState(zes_mem_state_t *pState) = 0;
|
virtual ze_result_t getState(zes_mem_state_t *pState) = 0;
|
||||||
|
virtual bool isMemoryModuleSupported() = 0;
|
||||||
static OsMemory *create(OsSysman *pOsSysman);
|
static OsMemory *create(OsSysman *pOsSysman);
|
||||||
virtual ~OsMemory() {}
|
virtual ~OsMemory() {}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,7 +8,9 @@
|
|||||||
#include "sysman/memory/windows/os_memory_imp.h"
|
#include "sysman/memory/windows/os_memory_imp.h"
|
||||||
|
|
||||||
namespace L0 {
|
namespace L0 {
|
||||||
|
bool WddmMemoryImp::isMemoryModuleSupported() {
|
||||||
|
return pDevice->getDriverHandle()->getMemoryManager()->isLocalMemorySupported(pDevice->getRootDeviceIndex());
|
||||||
|
}
|
||||||
ze_result_t WddmMemoryImp::getProperties(zes_mem_properties_t *pProperties) {
|
ze_result_t WddmMemoryImp::getProperties(zes_mem_properties_t *pProperties) {
|
||||||
ze_result_t status = ZE_RESULT_SUCCESS;
|
ze_result_t status = ZE_RESULT_SUCCESS;
|
||||||
uint32_t valueSmall = 0;
|
uint32_t valueSmall = 0;
|
||||||
@@ -177,6 +179,7 @@ ze_result_t WddmMemoryImp::getState(zes_mem_state_t *pState) {
|
|||||||
WddmMemoryImp::WddmMemoryImp(OsSysman *pOsSysman) {
|
WddmMemoryImp::WddmMemoryImp(OsSysman *pOsSysman) {
|
||||||
WddmSysmanImp *pWddmSysmanImp = static_cast<WddmSysmanImp *>(pOsSysman);
|
WddmSysmanImp *pWddmSysmanImp = static_cast<WddmSysmanImp *>(pOsSysman);
|
||||||
pKmdSysManager = &pWddmSysmanImp->getKmdSysManager();
|
pKmdSysManager = &pWddmSysmanImp->getKmdSysManager();
|
||||||
|
pDevice = pWddmSysmanImp->getDeviceHandle();
|
||||||
}
|
}
|
||||||
|
|
||||||
OsMemory *OsMemory::create(OsSysman *pOsSysman) {
|
OsMemory *OsMemory::create(OsSysman *pOsSysman) {
|
||||||
|
|||||||
@@ -21,12 +21,14 @@ class WddmMemoryImp : public OsMemory, NEO::NonCopyableOrMovableClass {
|
|||||||
ze_result_t getProperties(zes_mem_properties_t *pProperties) override;
|
ze_result_t getProperties(zes_mem_properties_t *pProperties) override;
|
||||||
ze_result_t getBandwidth(zes_mem_bandwidth_t *pBandwidth) override;
|
ze_result_t getBandwidth(zes_mem_bandwidth_t *pBandwidth) override;
|
||||||
ze_result_t getState(zes_mem_state_t *pState) override;
|
ze_result_t getState(zes_mem_state_t *pState) override;
|
||||||
|
bool isMemoryModuleSupported() override;
|
||||||
WddmMemoryImp(OsSysman *pOsSysman);
|
WddmMemoryImp(OsSysman *pOsSysman);
|
||||||
WddmMemoryImp() = default;
|
WddmMemoryImp() = default;
|
||||||
~WddmMemoryImp() override = default;
|
~WddmMemoryImp() override = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
KmdSysManager *pKmdSysManager = nullptr;
|
KmdSysManager *pKmdSysManager = nullptr;
|
||||||
|
Device *pDevice = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace L0
|
} // namespace L0
|
||||||
|
|||||||
@@ -31,9 +31,7 @@ std::string changeDirNLevelsUp(std::string realRootPath, uint8_t nLevel) {
|
|||||||
}
|
}
|
||||||
return realRootPath;
|
return realRootPath;
|
||||||
}
|
}
|
||||||
void LinuxPciImp::setLmemSupport(bool val) {
|
|
||||||
isLmemSupported = val;
|
|
||||||
}
|
|
||||||
ze_result_t LinuxPciImp::getPciBdf(std::string &bdf) {
|
ze_result_t LinuxPciImp::getPciBdf(std::string &bdf) {
|
||||||
std::string bdfDir;
|
std::string bdfDir;
|
||||||
ze_result_t result = pSysfsAccess->readSymLink(deviceDir, bdfDir);
|
ze_result_t result = pSysfsAccess->readSymLink(deviceDir, bdfDir);
|
||||||
@@ -182,6 +180,8 @@ LinuxPciImp::LinuxPciImp(OsSysman *pOsSysman) {
|
|||||||
LinuxSysmanImp *pLinuxSysmanImp = static_cast<LinuxSysmanImp *>(pOsSysman);
|
LinuxSysmanImp *pLinuxSysmanImp = static_cast<LinuxSysmanImp *>(pOsSysman);
|
||||||
pSysfsAccess = &pLinuxSysmanImp->getSysfsAccess();
|
pSysfsAccess = &pLinuxSysmanImp->getSysfsAccess();
|
||||||
pfsAccess = &pLinuxSysmanImp->getFsAccess();
|
pfsAccess = &pLinuxSysmanImp->getFsAccess();
|
||||||
|
Device *pDevice = pLinuxSysmanImp->getDeviceHandle();
|
||||||
|
isLmemSupported = pDevice->getDriverHandle()->getMemoryManager()->isLocalMemorySupported(pDevice->getRootDeviceIndex());
|
||||||
}
|
}
|
||||||
|
|
||||||
OsPci *OsPci::create(OsSysman *pOsSysman) {
|
OsPci *OsPci::create(OsSysman *pOsSysman) {
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ class LinuxPciImp : public OsPci, NEO::NonCopyableOrMovableClass {
|
|||||||
ze_result_t getMaxLinkSpeed(double &maxLinkSpeed) override;
|
ze_result_t getMaxLinkSpeed(double &maxLinkSpeed) override;
|
||||||
ze_result_t getMaxLinkWidth(int32_t &maxLinkwidth) override;
|
ze_result_t getMaxLinkWidth(int32_t &maxLinkwidth) override;
|
||||||
ze_result_t getLinkGen(int32_t &linkGen) override;
|
ze_result_t getLinkGen(int32_t &linkGen) override;
|
||||||
void setLmemSupport(bool val) override;
|
|
||||||
ze_result_t initializeBarProperties(std::vector<zes_pci_bar_properties_t *> &pBarProperties) override;
|
ze_result_t initializeBarProperties(std::vector<zes_pci_bar_properties_t *> &pBarProperties) override;
|
||||||
LinuxPciImp() = default;
|
LinuxPciImp() = default;
|
||||||
LinuxPciImp(OsSysman *pOsSysman);
|
LinuxPciImp(OsSysman *pOsSysman);
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace L0 {
|
namespace L0 {
|
||||||
|
std::string changeDirNLevelsUp(std::string realRootPath, uint8_t nLevel);
|
||||||
|
|
||||||
class OsPci {
|
class OsPci {
|
||||||
public:
|
public:
|
||||||
@@ -21,7 +22,6 @@ class OsPci {
|
|||||||
virtual ze_result_t getMaxLinkSpeed(double &maxLinkSpeed) = 0;
|
virtual ze_result_t getMaxLinkSpeed(double &maxLinkSpeed) = 0;
|
||||||
virtual ze_result_t getMaxLinkWidth(int32_t &maxLinkWidth) = 0;
|
virtual ze_result_t getMaxLinkWidth(int32_t &maxLinkWidth) = 0;
|
||||||
virtual ze_result_t getLinkGen(int32_t &linkGen) = 0;
|
virtual ze_result_t getLinkGen(int32_t &linkGen) = 0;
|
||||||
virtual void setLmemSupport(bool val) = 0;
|
|
||||||
virtual ze_result_t initializeBarProperties(std::vector<zes_pci_bar_properties_t *> &pBarProperties) = 0;
|
virtual ze_result_t initializeBarProperties(std::vector<zes_pci_bar_properties_t *> &pBarProperties) = 0;
|
||||||
static OsPci *create(OsSysman *pOsSysman);
|
static OsPci *create(OsSysman *pOsSysman);
|
||||||
virtual ~OsPci() = default;
|
virtual ~OsPci() = default;
|
||||||
|
|||||||
@@ -66,8 +66,6 @@ void PciImp::init() {
|
|||||||
pOsPci = OsPci::create(pOsSysman);
|
pOsPci = OsPci::create(pOsSysman);
|
||||||
}
|
}
|
||||||
UNRECOVERABLE_IF(nullptr == pOsPci);
|
UNRECOVERABLE_IF(nullptr == pOsPci);
|
||||||
Device *device = L0::Device::fromHandle(hCoreDevice);
|
|
||||||
pOsPci->setLmemSupport(device->getDriverHandle()->getMemoryManager()->isLocalMemorySupported(device->getRootDeviceIndex()));
|
|
||||||
std::string bdf;
|
std::string bdf;
|
||||||
pOsPci->getPciBdf(bdf);
|
pOsPci->getPciBdf(bdf);
|
||||||
if (bdf.empty()) {
|
if (bdf.empty()) {
|
||||||
|
|||||||
@@ -26,13 +26,9 @@ class PciImp : public Pci, NEO::NonCopyableOrMovableClass {
|
|||||||
ze_result_t pciGetInitializedBars(uint32_t *pCount, zes_pci_bar_properties_t *pProperties) override;
|
ze_result_t pciGetInitializedBars(uint32_t *pCount, zes_pci_bar_properties_t *pProperties) override;
|
||||||
|
|
||||||
PciImp() = default;
|
PciImp() = default;
|
||||||
PciImp(OsSysman *pOsSysman, ze_device_handle_t hDevice) : pOsSysman(pOsSysman) {
|
PciImp(OsSysman *pOsSysman) : pOsSysman(pOsSysman){};
|
||||||
pOsPci = nullptr;
|
|
||||||
hCoreDevice = hDevice;
|
|
||||||
};
|
|
||||||
~PciImp() override;
|
~PciImp() override;
|
||||||
OsPci *pOsPci = nullptr;
|
OsPci *pOsPci = nullptr;
|
||||||
ze_device_handle_t hCoreDevice = {};
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
OsSysman *pOsSysman = nullptr;
|
OsSysman *pOsSysman = nullptr;
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ class WddmPciImp : public OsPci {
|
|||||||
ze_result_t getMaxLinkSpeed(double &maxLinkSpeed) override;
|
ze_result_t getMaxLinkSpeed(double &maxLinkSpeed) override;
|
||||||
ze_result_t getMaxLinkWidth(int32_t &maxLinkwidth) override;
|
ze_result_t getMaxLinkWidth(int32_t &maxLinkwidth) override;
|
||||||
ze_result_t getLinkGen(int32_t &linkGen) override;
|
ze_result_t getLinkGen(int32_t &linkGen) override;
|
||||||
void setLmemSupport(bool val) override;
|
|
||||||
ze_result_t initializeBarProperties(std::vector<zes_pci_bar_properties_t *> &pBarProperties) override;
|
ze_result_t initializeBarProperties(std::vector<zes_pci_bar_properties_t *> &pBarProperties) override;
|
||||||
~WddmPciImp() override = default;
|
~WddmPciImp() override = default;
|
||||||
};
|
};
|
||||||
@@ -37,8 +36,6 @@ ze_result_t WddmPciImp::getLinkGen(int32_t &linkGen) {
|
|||||||
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WddmPciImp::setLmemSupport(bool val) {}
|
|
||||||
|
|
||||||
ze_result_t WddmPciImp::initializeBarProperties(std::vector<zes_pci_bar_properties_t *> &pBarProperties) {
|
ze_result_t WddmPciImp::initializeBarProperties(std::vector<zes_pci_bar_properties_t *> &pBarProperties) {
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ SysmanDeviceImp::SysmanDeviceImp(ze_device_handle_t hDevice) {
|
|||||||
hCoreDevice = hDevice;
|
hCoreDevice = hDevice;
|
||||||
pOsSysman = OsSysman::create(this);
|
pOsSysman = OsSysman::create(this);
|
||||||
UNRECOVERABLE_IF(nullptr == pOsSysman);
|
UNRECOVERABLE_IF(nullptr == pOsSysman);
|
||||||
pPci = new PciImp(pOsSysman, hCoreDevice);
|
pPci = new PciImp(pOsSysman);
|
||||||
pPowerHandleContext = new PowerHandleContext(pOsSysman);
|
pPowerHandleContext = new PowerHandleContext(pOsSysman);
|
||||||
pFrequencyHandleContext = new FrequencyHandleContext(pOsSysman);
|
pFrequencyHandleContext = new FrequencyHandleContext(pOsSysman);
|
||||||
pFabricPortHandleContext = new FabricPortHandleContext(pOsSysman);
|
pFabricPortHandleContext = new FabricPortHandleContext(pOsSysman);
|
||||||
@@ -30,8 +30,8 @@ SysmanDeviceImp::SysmanDeviceImp(ze_device_handle_t hDevice) {
|
|||||||
pEngineHandleContext = new EngineHandleContext(pOsSysman);
|
pEngineHandleContext = new EngineHandleContext(pOsSysman);
|
||||||
pSchedulerHandleContext = new SchedulerHandleContext(pOsSysman);
|
pSchedulerHandleContext = new SchedulerHandleContext(pOsSysman);
|
||||||
pRasHandleContext = new RasHandleContext(pOsSysman);
|
pRasHandleContext = new RasHandleContext(pOsSysman);
|
||||||
pMemoryHandleContext = new MemoryHandleContext(pOsSysman, hCoreDevice);
|
pMemoryHandleContext = new MemoryHandleContext(pOsSysman);
|
||||||
pGlobalOperations = new GlobalOperationsImp(pOsSysman, hCoreDevice);
|
pGlobalOperations = new GlobalOperationsImp(pOsSysman);
|
||||||
}
|
}
|
||||||
|
|
||||||
SysmanDeviceImp::~SysmanDeviceImp() {
|
SysmanDeviceImp::~SysmanDeviceImp() {
|
||||||
|
|||||||
@@ -10,12 +10,7 @@
|
|||||||
namespace L0 {
|
namespace L0 {
|
||||||
|
|
||||||
ze_result_t WddmSysmanImp::init() {
|
ze_result_t WddmSysmanImp::init() {
|
||||||
Device *pDevice = nullptr;
|
pDevice = Device::fromHandle(pParentSysmanDeviceImp->hCoreDevice);
|
||||||
if (pParentSysmanDeviceImp != nullptr) {
|
|
||||||
pDevice = Device::fromHandle(pParentSysmanDeviceImp->hCoreDevice);
|
|
||||||
} else {
|
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
|
||||||
}
|
|
||||||
UNRECOVERABLE_IF(nullptr == pDevice);
|
UNRECOVERABLE_IF(nullptr == pDevice);
|
||||||
|
|
||||||
NEO::OSInterface &OsInterface = pDevice->getOsInterface();
|
NEO::OSInterface &OsInterface = pDevice->getOsInterface();
|
||||||
@@ -26,6 +21,10 @@ ze_result_t WddmSysmanImp::init() {
|
|||||||
return ZE_RESULT_SUCCESS;
|
return ZE_RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Device *WddmSysmanImp::getDeviceHandle() {
|
||||||
|
return pDevice;
|
||||||
|
}
|
||||||
|
|
||||||
NEO::Wddm &WddmSysmanImp::getWddm() {
|
NEO::Wddm &WddmSysmanImp::getWddm() {
|
||||||
UNRECOVERABLE_IF(nullptr == pWddm);
|
UNRECOVERABLE_IF(nullptr == pWddm);
|
||||||
return *pWddm;
|
return *pWddm;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#include "shared/source/os_interface/windows/os_interface.h"
|
#include "shared/source/os_interface/windows/os_interface.h"
|
||||||
#include "shared/source/os_interface/windows/wddm/wddm.h"
|
#include "shared/source/os_interface/windows/wddm/wddm.h"
|
||||||
|
|
||||||
|
#include "level_zero/core/source/device/device.h"
|
||||||
#include "level_zero/tools/source/sysman/sysman_imp.h"
|
#include "level_zero/tools/source/sysman/sysman_imp.h"
|
||||||
#include "level_zero/tools/source/sysman/windows/kmd_sys.h"
|
#include "level_zero/tools/source/sysman/windows/kmd_sys.h"
|
||||||
#include "level_zero/tools/source/sysman/windows/kmd_sys_manager.h"
|
#include "level_zero/tools/source/sysman/windows/kmd_sys_manager.h"
|
||||||
@@ -25,9 +26,11 @@ class WddmSysmanImp : public OsSysman, NEO::NonCopyableOrMovableClass {
|
|||||||
|
|
||||||
KmdSysManager &getKmdSysManager();
|
KmdSysManager &getKmdSysManager();
|
||||||
NEO::Wddm &getWddm();
|
NEO::Wddm &getWddm();
|
||||||
|
Device *getDeviceHandle();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
KmdSysManager *pKmdSysManager = nullptr;
|
KmdSysManager *pKmdSysManager = nullptr;
|
||||||
|
Device *pDevice = nullptr;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SysmanDeviceImp *pParentSysmanDeviceImp = nullptr;
|
SysmanDeviceImp *pParentSysmanDeviceImp = nullptr;
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ class SysmanGlobalOperationsFixture : public SysmanDeviceFixture {
|
|||||||
.WillByDefault(::testing::Invoke(pFsAccess.get(), &Mock<GlobalOperationsFsAccess>::getValAgamaFile));
|
.WillByDefault(::testing::Invoke(pFsAccess.get(), &Mock<GlobalOperationsFsAccess>::getValAgamaFile));
|
||||||
|
|
||||||
pGlobalOperationsImp = static_cast<L0::GlobalOperationsImp *>(pSysmanDeviceImp->pGlobalOperations);
|
pGlobalOperationsImp = static_cast<L0::GlobalOperationsImp *>(pSysmanDeviceImp->pGlobalOperations);
|
||||||
pGlobalOperationsImp->hCoreDevice = device->toHandle();
|
|
||||||
pOsGlobalOperationsPrev = pGlobalOperationsImp->pOsGlobalOperations;
|
pOsGlobalOperationsPrev = pGlobalOperationsImp->pOsGlobalOperations;
|
||||||
pGlobalOperationsImp->pOsGlobalOperations = nullptr;
|
pGlobalOperationsImp->pOsGlobalOperations = nullptr;
|
||||||
pGlobalOperationsImp->init();
|
pGlobalOperationsImp->init();
|
||||||
|
|||||||
@@ -71,5 +71,9 @@ TEST_F(SysmanDeviceFixture, GivenPmtHandleWhenCallinggetPlatformMonitoringTechAc
|
|||||||
EXPECT_EQ(&pLinuxSysmanImp->getPlatformMonitoringTechAccess(), pLinuxSysmanImp->pPmt);
|
EXPECT_EQ(&pLinuxSysmanImp->getPlatformMonitoringTechAccess(), pLinuxSysmanImp->pPmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(SysmanDeviceFixture, GivenValidDeviceHandleVerifyThatSameHandleIsRetrievedFromOsSpecificCode) {
|
||||||
|
EXPECT_EQ(pLinuxSysmanImp->getDeviceHandle(), device);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace ult
|
} // namespace ult
|
||||||
} // namespace L0
|
} // namespace L0
|
||||||
|
|||||||
@@ -91,7 +91,6 @@ class ZesPciFixture : public ::testing::Test {
|
|||||||
ON_CALL(*pfsAccess.get(), read(_, Matcher<int32_t &>(_)))
|
ON_CALL(*pfsAccess.get(), read(_, Matcher<int32_t &>(_)))
|
||||||
.WillByDefault(::testing::Invoke(pfsAccess.get(), &Mock<PcifsAccess>::getValInt));
|
.WillByDefault(::testing::Invoke(pfsAccess.get(), &Mock<PcifsAccess>::getValInt));
|
||||||
pPciImp = static_cast<L0::PciImp *>(pSysmanDeviceImp->pPci);
|
pPciImp = static_cast<L0::PciImp *>(pSysmanDeviceImp->pPci);
|
||||||
pPciImp->hCoreDevice = device->toHandle();
|
|
||||||
pOsPciPrev = pPciImp->pOsPci;
|
pOsPciPrev = pPciImp->pOsPci;
|
||||||
pPciImp->pOsPci = nullptr;
|
pPciImp->pOsPci = nullptr;
|
||||||
memoryManager->localMemorySupported[0] = 0;
|
memoryManager->localMemorySupported[0] = 0;
|
||||||
@@ -208,5 +207,9 @@ TEST_F(ZesPciFixture, GivenValidSysmanHandleWhenCallingzetSysmanPciGetBarsThenVe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(ZesPciFixture, GivenValidPathWhileCallingchangeDirNLevelsUpThenReturnedPathIsNLevelUpThenTheCurrentPath) {
|
||||||
|
std::string testMockRealPath2LevelsUp = changeDirNLevelsUp(mockRealPath, 2);
|
||||||
|
EXPECT_EQ(testMockRealPath2LevelsUp, mockRealPath2LevelsUp);
|
||||||
|
}
|
||||||
} // namespace ult
|
} // namespace ult
|
||||||
} // namespace L0
|
} // namespace L0
|
||||||
|
|||||||
Reference in New Issue
Block a user