mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 05:56:36 +08:00
Revert "feature: Use zesInit on windows always"
This reverts commit cf7a4bc0dd.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
10c37fbb78
commit
63051f0635
@@ -61,7 +61,6 @@
|
||||
#include "level_zero/core/source/sampler/sampler.h"
|
||||
#include "level_zero/driver_experimental/zex_graph.h"
|
||||
#include "level_zero/driver_experimental/zex_module.h"
|
||||
#include "level_zero/sysman/source/driver/sysman_driver.h"
|
||||
#include "level_zero/tools/source/debug/debug_session.h"
|
||||
#include "level_zero/tools/source/metrics/metric.h"
|
||||
#include "level_zero/tools/source/sysman/sysman.h"
|
||||
@@ -1692,11 +1691,6 @@ Device *Device::create(DriverHandle *driverHandle, NEO::Device *neoDevice, bool
|
||||
bool isHwMode = device->getNEODevice()->getAllEngines().size() ? device->getNEODevice()->getAllEngines()[0].commandStreamReceiver->getType() == NEO::CommandStreamReceiverType::hardware : device->getNEODevice()->getRootDevice()->getAllEngines()[0].commandStreamReceiver->getType() == NEO::CommandStreamReceiverType::hardware;
|
||||
if (isHwMode) {
|
||||
device->createSysmanHandle(isSubDevice);
|
||||
auto osInterface = neoDevice->getRootDeviceEnvironment().osInterface.get();
|
||||
if (osInterface && osInterface->getDriverModel()->getDriverModelType() == NEO::DriverModelType::wddm && NEO::debugManager.flags.EnableSysmanLegacyModeUsingZesInit.get()) {
|
||||
// if driver type is wddm (windows) always use zesInit path for sysman
|
||||
L0::Sysman::init(ZE_INIT_FLAG_GPU_ONLY);
|
||||
}
|
||||
}
|
||||
device->resourcesReleased = false;
|
||||
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
#include "level_zero/core/source/image/image.h"
|
||||
#include "level_zero/core/source/semaphore/external_semaphore_imp.h"
|
||||
#include "level_zero/driver_experimental/zex_common.h"
|
||||
#include "level_zero/sysman/source/driver/sysman_driver.h"
|
||||
|
||||
#include "driver_version.h"
|
||||
|
||||
@@ -274,8 +273,6 @@ DriverHandleImp::~DriverHandleImp() {
|
||||
delete this->svmAllocsManager;
|
||||
this->svmAllocsManager = nullptr;
|
||||
}
|
||||
|
||||
L0::Sysman::globalSysmanDriverCleanup();
|
||||
}
|
||||
|
||||
void DriverHandleImp::updateRootDeviceBitFields(std::unique_ptr<NEO::Device> &neoDevice) {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "level_zero/core/source/driver/driver.h"
|
||||
#include "level_zero/core/source/driver/driver_handle_imp.h"
|
||||
#include "level_zero/ddi/ze_ddi_tables.h"
|
||||
#include "level_zero/sysman/source/driver/sysman_driver.h"
|
||||
#include "level_zero/sysman/source/driver/sysman_driver_handle_imp.h"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
@@ -60,9 +60,12 @@ void globalDriverTeardown() {
|
||||
delete globalDriverHandles;
|
||||
globalDriverHandles = nullptr;
|
||||
}
|
||||
if (Sysman::globalSysmanDriver != nullptr) {
|
||||
delete Sysman::globalSysmanDriver;
|
||||
Sysman::globalSysmanDriver = nullptr;
|
||||
}
|
||||
globalDriverDispatch.core.isValidFlag = false;
|
||||
globalDriverDispatch.tools.isValidFlag = false;
|
||||
globalDriverDispatch.sysman.isValidFlag = false;
|
||||
L0::Sysman::globalSysmanDriverCleanup();
|
||||
}
|
||||
} // namespace L0
|
||||
|
||||
@@ -122,12 +122,5 @@ ze_result_t init(zes_init_flags_t flags) {
|
||||
}
|
||||
}
|
||||
|
||||
void globalSysmanDriverCleanup() {
|
||||
if (Sysman::globalSysmanDriver != nullptr) {
|
||||
delete Sysman::globalSysmanDriver;
|
||||
Sysman::globalSysmanDriver = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
||||
|
||||
@@ -24,7 +24,6 @@ struct SysmanDriver {
|
||||
|
||||
ze_result_t init(zes_init_flags_t);
|
||||
ze_result_t driverHandleGet(uint32_t *pCount, ze_driver_handle_t *phDrivers);
|
||||
void globalSysmanDriverCleanup();
|
||||
|
||||
extern uint32_t driverCount;
|
||||
extern _ze_driver_handle_t *globalSysmanDriverHandle;
|
||||
|
||||
@@ -631,14 +631,6 @@ TEST_F(SysmanDeviceFixture, GivenValidDeviceWhenRetrievingUuidThenValidFdIsVerif
|
||||
std::swap(rootDeviceEnvironment.productHelper, mockProductHelper);
|
||||
}
|
||||
|
||||
TEST(SysmanInitTest, GivenGlobalSysmanDriverPointerIsSetDuringSysmanInitThenWhenCallingGlobalSysmanDriverCleanupPointerIsNull) {
|
||||
auto sysmanDriverHandle = new L0::Sysman::SysmanDriverHandleImp();
|
||||
L0::Sysman::globalSysmanDriver = sysmanDriverHandle;
|
||||
EXPECT_NE(L0::Sysman::globalSysmanDriver, nullptr);
|
||||
L0::Sysman::globalSysmanDriverCleanup();
|
||||
EXPECT_EQ(L0::Sysman::globalSysmanDriver, nullptr);
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
||||
|
||||
@@ -16,15 +16,15 @@ namespace L0 {
|
||||
namespace Sysman {
|
||||
namespace ult {
|
||||
|
||||
class SysmanDeviceFixtureWithCore : public L0::ult::DeviceFixture, public SysmanDeviceFixture {
|
||||
class SysmanDeviceFixtureWithCore : public SysmanDeviceFixture, public L0::ult::DeviceFixture {
|
||||
protected:
|
||||
void SetUp() override {
|
||||
L0::ult::DeviceFixture::setUp();
|
||||
SysmanDeviceFixture::SetUp();
|
||||
L0::ult::DeviceFixture::setUp();
|
||||
}
|
||||
void TearDown() override {
|
||||
SysmanDeviceFixture::TearDown();
|
||||
L0::ult::DeviceFixture::tearDown();
|
||||
SysmanDeviceFixture::TearDown();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -161,14 +161,6 @@ TEST_F(SysmanDeviceFixture, GivenValidWddmSysmanImpWhenRetrievingUuidThenTrueIsR
|
||||
EXPECT_TRUE(result);
|
||||
}
|
||||
|
||||
TEST(SysmanInitTest, GivenGlobalSysmanDriverPointerIsSetDuringSysmanInitThenWhenCallingGlobalSysmanDriverCleanupPointerIsNull) {
|
||||
auto sysmanDriverHandle = new L0::Sysman::SysmanDriverHandleImp();
|
||||
L0::Sysman::globalSysmanDriver = sysmanDriverHandle;
|
||||
EXPECT_NE(L0::Sysman::globalSysmanDriver, nullptr);
|
||||
L0::Sysman::globalSysmanDriverCleanup();
|
||||
EXPECT_EQ(L0::Sysman::globalSysmanDriver, nullptr);
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
||||
|
||||
@@ -16,15 +16,15 @@ namespace L0 {
|
||||
namespace Sysman {
|
||||
namespace ult {
|
||||
|
||||
class SysmanDeviceFixtureWithCore : public L0::ult::DeviceFixture, public SysmanDeviceFixture {
|
||||
class SysmanDeviceFixtureWithCore : public SysmanDeviceFixture, public L0::ult::DeviceFixture {
|
||||
protected:
|
||||
void SetUp() override {
|
||||
L0::ult::DeviceFixture::setUp();
|
||||
SysmanDeviceFixture::SetUp();
|
||||
L0::ult::DeviceFixture::setUp();
|
||||
}
|
||||
void TearDown() override {
|
||||
SysmanDeviceFixture::TearDown();
|
||||
L0::ult::DeviceFixture::tearDown();
|
||||
SysmanDeviceFixture::TearDown();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -55,8 +55,7 @@ Device *WddmSysmanImp::getDeviceHandle() {
|
||||
}
|
||||
|
||||
ze_bool_t WddmSysmanImp::isDriverModelSupported() {
|
||||
auto usingZesInit = NEO::debugManager.flags.EnableSysmanLegacyModeUsingZesInit.get();
|
||||
return !usingZesInit;
|
||||
return true;
|
||||
}
|
||||
|
||||
std::vector<ze_device_handle_t> &WddmSysmanImp::getDeviceHandles() {
|
||||
|
||||
@@ -17,7 +17,6 @@ namespace L0 {
|
||||
namespace ult {
|
||||
|
||||
void SysmanDeviceFixture::SetUp() {
|
||||
debugManager.flags.EnableSysmanLegacyModeUsingZesInit.set(false);
|
||||
if (!sysmanUltsEnable) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ class SysmanDeviceFixture : public DeviceFixture, public SysmanEnabledFixture {
|
||||
SysmanDeviceImp *pSysmanDeviceImp = nullptr;
|
||||
OsSysman *pOsSysman = nullptr;
|
||||
PublicWddmSysmanImp *pWddmSysmanImp = nullptr;
|
||||
DebugManagerStateRestore restorer;
|
||||
};
|
||||
|
||||
} // namespace ult
|
||||
|
||||
@@ -95,12 +95,5 @@ TEST_F(SysmanDeviceFixture, GivenValidSysmanDeviceImpWhenOsSysmanInitFailsThenUn
|
||||
delete testOsSysman;
|
||||
}
|
||||
|
||||
TEST_F(SysmanDeviceFixture, GivenValidWddmSysmanImpWhenExternBooleanUseZesInitOnWddmIsTrueThenFalseIsReturned) {
|
||||
EXPECT_EQ(true, pWddmSysmanImp->isDriverModelSupported());
|
||||
debugManager.flags.EnableSysmanLegacyModeUsingZesInit.set(true);
|
||||
EXPECT_EQ(false, pWddmSysmanImp->isDriverModelSupported());
|
||||
debugManager.flags.EnableSysmanLegacyModeUsingZesInit.set(false);
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace L0
|
||||
|
||||
Reference in New Issue
Block a user