mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 23:33:20 +08:00
Use new residency model by default
Related-To: NEO-5007 Change-Id: Id39ac53e00e126237200d80e493706e2eed53b30 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
@@ -110,4 +110,11 @@ Drm *Drm::create(std::unique_ptr<HwDeviceId> hwDeviceId, RootDeviceEnvironment &
|
||||
}
|
||||
return drmObject.release();
|
||||
}
|
||||
|
||||
void Drm::overrideBindSupport(bool &useVmBind) {
|
||||
if (DebugManager.flags.UseVmBind.get() != -1) {
|
||||
useVmBind = DebugManager.flags.UseVmBind.get();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -215,6 +215,23 @@ TEST(DrmTest, GivenSelectedIncorectDeviceWhenGetDeviceFdThenFail) {
|
||||
EXPECT_TRUE(hwDeviceIds.empty());
|
||||
}
|
||||
|
||||
TEST(DrmTest, givenUseVmBindFlagWhenOverrideBindSupportThenReturnProperValue) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
bool useVmBind = false;
|
||||
|
||||
DebugManager.flags.UseVmBind.set(1);
|
||||
Drm::overrideBindSupport(useVmBind);
|
||||
EXPECT_TRUE(useVmBind);
|
||||
|
||||
DebugManager.flags.UseVmBind.set(0);
|
||||
Drm::overrideBindSupport(useVmBind);
|
||||
EXPECT_FALSE(useVmBind);
|
||||
|
||||
DebugManager.flags.UseVmBind.set(-1);
|
||||
Drm::overrideBindSupport(useVmBind);
|
||||
EXPECT_FALSE(useVmBind);
|
||||
}
|
||||
|
||||
TEST_F(DrmTests, createReturnsDrm) {
|
||||
auto drm = DrmWrap::createDrm(*rootDeviceEnvironment);
|
||||
EXPECT_NE(drm, nullptr);
|
||||
|
||||
@@ -40,4 +40,12 @@ Drm *Drm::create(std::unique_ptr<HwDeviceId> hwDeviceId, RootDeviceEnvironment &
|
||||
}
|
||||
return drm;
|
||||
}
|
||||
|
||||
void Drm::overrideBindSupport(bool &useVmBind) {
|
||||
useVmBind = false;
|
||||
if (DebugManager.flags.UseVmBind.get() == 1) {
|
||||
useVmBind = true;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -86,6 +86,7 @@ DirectSubmissionDiagnosticExecutionCount = 30
|
||||
DirectSubmissionDisableCacheFlush = 0
|
||||
DirectSubmissionDisableMonitorFence = 0
|
||||
USMEvictAfterMigration = 1
|
||||
UseVmBind = -1
|
||||
EnableNullHardware = 0
|
||||
ForceLinearImages = 0
|
||||
ForceSLML3Config = 0
|
||||
|
||||
@@ -203,6 +203,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, ForceUserptrAlignment, -1, "-1: no force (4kb),
|
||||
DECLARE_DEBUG_VARIABLE(int64_t, ForceSystemMemoryPlacement, 0, "0: default, >0: (bitmask) for given Graphics Allocation Type, force system memory placement")
|
||||
DECLARE_DEBUG_VARIABLE(int64_t, ForceNonSystemMemoryPlacement, 0, "0: default, >0: (bitmask) for given Graphics Allocation Type, force non-system memory placement")
|
||||
DECLARE_DEBUG_VARIABLE(int64_t, DisableIndirectAccess, -1, "0: default, 0: Indirect access for L0 kernels is enabled, 1: Indirect is disabled")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, UseVmBind, -1, "Use new residency model on Linux (requires kernel support), -1: default, 0: disabled, 1: enabled")
|
||||
DECLARE_DEBUG_VARIABLE(bool, UseMaxSimdSizeToDeduceMaxWorkgroupSize, false, "With this flag on, max workgroup size is deduced using SIMD32 instead of SIMD8, this causes the max wkg size to be 4 times bigger")
|
||||
DECLARE_DEBUG_VARIABLE(bool, ReturnRawGpuTimestamps, false, "Driver returns raw GPU tiemstamps instead of calculated ones.")
|
||||
DECLARE_DEBUG_VARIABLE(bool, ForcePerDssBackedBufferProgramming, false, "Always program per-DSS memory backed buffer in preamble")
|
||||
|
||||
@@ -141,6 +141,7 @@ class Drm {
|
||||
static bool isi915Version(int fd);
|
||||
|
||||
static Drm *create(std::unique_ptr<HwDeviceId> hwDeviceId, RootDeviceEnvironment &rootDeviceEnvironment);
|
||||
static void overrideBindSupport(bool &useVmBind);
|
||||
|
||||
protected:
|
||||
int getQueueSliceCount(drm_i915_gem_context_param_sseu *sseu);
|
||||
|
||||
Reference in New Issue
Block a user