Skip to content

Commit 0f54a57

Browse files
Update programming STATE_COMPUTE_MODE
Remove function clearComputeModePropertiesIfNeeded. If a field has to be programmed unconditionally, ignore isDirty flag. Related-To: NEO-6728 Signed-off-by: Filip Hazubski <[email protected]>
1 parent 3905fa7 commit 0f54a57

File tree

23 files changed

+85
-156
lines changed

23 files changed

+85
-156
lines changed

level_zero/core/source/cmdlist/cmdlist_hw.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ struct CommandListCoreFamily : CommandListImp {
225225
ze_result_t appendLaunchKernelSplit(ze_kernel_handle_t hKernel, const ze_group_count_t *pThreadGroupDimensions, ze_event_handle_t hEvent);
226226
ze_result_t prepareIndirectParams(const ze_group_count_t *pThreadGroupDimensions);
227227
void updateStreamProperties(Kernel &kernel, bool isMultiOsContextCapable, bool isCooperative);
228-
virtual void clearComputeModePropertiesIfNeeded(bool requiresCoherency, uint32_t numGrfRequired, uint32_t threadArbitrationPolicy);
229228
void clearCommandsToPatch();
230229

231230
void applyMemoryRangesBarrier(uint32_t numRanges, const size_t *pRangeSizes,

level_zero/core/source/cmdlist/cmdlist_hw.inl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2255,15 +2255,11 @@ void CommandListCoreFamily<gfxCoreFamily>::updateStreamProperties(Kernel &kernel
22552255
finalStreamState.stateComputeMode.setProperties(false, kernelAttributes.numGrfRequired, this->threadArbitrationPolicy);
22562256

22572257
if (finalStreamState.stateComputeMode.isDirty()) {
2258-
clearComputeModePropertiesIfNeeded(false, kernelAttributes.numGrfRequired, this->threadArbitrationPolicy);
22592258
NEO::EncodeWA<GfxFamily>::encodeAdditionalPipelineSelect(neoDevice, *commandContainer.getCommandStream(), true);
22602259
NEO::EncodeComputeMode<GfxFamily>::programComputeModeCommand(*commandContainer.getCommandStream(), finalStreamState.stateComputeMode, hwInfo);
22612260
NEO::EncodeWA<GfxFamily>::encodeAdditionalPipelineSelect(neoDevice, *commandContainer.getCommandStream(), false);
22622261
}
22632262
}
2264-
template <GFXCORE_FAMILY gfxCoreFamily>
2265-
void CommandListCoreFamily<gfxCoreFamily>::clearComputeModePropertiesIfNeeded(bool requiresCoherency, uint32_t numGrfRequired, uint32_t threadArbitrationPolicy) {
2266-
}
22672263

22682264
template <GFXCORE_FAMILY gfxCoreFamily>
22692265
void CommandListCoreFamily<gfxCoreFamily>::clearCommandsToPatch() {

level_zero/core/source/gen12lp/cmdlist_gen12lp.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2020-2021 Intel Corporation
2+
* Copyright (C) 2020-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -15,11 +15,6 @@
1515
#include "cmdlist_extended.inl"
1616

1717
namespace L0 {
18-
template <>
19-
void CommandListCoreFamily<IGFX_GEN12LP_CORE>::clearComputeModePropertiesIfNeeded(bool requiresCoherency, uint32_t numGrfRequired, uint32_t threadArbitrationPolicy) {
20-
finalStreamState.stateComputeMode = {};
21-
finalStreamState.stateComputeMode.setProperties(false, numGrfRequired, threadArbitrationPolicy);
22-
}
2318

2419
template struct CommandListCoreFamily<IGFX_GEN12LP_CORE>;
2520
template struct CommandListCoreFamilyImmediate<IGFX_GEN12LP_CORE>;

level_zero/core/source/xe_hp_core/cmdlist_xe_hp_core.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414
#include "cmdlist_extended.inl"
1515

1616
namespace L0 {
17-
template <>
18-
void CommandListCoreFamily<IGFX_XE_HP_CORE>::clearComputeModePropertiesIfNeeded(bool requiresCoherency, uint32_t numGrfRequired, uint32_t threadArbitrationPolicy) {
19-
finalStreamState.stateComputeMode = {};
20-
finalStreamState.stateComputeMode.setProperties(requiresCoherency, numGrfRequired, threadArbitrationPolicy);
21-
}
2217

2318
template struct CommandListCoreFamily<IGFX_XE_HP_CORE>;
2419
template struct CommandListCoreFamilyImmediate<IGFX_XE_HP_CORE>;

level_zero/core/source/xe_hpg_core/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2021 Intel Corporation
2+
# Copyright (C) 2021-2022 Intel Corporation
33
#
44
# SPDX-License-Identifier: MIT
55
#
@@ -9,7 +9,6 @@ if(SUPPORT_XE_HPG_CORE)
99
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
1010
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_xe_hpg_core.cpp
1111
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_xe_hpg_core.h
12-
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_xe_hpg_core.inl
1312
${CMAKE_CURRENT_SOURCE_DIR}/debugger_xe_hpg_core.cpp
1413
${CMAKE_CURRENT_SOURCE_DIR}/image_xe_hpg_core.inl
1514
${CMAKE_CURRENT_SOURCE_DIR}/sampler_xe_hpg_core.inl

level_zero/core/source/xe_hpg_core/cmdlist_xe_hpg_core.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021 Intel Corporation
2+
* Copyright (C) 2021-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -14,11 +14,6 @@
1414
#include "cmdlist_extended.inl"
1515

1616
namespace L0 {
17-
template <>
18-
void CommandListCoreFamily<IGFX_XE_HPG_CORE>::clearComputeModePropertiesIfNeeded(bool requiresCoherency, uint32_t numGrfRequired, uint32_t threadArbitrationPolicy) {
19-
finalStreamState.stateComputeMode = {};
20-
finalStreamState.stateComputeMode.setProperties(requiresCoherency, numGrfRequired, threadArbitrationPolicy);
21-
}
2217

2318
template struct CommandListCoreFamily<IGFX_XE_HPG_CORE>;
2419
template struct CommandListCoreFamilyImmediate<IGFX_XE_HPG_CORE>;

level_zero/core/source/xe_hpg_core/cmdlist_xe_hpg_core.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021 Intel Corporation
2+
* Copyright (C) 2021-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -15,7 +15,6 @@ namespace L0 {
1515
template <PRODUCT_FAMILY productFamily>
1616
struct CommandListProductFamily : public CommandListCoreFamily<IGFX_XE_HPG_CORE> {
1717
using CommandListCoreFamily::CommandListCoreFamily;
18-
void clearComputeModePropertiesIfNeeded(bool requiresCoherency, uint32_t numGrfRequired, uint32_t threadArbitrationPolicy) override;
1918
};
2019
template <PRODUCT_FAMILY gfxProductFamily>
2120
struct CommandListImmediateProductFamily : public CommandListCoreFamilyImmediate<IGFX_XE_HPG_CORE> {

level_zero/core/source/xe_hpg_core/cmdlist_xe_hpg_core.inl

Lines changed: 0 additions & 17 deletions
This file was deleted.

level_zero/core/source/xe_hpg_core/dg2/cmdlist_dg2.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
/*
2-
* Copyright (C) 2021 Intel Corporation
2+
* Copyright (C) 2021-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
66
*/
77

88
#include "level_zero/core/source/xe_hpg_core/cmdlist_xe_hpg_core.h"
9-
#include "level_zero/core/source/xe_hpg_core/cmdlist_xe_hpg_core.inl"
109

1110
namespace L0 {
1211
static CommandListPopulateFactory<IGFX_DG2, CommandListProductFamily<IGFX_DG2>>

level_zero/core/test/unit_tests/mocks/mock_cmdlist.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2020-2021 Intel Corporation
2+
* Copyright (C) 2020-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -40,7 +40,6 @@ struct WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>
4040
using BaseClass::appendWriteKernelTimestamp;
4141
using BaseClass::applyMemoryRangesBarrier;
4242
using BaseClass::clearCommandsToPatch;
43-
using BaseClass::clearComputeModePropertiesIfNeeded;
4443
using BaseClass::cmdQImmediate;
4544
using BaseClass::commandContainer;
4645
using BaseClass::commandListPerThreadScratchSize;

0 commit comments

Comments
 (0)