Skip to content

Commit c35f560

Browse files
Refactor internal interface
Related-To: NEO-5244 Signed-off-by: Zbigniew Zdanowicz <[email protected]>
1 parent 315146a commit c35f560

File tree

8 files changed

+122
-46
lines changed

8 files changed

+122
-46
lines changed

level_zero/core/source/cmdlist/cmdlist_hw_base.inl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(z
7979

8080
KernelImp *kernelImp = static_cast<KernelImp *>(kernel);
8181
this->containsStatelessUncachedResource |= kernelImp->getKernelRequiresUncachedMocs();
82-
82+
uint32_t partitionCount = 0;
8383
NEO::EncodeDispatchKernel<GfxFamily>::encode(commandContainer,
8484
reinterpret_cast<const void *>(pThreadGroupDimensions),
8585
isIndirect,
@@ -88,7 +88,8 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(z
8888
0,
8989
device->getNEODevice(),
9090
commandListPreemptionMode,
91-
this->containsStatelessUncachedResource);
91+
this->containsStatelessUncachedResource,
92+
partitionCount);
9293

9394
if (device->getNEODevice()->getDebugger()) {
9495
auto *ssh = commandContainer.getIndirectHeap(NEO::HeapType::SURFACE_STATE);

shared/source/command_container/command_encoder.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ struct EncodeDispatchKernel {
3737
uint64_t eventAddress,
3838
Device *device,
3939
PreemptionMode preemptionMode,
40-
bool &requiresUncachedMocs);
40+
bool &requiresUncachedMocs,
41+
uint32_t &partitionCount);
4142

4243
static void encodeAdditionalWalkerFields(const HardwareInfo &hwInfo, WALKER_TYPE &walkerCmd);
4344

shared/source/command_container/command_encoder_bdw_plus.inl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ namespace NEO {
2525
template <typename Family>
2626
void EncodeDispatchKernel<Family>::encode(CommandContainer &container,
2727
const void *pThreadGroupDimensions, bool isIndirect, bool isPredicate, DispatchKernelEncoderI *dispatchInterface,
28-
uint64_t eventAddress, Device *device, PreemptionMode preemptionMode, bool &requiresUncachedMocs) {
28+
uint64_t eventAddress, Device *device, PreemptionMode preemptionMode, bool &requiresUncachedMocs,
29+
uint32_t &partitionCount) {
2930

3031
using MEDIA_STATE_FLUSH = typename Family::MEDIA_STATE_FLUSH;
3132
using MEDIA_INTERFACE_DESCRIPTOR_LOAD = typename Family::MEDIA_INTERFACE_DESCRIPTOR_LOAD;
@@ -215,6 +216,8 @@ void EncodeDispatchKernel<Family>::encode(CommandContainer &container,
215216
auto mediaStateFlush = listCmdBufferStream->getSpace(sizeof(MEDIA_STATE_FLUSH));
216217
*reinterpret_cast<MEDIA_STATE_FLUSH *>(mediaStateFlush) = Family::cmdInitMediaStateFlush;
217218
}
219+
220+
partitionCount = 1;
218221
}
219222

220223
template <typename Family>

shared/source/generated/gen11/hw_cmds_generated_gen11.inl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2018-2020 Intel Corporation
2+
* Copyright (C) 2018-2021 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -867,6 +867,7 @@ typedef struct tagMI_ATOMIC {
867867
MEMORYADDRESS_INDEX = 0x1,
868868
} PATCH_CONSTANTS;
869869
typedef enum tagATOMIC_OPCODES {
870+
ATOMIC_4B_MOVE = 0x4,
870871
ATOMIC_4B_INCREMENT = 0x5,
871872
ATOMIC_4B_DECREMENT = 0x6,
872873
ATOMIC_8B_INCREMENT = 0x25,

shared/source/generated/gen12lp/hw_cmds_generated_gen12lp.inl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2019-2020 Intel Corporation
2+
* Copyright (C) 2019-2021 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -904,6 +904,7 @@ typedef struct tagMI_ATOMIC {
904904
COMMAND_TYPE_MI_COMMAND = 0x0,
905905
} COMMAND_TYPE;
906906
typedef enum tagATOMIC_OPCODES {
907+
ATOMIC_4B_MOVE = 0x4,
907908
ATOMIC_4B_INCREMENT = 0x5,
908909
ATOMIC_4B_DECREMENT = 0x6,
909910
ATOMIC_8B_INCREMENT = 0x25,

shared/source/generated/gen8/hw_cmds_generated_gen8.inl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2017-2020 Intel Corporation
2+
* Copyright (C) 2017-2021 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -1005,6 +1005,7 @@ typedef struct tagMI_ATOMIC {
10051005
MEMORYADDRESS_INDEX = 0x1,
10061006
} PATCH_CONSTANTS;
10071007
typedef enum tagATOMIC_OPCODES {
1008+
ATOMIC_4B_MOVE = 0x4,
10081009
ATOMIC_4B_INCREMENT = 0x5,
10091010
ATOMIC_4B_DECREMENT = 0x6,
10101011
ATOMIC_8B_INCREMENT = 0x25,

shared/source/generated/gen9/hw_cmds_generated_gen9.inl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2017-2020 Intel Corporation
2+
* Copyright (C) 2017-2021 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -1002,6 +1002,7 @@ typedef struct tagMI_ATOMIC {
10021002
MEMORYADDRESS_INDEX = 0x1,
10031003
} PATCH_CONSTANTS;
10041004
typedef enum tagATOMIC_OPCODES {
1005+
ATOMIC_4B_MOVE = 0x4,
10051006
ATOMIC_4B_INCREMENT = 0x5,
10061007
ATOMIC_4B_DECREMENT = 0x6,
10071008
ATOMIC_8B_INCREMENT = 0x25,

0 commit comments

Comments
 (0)