Skip to content

Commit 2cdd9f4

Browse files
MihaauCompute-Runtime-Automation
authored andcommitted
refactor: adjust file names after pre-gen12 removal 5/n
Related-To: NEO-12681 Signed-off-by: Michał Pryba <[email protected]>
1 parent 5d3a914 commit 2cdd9f4

File tree

6 files changed

+151
-179
lines changed

6 files changed

+151
-179
lines changed

opencl/source/gen12lp/gtpin_setup_gen12lp.cpp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,33 @@
11
/*
2-
* Copyright (C) 2019-2023 Intel Corporation
2+
* Copyright (C) 2019-2025 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
66
*/
77

88
#include "shared/source/compiler_interface/external_functions.h"
9+
#include "shared/source/debug_settings/debug_settings_manager.h"
910
#include "shared/source/gen12lp/hw_cmds_base.h"
11+
#include "shared/source/helpers/hw_info.h"
1012
#include "shared/source/kernel/implicit_args_helper.h"
1113

1214
#include "opencl/source/gtpin/gtpin_gfx_core_helper.h"
1315
#include "opencl/source/gtpin/gtpin_gfx_core_helper.inl"
14-
#include "opencl/source/gtpin/gtpin_gfx_core_helper_bdw_and_later.inl"
1516

1617
#include "ocl_igc_shared/gtpin/gtpin_ocl_interface.h"
1718

