Revert "Flush task at device init"
This reverts commit 73bd55ad40
.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
parent
b3eb1561f8
commit
44032a4386
|
@ -5,7 +5,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_stream/command_stream_receiver.h"
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/helpers/constants.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
|
@ -81,9 +80,6 @@ ze_result_t MetricIpSamplingLinuxImp::startMeasurement(uint32_t ¬ifyEveryNRep
|
|||
|
||||
DeviceImp &deviceImp = static_cast<DeviceImp &>(device);
|
||||
|
||||
auto csr = deviceImp.getNEODevice()->getDefaultEngine().commandStreamReceiver;
|
||||
csr->waitForTaskCountWithKmdNotifyFallback(csr->peekTaskCount(), 0, false, NEO::QueueThrottle::MEDIUM);
|
||||
|
||||
auto ioctlHelper = drm->getIoctlHelper();
|
||||
uint32_t euStallFdParameter = ioctlHelper->getEuStallFdParameter();
|
||||
std::array<uint64_t, 12u> properties;
|
||||
|
|
|
@ -238,17 +238,6 @@ HWTEST_TEMPLATED_F(BlitAuxTranslationTests, whenFlushTagUpdateThenSetStallingCmd
|
|||
EXPECT_TRUE(ultCsr->latestFlushedBatchBuffer.hasStallingCmds);
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(BlitAuxTranslationTests, whenInitializeDeviceWithFirstSubmissionThenMiFlushDwIsFlushed) {
|
||||
using MI_FLUSH_DW = typename FamilyType::MI_FLUSH_DW;
|
||||
|
||||
EXPECT_EQ(SubmissionStatus::SUCCESS, bcsCsr->initializeDeviceWithFirstSubmission());
|
||||
|
||||
auto cmdListBcs = getCmdList<FamilyType>(bcsCsr->getCS(0), 0);
|
||||
|
||||
auto cmdFound = expectCommand<MI_FLUSH_DW>(cmdListBcs.begin(), cmdListBcs.end());
|
||||
EXPECT_NE(cmdFound, cmdListBcs.end());
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(BlitAuxTranslationTests, givenBlitTranslationWhenConstructingCommandBufferThenSynchronizeBcsOutput) {
|
||||
using XY_COPY_BLT = typename FamilyType::XY_COPY_BLT;
|
||||
using MI_FLUSH_DW = typename FamilyType::MI_FLUSH_DW;
|
||||
|
|
|
@ -884,14 +884,6 @@ TEST(DeviceTest, whenCheckBlitSplitEnabledThenReturnsTrue) {
|
|||
EXPECT_TRUE(Device::isBlitSplitEnabled());
|
||||
}
|
||||
|
||||
TEST(DeviceTest, givenCsrHwWhenCheckIsInitDeviceWithFirstSubmissionEnabledThenReturnsTrue) {
|
||||
EXPECT_TRUE(Device::isInitDeviceWithFirstSubmissionEnabled(CommandStreamReceiverType::CSR_HW));
|
||||
}
|
||||
|
||||
TEST(DeviceTest, givenCsrNonHwWhenCheckIsInitDeviceWithFirstSubmissionEnabledThenReturnsTrue) {
|
||||
EXPECT_FALSE(Device::isInitDeviceWithFirstSubmissionEnabled(CommandStreamReceiverType::CSR_TBX));
|
||||
}
|
||||
|
||||
TEST(PlatformsDestructor, whenGlobalPlatformsDestructorIsCalledThenGlobalPlatformsAreDestroyed) {
|
||||
EXPECT_NE(nullptr, platformsImpl);
|
||||
platformsDestructor();
|
||||
|
|
|
@ -1349,13 +1349,9 @@ SubmissionStatus CommandStreamReceiverHw<GfxFamily>::flushPipeControl() {
|
|||
args.notifyEnable = isUsedNotifyEnableForPostSync();
|
||||
args.workloadPartitionOffset = isMultiTileOperationEnabled();
|
||||
|
||||
auto dispatchSize = MemorySynchronizationCommands<GfxFamily>::getSizeForBarrierWithPostSyncOperation(hwInfo, args.tlbInvalidation) + this->getCmdSizeForPrologue();
|
||||
|
||||
auto &commandStream = getCS(dispatchSize);
|
||||
auto &commandStream = getCS(MemorySynchronizationCommands<GfxFamily>::getSizeForBarrierWithPostSyncOperation(hwInfo, args.tlbInvalidation));
|
||||
auto commandStreamStart = commandStream.getUsed();
|
||||
|
||||
this->programEnginePrologue(commandStream);
|
||||
|
||||
MemorySynchronizationCommands<GfxFamily>::addBarrierWithPostSyncOperation(commandStream,
|
||||
PostSyncMode::ImmediateData,
|
||||
getTagAllocation()->getGpuAddress(),
|
||||
|
@ -1364,7 +1360,6 @@ SubmissionStatus CommandStreamReceiverHw<GfxFamily>::flushPipeControl() {
|
|||
args);
|
||||
|
||||
makeResident(*tagAllocation);
|
||||
makeResident(*commandStream.getGraphicsAllocation());
|
||||
|
||||
auto submissionStatus = this->flushSmallTask(commandStream, commandStreamStart);
|
||||
this->latestFlushedTaskCount = taskCount.load();
|
||||
|
@ -1602,7 +1597,11 @@ void CommandStreamReceiverHw<GfxFamily>::createKernelArgsBufferAllocation() {
|
|||
|
||||
template <typename GfxFamily>
|
||||
SubmissionStatus CommandStreamReceiverHw<GfxFamily>::initializeDeviceWithFirstSubmission() {
|
||||
return flushTagUpdate();
|
||||
auto lock = obtainUniqueOwnership();
|
||||
|
||||
auto &commandStream = getCS(EncodeBatchBufferStartOrEnd<GfxFamily>::getBatchBufferEndSize());
|
||||
auto commandStreamStart = commandStream.getUsed();
|
||||
return this->flushSmallTask(commandStream, commandStreamStart);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
|
|
|
@ -381,18 +381,13 @@ bool Device::createEngine(uint32_t deviceCsrIndex, EngineTypeUsage engineTypeUsa
|
|||
|
||||
commandStreamReceiver->createKernelArgsBufferAllocation();
|
||||
|
||||
if (preemptionMode == PreemptionMode::MidThread && !commandStreamReceiver->createPreemptionAllocation()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isDefaultEngine) {
|
||||
bool defaultEngineAlreadySet = (allEngines.size() > defaultEngineIndex) && (allEngines[defaultEngineIndex].getEngineType() == engineType);
|
||||
|
||||
if (!defaultEngineAlreadySet) {
|
||||
defaultEngineIndex = deviceCsrIndex;
|
||||
|
||||
if (osContext->isDebuggableContext() ||
|
||||
this->isInitDeviceWithFirstSubmissionSupported(commandStreamReceiver->getType())) {
|
||||
if (osContext->isDebuggableContext()) {
|
||||
if (SubmissionStatus::SUCCESS != commandStreamReceiver->initializeDeviceWithFirstSubmission()) {
|
||||
return false;
|
||||
}
|
||||
|
@ -404,12 +399,15 @@ bool Device::createEngine(uint32_t deviceCsrIndex, EngineTypeUsage engineTypeUsa
|
|||
defaultBcsEngineIndex = deviceCsrIndex;
|
||||
}
|
||||
|
||||
if (preemptionMode == PreemptionMode::MidThread && !commandStreamReceiver->createPreemptionAllocation()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
EngineControl engine{commandStreamReceiver.get(), osContext};
|
||||
allEngines.push_back(engine);
|
||||
if (engineUsage == EngineUsage::Regular) {
|
||||
addEngineToEngineGroup(engine);
|
||||
}
|
||||
|
||||
commandStreamReceivers.push_back(std::move(commandStreamReceiver));
|
||||
|
||||
return true;
|
||||
|
@ -442,11 +440,6 @@ bool Device::isBcsSplitSupported() {
|
|||
return bcsSplit;
|
||||
}
|
||||
|
||||
bool Device::isInitDeviceWithFirstSubmissionSupported(CommandStreamReceiverType csrType) {
|
||||
return getProductHelper().isInitDeviceWithFirstSubmissionRequired(getHardwareInfo()) &&
|
||||
Device::isInitDeviceWithFirstSubmissionEnabled(csrType);
|
||||
}
|
||||
|
||||
double Device::getPlatformHostTimerResolution() const {
|
||||
if (getOSTime()) {
|
||||
return getOSTime()->getHostTimerResolution();
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "shared/source/helpers/engine_control.h"
|
||||
#include "shared/source/helpers/engine_node_helper.h"
|
||||
#include "shared/source/helpers/non_copyable_or_moveable.h"
|
||||
#include "shared/source/helpers/options.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/source/os_interface/performance_counters.h"
|
||||
#include "shared/source/utilities/reference_tracked_object.h"
|
||||
|
@ -109,9 +108,7 @@ class Device : public ReferenceTrackedObject<Device> {
|
|||
RootDeviceEnvironment &getRootDeviceEnvironmentRef() const;
|
||||
bool isFullRangeSvm() const;
|
||||
static bool isBlitSplitEnabled();
|
||||
static bool isInitDeviceWithFirstSubmissionEnabled(CommandStreamReceiverType csrType);
|
||||
bool isBcsSplitSupported();
|
||||
bool isInitDeviceWithFirstSubmissionSupported(CommandStreamReceiverType csrType);
|
||||
bool areSharedSystemAllocationsAllowed() const;
|
||||
template <typename SpecializedDeviceT>
|
||||
void setSpecializedDevice(SpecializedDeviceT *specializedDevice) {
|
||||
|
|
|
@ -13,8 +13,4 @@ bool Device::isBlitSplitEnabled() {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Device::isInitDeviceWithFirstSubmissionEnabled(CommandStreamReceiverType csrType) {
|
||||
return csrType == CommandStreamReceiverType::CSR_HW;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "shared/source/command_stream/submission_status.h"
|
||||
#include "shared/source/command_stream/task_count_helper.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
@ -15,6 +14,7 @@
|
|||
|
||||
namespace NEO {
|
||||
using FlushStamp = uint64_t;
|
||||
enum class SubmissionStatus : uint32_t;
|
||||
struct CompletionStamp {
|
||||
static TaskCountType getTaskCountFromSubmissionStatusError(SubmissionStatus submissionStatus);
|
||||
|
||||
|
|
|
@ -135,7 +135,6 @@ class ProductHelper {
|
|||
virtual bool allowMemoryPrefetch(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isBcsReportWaRequired(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isBlitSplitEnqueueWARequired(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isInitDeviceWithFirstSubmissionRequired(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isBlitCopyRequiredForLocalMemory(const HardwareInfo &hwInfo, const GraphicsAllocation &allocation) const = 0;
|
||||
virtual bool isImplicitScalingSupported(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isCpuCopyNecessary(const void *ptr, MemoryManager *memoryManager) const = 0;
|
||||
|
@ -281,7 +280,6 @@ class ProductHelperHw : public ProductHelper {
|
|||
bool isTimestampWaitSupportedForEvents() const override;
|
||||
bool isTilePlacementResourceWaRequired(const HardwareInfo &hwInfo) const override;
|
||||
bool isBlitSplitEnqueueWARequired(const HardwareInfo &hwInfo) const override;
|
||||
bool isInitDeviceWithFirstSubmissionRequired(const HardwareInfo &hwInfo) const override;
|
||||
bool allowMemoryPrefetch(const HardwareInfo &hwInfo) const override;
|
||||
bool isBcsReportWaRequired(const HardwareInfo &hwInfo) const override;
|
||||
bool isBlitCopyRequiredForLocalMemory(const HardwareInfo &hwInfo, const GraphicsAllocation &allocation) const override;
|
||||
|
|
|
@ -469,11 +469,6 @@ bool ProductHelperHw<gfxProduct>::isBlitSplitEnqueueWARequired(const HardwareInf
|
|||
return false;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool ProductHelperHw<gfxProduct>::isInitDeviceWithFirstSubmissionRequired(const HardwareInfo &hwInfo) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool ProductHelperHw<gfxProduct>::isBlitCopyRequiredForLocalMemory(const HardwareInfo &hwInfo, const GraphicsAllocation &allocation) const {
|
||||
return allocation.isAllocatedInLocalMemoryPool() &&
|
||||
|
|
|
@ -173,11 +173,6 @@ bool ProductHelperHw<gfxProduct>::isBlitSplitEnqueueWARequired(const HardwareInf
|
|||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::isInitDeviceWithFirstSubmissionRequired(const HardwareInfo &hwInfo) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::isImplicitScalingSupported(const HardwareInfo &hwInfo) const {
|
||||
return getSteppingFromHwRevId(hwInfo) >= REVISION_B;
|
||||
|
|
|
@ -36,7 +36,7 @@ void NEO::BaseUltConfigListener::OnTestEnd(const ::testing::TestInfo &) {
|
|||
|
||||
// Ensure that global state is restored
|
||||
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(&referencedHwInfo.platform, &defaultHwInfo->platform, sizeof(PLATFORM)));
|
||||
|
|
|
@ -14,7 +14,6 @@ struct UltHwConfig {
|
|||
bool forceOsAgnosticMemoryManager = true;
|
||||
bool useWaitForTimestamps = false;
|
||||
bool useBlitSplit = false;
|
||||
bool useFirstSubmissionInitDevice = false;
|
||||
|
||||
bool csrFailInitDirectSubmission = false;
|
||||
bool csrBaseCallDirectSubmissionAvailable = false;
|
||||
|
|
|
@ -7,14 +7,11 @@
|
|||
|
||||
#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
|
||||
|
|
|
@ -673,9 +673,6 @@ 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);
|
||||
|
||||
|
@ -690,10 +687,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DeviceTests, givenDebuggableOsContextWhenDeviceCrea
|
|||
EXPECT_EQ(1u, csr->peekLatestSentTaskCount());
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, DeviceTests, whenDeviceCreatesEnginesThenDeviceIsInitializedWithFirstSubmission) {
|
||||
VariableBackup<UltHwConfig> backup(&ultHwConfig);
|
||||
ultHwConfig.useFirstSubmissionInitDevice = true;
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, DeviceTests, givenNonDebuggableOsContextWhenDeviceCreatesEnginesThenDeviceIsNotInitializedWithFirstSubmission) {
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
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 csr = device->allEngines[device->defaultEngineIndex].commandStreamReceiver;
|
||||
EXPECT_EQ(device->isInitDeviceWithFirstSubmissionSupported(csr->getType()), csr->peekLatestSentTaskCount());
|
||||
EXPECT_EQ(0u, csr->peekLatestSentTaskCount());
|
||||
}
|
||||
|
||||
TEST(FailDeviceTest, GivenFailedDeviceWhenCreatingDeviceThenNullIsReturned) {
|
||||
|
|
Loading…
Reference in New Issue