Flush task at device init

Resolves: NEO-7642

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2023-01-27 12:37:09 +00:00
committed by Compute-Runtime-Automation
parent d2628babbc
commit 2abbd82195
16 changed files with 81 additions and 17 deletions

View File

@@ -36,7 +36,7 @@ void NEO::BaseUltConfigListener::OnTestEnd(const ::testing::TestInfo &) {
// Ensure that global state is restored
UltHwConfig expectedState{};
static_assert(sizeof(UltHwConfig) == 13 * sizeof(bool), ""); // Ensure that there is no internal padding
static_assert(sizeof(UltHwConfig) == 14 * sizeof(bool), ""); // Ensure that there is no internal padding
EXPECT_EQ(0, memcmp(&expectedState, &ultHwConfig, sizeof(UltHwConfig)));
EXPECT_EQ(0, memcmp(&referencedHwInfo.platform, &defaultHwInfo->platform, sizeof(PLATFORM)));

View File

@@ -14,6 +14,7 @@ struct UltHwConfig {
bool forceOsAgnosticMemoryManager = true;
bool useWaitForTimestamps = false;
bool useBlitSplit = false;
bool useFirstSubmissionInitDevice = false;
bool csrFailInitDirectSubmission = false;
bool csrBaseCallDirectSubmissionAvailable = false;

View File

@@ -7,11 +7,14 @@
#include "shared/source/device/device.h"
#include "shared/test/common/helpers/ult_hw_config.h"
namespace NEO {
bool Device::isBlitSplitEnabled() {
return ultHwConfig.useBlitSplit;
}
bool Device::isInitDeviceWithFirstSubmissionEnabled(CommandStreamReceiverType csrType) {
return ultHwConfig.useFirstSubmissionInitDevice;
}
} // namespace NEO

View File

@@ -673,6 +673,9 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DeviceTests, givenZexNumberOfCssEnvVariableSetAmbig
}
HWCMDTEST_F(IGFX_XE_HP_CORE, DeviceTests, givenDebuggableOsContextWhenDeviceCreatesEnginesThenDeviceIsInitializedWithFirstSubmission) {
VariableBackup<UltHwConfig> backup(&ultHwConfig);
ultHwConfig.useFirstSubmissionInitDevice = true;
auto hwInfo = *defaultHwInfo;
hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, true, 0);
@@ -687,7 +690,10 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DeviceTests, givenDebuggableOsContextWhenDeviceCrea
EXPECT_EQ(1u, csr->peekLatestSentTaskCount());
}
HWCMDTEST_F(IGFX_XE_HP_CORE, DeviceTests, givenNonDebuggableOsContextWhenDeviceCreatesEnginesThenDeviceIsNotInitializedWithFirstSubmission) {
HWCMDTEST_F(IGFX_XE_HP_CORE, DeviceTests, whenDeviceCreatesEnginesThenDeviceIsInitializedWithFirstSubmission) {
VariableBackup<UltHwConfig> backup(&ultHwConfig);
ultHwConfig.useFirstSubmissionInitDevice = true;
auto hwInfo = *defaultHwInfo;
hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, true, 0);
@@ -698,7 +704,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DeviceTests, givenNonDebuggableOsContextWhenDeviceC
auto device = deviceFactory.rootDevices[0];
auto csr = device->allEngines[device->defaultEngineIndex].commandStreamReceiver;
EXPECT_EQ(0u, csr->peekLatestSentTaskCount());
EXPECT_EQ(device->isInitDeviceWithFirstSubmissionSupported(csr->getType()), csr->peekLatestSentTaskCount());
}
TEST(FailDeviceTest, GivenFailedDeviceWhenCreatingDeviceThenNullIsReturned) {