1819
namespace NEO {
1920

21+
template <typename GfxFamily>
22+
bool GTPinGfxCoreHelperHw<GfxFamily>::canUseSharedAllocation(const HardwareInfo &hwInfo) const {
23+
bool canUseSharedAllocation = false;
24+
if (debugManager.flags.GTPinAllocateBufferInSharedMemory.get() != -1) {
25+
canUseSharedAllocation = !!debugManager.flags.GTPinAllocateBufferInSharedMemory.get();
26+
}
27+
canUseSharedAllocation &= hwInfo.capabilityTable.ftrSvm;
28+
return canUseSharedAllocation;
29+
}
30+
2031
extern GTPinGfxCoreHelperCreateFunctionType gtpinGfxCoreHelperFactory[IGFX_MAX_CORE];
2132

2233
typedef Gen12LpFamily Family;

opencl/source/gtpin/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2018-2023 Intel Corporation
2+
# Copyright (C) 2018-2025 Intel Corporation
33
#
44
# SPDX-License-Identifier: MIT
55
#
@@ -13,7 +13,6 @@ if(NOT DISABLED_GTPIN_SUPPORT)
1313
${CMAKE_CURRENT_SOURCE_DIR}/gtpin_gfx_core_helper.cpp
1414
${CMAKE_CURRENT_SOURCE_DIR}/gtpin_gfx_core_helper.h
1515
${CMAKE_CURRENT_SOURCE_DIR}/gtpin_gfx_core_helper.inl
16-
${CMAKE_CURRENT_SOURCE_DIR}/gtpin_gfx_core_helper_bdw_and_later.inl
1716
${CMAKE_CURRENT_SOURCE_DIR}/gtpin_init.cpp
1817
${CMAKE_CURRENT_SOURCE_DIR}/gtpin_init.h
1918
${CMAKE_CURRENT_SOURCE_DIR}/gtpin_notify.h

opencl/source/gtpin/gtpin_gfx_core_helper_bdw_and_later.inl

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

shared/source/command_stream/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2019-2024 Intel Corporation
2+
# Copyright (C) 2019-2025 Intel Corporation
33
#
44
# SPDX-License-Identifier: MIT
55
#
@@ -16,7 +16,6 @@ set(NEO_CORE_COMMAND_STREAM
1616
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver.h
1717
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw.h
1818
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_base.inl
19-
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_bdw_and_later.inl
2019
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_common_hw.h
2120
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_common_hw_base.inl
2221
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_simulated_common_hw_bdw_and_later.inl

shared/source/command_stream/command_stream_receiver_hw_bdw_and_later.inl

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

shared/source/gen12lp/command_stream_receiver_hw_gen12lp.cpp

Lines changed: 136 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,151 @@
1010

1111
using Family = NEO::Gen12LpFamily;
1212

13-
#include "shared/source/command_stream/command_stream_receiver_hw_bdw_and_later.inl"
13+
#include "shared/source/command_stream/command_stream_receiver_hw_base.inl"
1414
#include "shared/source/command_stream/command_stream_receiver_hw_heap_addressing.inl"
1515
#include "shared/source/command_stream/device_command_stream.h"
1616
#include "shared/source/gmm_helper/gmm.h"
17+
#include "shared/source/helpers/address_patch.h"
1718
#include "shared/source/helpers/blit_commands_helper_base.inl"
1819
#include "shared/source/helpers/populate_factory.h"
20+
#include "shared/source/helpers/state_base_address_tgllp_and_later.inl"
1921

2022
namespace NEO {
2123
static auto gfxCore = IGFX_GEN12LP_CORE;
2224

25+
template <typename GfxFamily>
26+
bool CommandStreamReceiverHw<GfxFamily>::are4GbHeapsAvailable() const { return true; }
27+
28+
template <typename GfxFamily>
29+
size_t CommandStreamReceiverHw<GfxFamily>::getRequiredStateBaseAddressSize(const Device &device) const {
30+
size_t size = 0;
31+
const auto &productHelper = getProductHelper();
32+
if (productHelper.is3DPipelineSelectWARequired()) {
33+
size += (2 * PreambleHelper<GfxFamily>::getCmdSizeForPipelineSelect(peekRootDeviceEnvironment()));
34+
}
35+
size += sizeof(typename GfxFamily::STATE_BASE_ADDRESS) + sizeof(PIPE_CONTROL);
36+
return size;
37+
}
38+
39+
template <typename GfxFamily>
40+
void CommandStreamReceiverHw<GfxFamily>::programPipelineSelect(LinearStream &commandStream, PipelineSelectArgs &pipelineSelectArgs) {
41+
if (csrSizeRequestFlags.mediaSamplerConfigChanged || csrSizeRequestFlags.systolicPipelineSelectMode || !isPreambleSent) {
42+
if (!isPipelineSelectAlreadyProgrammed()) {
43+
PreambleHelper<GfxFamily>::programPipelineSelect(&commandStream, pipelineSelectArgs, peekRootDeviceEnvironment());
44+
}
45+
this->lastMediaSamplerConfig = pipelineSelectArgs.mediaSamplerRequired;
46+
this->lastSystolicPipelineSelectMode = pipelineSelectArgs.systolicPipelineSelectMode;
47+
this->streamProperties.pipelineSelect.setPropertiesAll(true, this->lastMediaSamplerConfig, this->lastSystolicPipelineSelectMode);
48+
this->streamProperties.pipelineSelect.clearIsDirty();
49+
}
50+
}
51+
52+
template <typename GfxFamily>
53+
void CommandStreamReceiverHw<GfxFamily>::createScratchSpaceController() {
54+
scratchSpaceController = std::make_unique<ScratchSpaceControllerBase>(rootDeviceIndex, executionEnvironment, *internalAllocationStorage.get());
55+
}
56+
57+
template <typename GfxFamily>
58+
void CommandStreamReceiverHw<GfxFamily>::programEpliogueCommands(LinearStream &csr, const DispatchFlags &dispatchFlags) {
59+
this->programEngineModeEpliogue(csr, dispatchFlags);
60+
}
61+
62+
template <typename GfxFamily>
63+
size_t CommandStreamReceiverHw<GfxFamily>::getCmdSizeForEpilogueCommands(const DispatchFlags &dispatchFlags) const {
64+
return this->getCmdSizeForEngineMode(dispatchFlags);
65+
}
66+
67+
template <typename GfxFamily>
68+
bool CommandStreamReceiverHw<GfxFamily>::isMultiOsContextCapable() const {
69+
return false;
70+
}
71+
72+
template <typename GfxFamily>
73+
inline void CommandStreamReceiverHw<GfxFamily>::addPipeControlBeforeStateSip(LinearStream &commandStream, Device &device) {}
74+
75+
template <typename GfxFamily>
76+
inline void CommandStreamReceiverHw<GfxFamily>::addPipeControlBefore3dState(LinearStream &commandStream, DispatchFlags &dispatchFlags) {}
77+
78+
template <typename GfxFamily>
79+
bool CommandStreamReceiverHw<GfxFamily>::checkPlatformSupportsNewResourceImplicitFlush() const {
80+
return false;
81+
}
82+
83+
template <typename GfxFamily>
84+
bool CommandStreamReceiverHw<GfxFamily>::checkPlatformSupportsGpuIdleImplicitFlush() const {
85+
return false;
86+
}
87+
88+
template <typename GfxFamily>
89+
GraphicsAllocation *CommandStreamReceiverHw<GfxFamily>::getClearColorAllocation() {
90+
return nullptr;
91+
}
92+
93+
template <typename GfxFamily>
94+
void CommandStreamReceiverHw<GfxFamily>::programPerDssBackedBuffer(LinearStream &commandStream, Device &device, DispatchFlags &dispatchFlags) {
95+
}
96+
97+
template <typename GfxFamily>
98+
size_t CommandStreamReceiverHw<GfxFamily>::getCmdSizeForPerDssBackedBuffer(const HardwareInfo &hwInfo) {
99+
return 0;
100+
}
101+
102+
template <typename GfxFamily>
103+
void CommandStreamReceiverHw<GfxFamily>::dispatchRayTracingStateCommand(LinearStream &cmdStream, Device &device) {
104+
}
105+
106+
template <typename GfxFamily>
107+
void CommandStreamReceiverHw<GfxFamily>::collectStateBaseAddresIohPatchInfo(uint64_t commandBufferAddress, uint64_t commandOffset, const LinearStream &ioh) {
108+
using STATE_BASE_ADDRESS = typename GfxFamily::STATE_BASE_ADDRESS;
109+
110+
PatchInfoData indirectObjectPatchInfo = {ioh.getGraphicsAllocation()->getGpuAddress(), 0u, PatchInfoAllocationType::indirectObjectHeap, commandBufferAddress,
111+
commandOffset + STATE_BASE_ADDRESS::PATCH_CONSTANTS::INDIRECTOBJECTBASEADDRESS_BYTEOFFSET, PatchInfoAllocationType::defaultType};
112+
flatBatchBufferHelper->setPatchInfoData(indirectObjectPatchInfo);
113+
}
114+
115+
template <typename GfxFamily>
116+
size_t CommandStreamReceiverHw<GfxFamily>::getCmdSizeForActivePartitionConfig() const {
117+
return 0;
118+
}
119+
120+
template <typename GfxFamily>
121+
inline void CommandStreamReceiverHw<GfxFamily>::programActivePartitionConfig(LinearStream &csr) {
122+
}
123+
124+
template <typename GfxFamily>
125+
inline size_t CommandStreamReceiverHw<GfxFamily>::getCmdSizeForStallingNoPostSyncCommands() const {
126+
return sizeof(typename GfxFamily::PIPE_CONTROL);
127+
}
128+
129+
template <typename GfxFamily>
130+
inline size_t CommandStreamReceiverHw<GfxFamily>::getCmdSizeForStallingPostSyncCommands() const {
131+
return MemorySynchronizationCommands<GfxFamily>::getSizeForBarrierWithPostSyncOperation(peekRootDeviceEnvironment(), false);
132+
}
133+
134+
template <typename GfxFamily>
135+
inline void CommandStreamReceiverHw<GfxFamily>::programStallingNoPostSyncCommandsForBarrier(LinearStream &cmdStream) {
136+
PipeControlArgs args;
137+
MemorySynchronizationCommands<GfxFamily>::addSingleBarrier(cmdStream, args);
138+
}
139+
140+
template <typename GfxFamily>
141+
inline void CommandStreamReceiverHw<GfxFamily>::programStallingPostSyncCommandsForBarrier(LinearStream &cmdStream, TagNodeBase &tagNode, bool dcFlushRequired) {
142+
auto barrierTimestampPacketGpuAddress = TimestampPacketHelper::getContextEndGpuAddress(tagNode);
143+
PipeControlArgs args;
144+
args.dcFlushEnable = this->dcFlushSupport && dcFlushRequired;
145+
MemorySynchronizationCommands<GfxFamily>::addBarrierWithPostSyncOperation(
146+
cmdStream,
147+
PostSyncMode::immediateData,
148+
barrierTimestampPacketGpuAddress,
149+
0,
150+
peekRootDeviceEnvironment(),
151+
args);
152+
}
153+
154+
template <typename GfxFamily>
155+
inline void CommandStreamReceiverHw<GfxFamily>::configurePostSyncWriteOffset() {
156+
}
157+
23158
template <typename GfxFamily>
24159
uint64_t BlitCommandsHelper<GfxFamily>::getMaxBlitWidthOverride(const RootDeviceEnvironment &rootDeviceEnvironment) {
25160
return 0;

0 commit comments

Comments
 (0)