2019-09-19 01:32:33 +08:00
|
|
|
/*
|
2024-04-19 22:20:27 +08:00
|
|
|
* Copyright (C) 2019-2024 Intel Corporation
|
2019-09-19 01:32:33 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2022-06-24 21:56:25 +08:00
|
|
|
#include "shared/source/gen12lp/hw_cmds.h"
|
2020-02-24 17:22:30 +08:00
|
|
|
|
2021-08-03 19:48:35 +08:00
|
|
|
#include "opencl/source/command_queue/gpgpu_walker_bdw_and_later.inl"
|
|
|
|
#include "opencl/source/command_queue/hardware_interface_bdw_and_later.inl"
|
2019-09-19 01:32:33 +08:00
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
|
2023-11-23 21:58:58 +08:00
|
|
|
using Family = Gen12LpFamily;
|
|
|
|
|
2019-09-19 01:32:33 +08:00
|
|
|
template <>
|
2023-11-23 21:58:58 +08:00
|
|
|
void GpgpuWalkerHelper<Family>::adjustMiStoreRegMemMode(MI_STORE_REG_MEM<Family> *storeCmd) {
|
2019-09-19 01:32:33 +08:00
|
|
|
storeCmd->setMmioRemapEnable(true);
|
|
|
|
}
|
|
|
|
|
2020-10-09 18:27:32 +08:00
|
|
|
template <>
|
2023-11-23 21:58:58 +08:00
|
|
|
void HardwareInterface<Family>::dispatchWorkarounds(
|
2020-10-09 18:27:32 +08:00
|
|
|
LinearStream *commandStream,
|
|
|
|
CommandQueue &commandQueue,
|
|
|
|
Kernel &kernel,
|
|
|
|
const bool &enable) {
|
|
|
|
|
2023-11-23 21:58:58 +08:00
|
|
|
using MI_LOAD_REGISTER_IMM = typename Family::MI_LOAD_REGISTER_IMM;
|
|
|
|
using PIPE_CONTROL = typename Family::PIPE_CONTROL;
|
2020-10-09 18:27:32 +08:00
|
|
|
|
2021-03-22 23:26:03 +08:00
|
|
|
if (kernel.requiresWaDisableRccRhwoOptimization()) {
|
2020-10-09 18:27:32 +08:00
|
|
|
|
2023-11-23 21:58:58 +08:00
|
|
|
PIPE_CONTROL cmdPipeControl = Family::cmdInitPipeControl;
|
2020-10-09 18:27:32 +08:00
|
|
|
cmdPipeControl.setCommandStreamerStallEnable(true);
|
|
|
|
auto pCmdPipeControl = commandStream->getSpaceForCmd<PIPE_CONTROL>();
|
|
|
|
*pCmdPipeControl = cmdPipeControl;
|
|
|
|
|
|
|
|
uint32_t value = enable ? 0x40004000 : 0x40000000;
|
2023-11-23 21:58:58 +08:00
|
|
|
NEO::LriHelper<Family>::program(commandStream,
|
|
|
|
0x7010,
|
|
|
|
value,
|
2024-04-19 22:20:27 +08:00
|
|
|
false,
|
|
|
|
commandQueue.isBcs());
|
2020-10-09 18:27:32 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
2023-11-23 21:58:58 +08:00
|
|
|
size_t GpgpuWalkerHelper<Family>::getSizeForWaDisableRccRhwoOptimization(const Kernel *pKernel) {
|
2021-03-22 23:26:03 +08:00
|
|
|
if (pKernel->requiresWaDisableRccRhwoOptimization()) {
|
2023-11-23 21:58:58 +08:00
|
|
|
return (2 * (sizeof(Gen12LpFamily::PIPE_CONTROL) + sizeof(Family::MI_LOAD_REGISTER_IMM)));
|
2020-10-09 18:27:32 +08:00
|
|
|
}
|
|
|
|
return 0u;
|
|
|
|
}
|
|
|
|
|
2023-11-23 21:58:58 +08:00
|
|
|
template class HardwareInterface<Family>;
|
|
|
|
|
2023-12-04 20:20:54 +08:00
|
|
|
template void HardwareInterface<Family>::dispatchWalker<Family::DefaultWalkerType>(CommandQueue &commandQueue, const MultiDispatchInfo &multiDispatchInfo, const CsrDependencies &csrDependencies, HardwareInterfaceWalkerArgs &walkerArgs);
|
|
|
|
template void HardwareInterface<Family>::programWalker<Family::DefaultWalkerType>(LinearStream &commandStream, Kernel &kernel, CommandQueue &commandQueue, IndirectHeap &dsh, IndirectHeap &ioh, IndirectHeap &ssh, const DispatchInfo &dispatchInfo, HardwareInterfaceWalkerArgs &walkerArgs);
|
|
|
|
template void HardwareInterface<Family>::dispatchKernelCommands<Family::DefaultWalkerType>(CommandQueue &commandQueue, const DispatchInfo &dispatchInfo, LinearStream &commandStream, IndirectHeap &dsh, IndirectHeap &ioh, IndirectHeap &ssh, HardwareInterfaceWalkerArgs &walkerArgs);
|
|
|
|
template Family::DefaultWalkerType *HardwareInterface<Family>::allocateWalkerSpace<Family::DefaultWalkerType>(LinearStream &commandStream, const Kernel &kernel);
|
2020-09-03 15:06:11 +08:00
|
|
|
|
2023-11-23 21:58:58 +08:00
|
|
|
template class GpgpuWalkerHelper<Family>;
|
2023-12-04 20:20:54 +08:00
|
|
|
template void GpgpuWalkerHelper<Family>::setupTimestampPacket<Family::DefaultWalkerType>(LinearStream *cmdStream, Family::DefaultWalkerType *walkerCmd, TagNodeBase *timestampPacketNode, const RootDeviceEnvironment &rootDeviceEnvironment);
|
2024-07-31 19:48:12 +08:00
|
|
|
template size_t GpgpuWalkerHelper<Family>::setGpgpuWalkerThreadData<Family::DefaultWalkerType>(Family::DefaultWalkerType *walkerCmd, const KernelDescriptor &kernelDescriptor, const size_t startWorkGroups[3],
|
2023-12-04 20:20:54 +08:00
|
|
|
const size_t numWorkGroups[3], const size_t localWorkSizesIn[3], uint32_t simd, uint32_t workDim, bool localIdsGenerationByRuntime, bool inlineDataProgrammingRequired, uint32_t requiredWorkGroupOrder);
|
2019-09-19 01:32:33 +08:00
|
|
|
|
2023-11-23 21:58:58 +08:00
|
|
|
template struct EnqueueOperation<Family>;
|
2019-09-19 01:32:33 +08:00
|
|
|
|
|
|
|
} // namespace NEO
|