mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +08:00
Revert "Always init device with first submission"
This reverts commit 08f17761b4ee49d98df0b71041ba956faff3b960. Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9026c5912e
commit
d32a7ee7d0
@@ -884,10 +884,6 @@ TEST(DeviceTest, whenCheckBlitSplitEnabledThenReturnsTrue) {
|
|||||||
EXPECT_TRUE(Device::isBlitSplitEnabled());
|
EXPECT_TRUE(Device::isBlitSplitEnabled());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(DeviceTest, whenCheckIsInitDeviceWithFirstSubmissionEnabledThenReturnsTrue) {
|
|
||||||
EXPECT_TRUE(Device::isInitDeviceWithFirstSubmissionEnabled());
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST(PlatformsDestructor, whenGlobalPlatformsDestructorIsCalledThenGlobalPlatformsAreDestroyed) {
|
TEST(PlatformsDestructor, whenGlobalPlatformsDestructorIsCalledThenGlobalPlatformsAreDestroyed) {
|
||||||
EXPECT_NE(nullptr, platformsImpl);
|
EXPECT_NE(nullptr, platformsImpl);
|
||||||
platformsDestructor();
|
platformsDestructor();
|
||||||
|
|||||||
@@ -388,7 +388,7 @@ bool Device::createEngine(uint32_t deviceCsrIndex, EngineTypeUsage engineTypeUsa
|
|||||||
if (!defaultEngineAlreadySet) {
|
if (!defaultEngineAlreadySet) {
|
||||||
defaultEngineIndex = deviceCsrIndex;
|
defaultEngineIndex = deviceCsrIndex;
|
||||||
|
|
||||||
if (Device::isInitDeviceWithFirstSubmissionEnabled()) {
|
if (osContext->isDebuggableContext()) {
|
||||||
if (SubmissionStatus::SUCCESS != commandStreamReceiver->initializeDeviceWithFirstSubmission()) {
|
if (SubmissionStatus::SUCCESS != commandStreamReceiver->initializeDeviceWithFirstSubmission()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -405,7 +405,6 @@ bool Device::createEngine(uint32_t deviceCsrIndex, EngineTypeUsage engineTypeUsa
|
|||||||
if (engineUsage == EngineUsage::Regular) {
|
if (engineUsage == EngineUsage::Regular) {
|
||||||
addEngineToEngineGroup(engine);
|
addEngineToEngineGroup(engine);
|
||||||
}
|
}
|
||||||
|
|
||||||
commandStreamReceivers.push_back(std::move(commandStreamReceiver));
|
commandStreamReceivers.push_back(std::move(commandStreamReceiver));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -107,7 +107,6 @@ class Device : public ReferenceTrackedObject<Device> {
|
|||||||
RootDeviceEnvironment &getRootDeviceEnvironmentRef() const;
|
RootDeviceEnvironment &getRootDeviceEnvironmentRef() const;
|
||||||
bool isFullRangeSvm() const;
|
bool isFullRangeSvm() const;
|
||||||
static bool isBlitSplitEnabled();
|
static bool isBlitSplitEnabled();
|
||||||
static bool isInitDeviceWithFirstSubmissionEnabled();
|
|
||||||
bool isBcsSplitSupported();
|
bool isBcsSplitSupported();
|
||||||
bool areSharedSystemAllocationsAllowed() const;
|
bool areSharedSystemAllocationsAllowed() const;
|
||||||
template <typename SpecializedDeviceT>
|
template <typename SpecializedDeviceT>
|
||||||
|
|||||||
@@ -13,8 +13,4 @@ bool Device::isBlitSplitEnabled() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Device::isInitDeviceWithFirstSubmissionEnabled() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ void NEO::BaseUltConfigListener::OnTestEnd(const ::testing::TestInfo &) {
|
|||||||
|
|
||||||
// Ensure that global state is restored
|
// Ensure that global state is restored
|
||||||
UltHwConfig expectedState{};
|
UltHwConfig expectedState{};
|
||||||
static_assert(sizeof(UltHwConfig) == 14 * sizeof(bool), ""); // Ensure that there is no internal padding
|
static_assert(sizeof(UltHwConfig) == 13 * sizeof(bool), ""); // Ensure that there is no internal padding
|
||||||
EXPECT_EQ(0, memcmp(&expectedState, &ultHwConfig, sizeof(UltHwConfig)));
|
EXPECT_EQ(0, memcmp(&expectedState, &ultHwConfig, sizeof(UltHwConfig)));
|
||||||
|
|
||||||
EXPECT_EQ(0, memcmp(&referencedHwInfo.platform, &defaultHwInfo->platform, sizeof(PLATFORM)));
|
EXPECT_EQ(0, memcmp(&referencedHwInfo.platform, &defaultHwInfo->platform, sizeof(PLATFORM)));
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ struct UltHwConfig {
|
|||||||
bool forceOsAgnosticMemoryManager = true;
|
bool forceOsAgnosticMemoryManager = true;
|
||||||
bool useWaitForTimestamps = false;
|
bool useWaitForTimestamps = false;
|
||||||
bool useBlitSplit = false;
|
bool useBlitSplit = false;
|
||||||
bool useFirstSubmissionInitDevice = false;
|
|
||||||
|
|
||||||
bool csrFailInitDirectSubmission = false;
|
bool csrFailInitDirectSubmission = false;
|
||||||
bool csrBaseCallDirectSubmissionAvailable = false;
|
bool csrBaseCallDirectSubmissionAvailable = false;
|
||||||
|
|||||||
@@ -14,8 +14,4 @@ bool Device::isBlitSplitEnabled() {
|
|||||||
return ultHwConfig.useBlitSplit;
|
return ultHwConfig.useBlitSplit;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Device::isInitDeviceWithFirstSubmissionEnabled() {
|
|
||||||
return ultHwConfig.useFirstSubmissionInitDevice;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|||||||
@@ -673,9 +673,6 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DeviceTests, givenZexNumberOfCssEnvVariableSetAmbig
|
|||||||
}
|
}
|
||||||
|
|
||||||
HWCMDTEST_F(IGFX_XE_HP_CORE, DeviceTests, givenDebuggableOsContextWhenDeviceCreatesEnginesThenDeviceIsInitializedWithFirstSubmission) {
|
HWCMDTEST_F(IGFX_XE_HP_CORE, DeviceTests, givenDebuggableOsContextWhenDeviceCreatesEnginesThenDeviceIsInitializedWithFirstSubmission) {
|
||||||
VariableBackup<UltHwConfig> backup(&ultHwConfig);
|
|
||||||
ultHwConfig.useFirstSubmissionInitDevice = true;
|
|
||||||
|
|
||||||
auto hwInfo = *defaultHwInfo;
|
auto hwInfo = *defaultHwInfo;
|
||||||
hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, true, 0);
|
hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, true, 0);
|
||||||
|
|
||||||
@@ -690,10 +687,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DeviceTests, givenDebuggableOsContextWhenDeviceCrea
|
|||||||
EXPECT_EQ(1u, csr->peekLatestSentTaskCount());
|
EXPECT_EQ(1u, csr->peekLatestSentTaskCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
HWCMDTEST_F(IGFX_XE_HP_CORE, DeviceTests, whenDeviceCreatesEnginesThenDeviceIsInitializedWithFirstSubmission) {
|
HWCMDTEST_F(IGFX_XE_HP_CORE, DeviceTests, givenNonDebuggableOsContextWhenDeviceCreatesEnginesThenDeviceIsNotInitializedWithFirstSubmission) {
|
||||||
VariableBackup<UltHwConfig> backup(&ultHwConfig);
|
|
||||||
ultHwConfig.useFirstSubmissionInitDevice = true;
|
|
||||||
|
|
||||||
auto hwInfo = *defaultHwInfo;
|
auto hwInfo = *defaultHwInfo;
|
||||||
hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, true, 0);
|
hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, true, 0);
|
||||||
|
|
||||||
@@ -704,7 +698,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DeviceTests, whenDeviceCreatesEnginesThenDeviceIsIn
|
|||||||
|
|
||||||
auto device = deviceFactory.rootDevices[0];
|
auto device = deviceFactory.rootDevices[0];
|
||||||
auto csr = device->allEngines[device->defaultEngineIndex].commandStreamReceiver;
|
auto csr = device->allEngines[device->defaultEngineIndex].commandStreamReceiver;
|
||||||
EXPECT_EQ(1u, csr->peekLatestSentTaskCount());
|
EXPECT_EQ(0u, csr->peekLatestSentTaskCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(FailDeviceTest, GivenFailedDeviceWhenCreatingDeviceThenNullIsReturned) {
|
TEST(FailDeviceTest, GivenFailedDeviceWhenCreatingDeviceThenNullIsReturned) {
|
||||||
|
|||||||
Reference in New Issue
Block a user