mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 23:33:20 +08:00
Always init device with first submission
Resolves: NEO-7642 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
e692246315
commit
831e2eebcd
@@ -388,7 +388,7 @@ bool Device::createEngine(uint32_t deviceCsrIndex, EngineTypeUsage engineTypeUsa
|
||||
if (!defaultEngineAlreadySet) {
|
||||
defaultEngineIndex = deviceCsrIndex;
|
||||
|
||||
if (osContext->isDebuggableContext()) {
|
||||
if (Device::isInitDeviceWithFirstSubmissionEnabled()) {
|
||||
if (SubmissionStatus::SUCCESS != commandStreamReceiver->initializeDeviceWithFirstSubmission()) {
|
||||
return false;
|
||||
}
|
||||
@@ -405,6 +405,7 @@ bool Device::createEngine(uint32_t deviceCsrIndex, EngineTypeUsage engineTypeUsa
|
||||
if (engineUsage == EngineUsage::Regular) {
|
||||
addEngineToEngineGroup(engine);
|
||||
}
|
||||
|
||||
commandStreamReceivers.push_back(std::move(commandStreamReceiver));
|
||||
|
||||
return true;
|
||||
|
||||
@@ -107,6 +107,7 @@ class Device : public ReferenceTrackedObject<Device> {
|
||||
RootDeviceEnvironment &getRootDeviceEnvironmentRef() const;
|
||||
bool isFullRangeSvm() const;
|
||||
static bool isBlitSplitEnabled();
|
||||
static bool isInitDeviceWithFirstSubmissionEnabled();
|
||||
bool isBcsSplitSupported();
|
||||
bool areSharedSystemAllocationsAllowed() const;
|
||||
template <typename SpecializedDeviceT>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -13,4 +13,8 @@ bool Device::isBlitSplitEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Device::isInitDeviceWithFirstSubmissionEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -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)));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -14,6 +14,7 @@ struct UltHwConfig {
|
||||
bool forceOsAgnosticMemoryManager = true;
|
||||
bool useWaitForTimestamps = false;
|
||||
bool useBlitSplit = false;
|
||||
bool useFirstSubmissionInitDevice = false;
|
||||
|
||||
bool csrFailInitDirectSubmission = false;
|
||||
bool csrBaseCallDirectSubmissionAvailable = false;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -14,4 +14,8 @@ bool Device::isBlitSplitEnabled() {
|
||||
return ultHwConfig.useBlitSplit;
|
||||
}
|
||||
|
||||
bool Device::isInitDeviceWithFirstSubmissionEnabled() {
|
||||
return ultHwConfig.useFirstSubmissionInitDevice;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -669,6 +669,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);
|
||||
|
||||
@@ -683,7 +686,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);
|
||||
|
||||
@@ -694,5 +700,5 @@ 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(1u, csr->peekLatestSentTaskCount());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user