mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
Rename KernelCommandsHelper to HardwareCommandsHelper
Change-Id: I0b92a2d74bc96658274e4a02fec0f322e87681b2 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
425dad30d0
commit
70f92cf03c
@@ -20,7 +20,7 @@
|
|||||||
#include "runtime/helpers/array_count.h"
|
#include "runtime/helpers/array_count.h"
|
||||||
#include "runtime/helpers/convert_color.h"
|
#include "runtime/helpers/convert_color.h"
|
||||||
#include "runtime/helpers/get_info.h"
|
#include "runtime/helpers/get_info.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/mipmap.h"
|
#include "runtime/helpers/mipmap.h"
|
||||||
#include "runtime/helpers/options.h"
|
#include "runtime/helpers/options.h"
|
||||||
#include "runtime/helpers/queue_helpers.h"
|
#include "runtime/helpers/queue_helpers.h"
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
#include "runtime/gtpin/gtpin_notify.h"
|
#include "runtime/gtpin/gtpin_notify.h"
|
||||||
#include "runtime/helpers/array_count.h"
|
#include "runtime/helpers/array_count.h"
|
||||||
#include "runtime/helpers/dispatch_info_builder.h"
|
#include "runtime/helpers/dispatch_info_builder.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/options.h"
|
#include "runtime/helpers/options.h"
|
||||||
#include "runtime/helpers/task_information.h"
|
#include "runtime/helpers/task_information.h"
|
||||||
#include "runtime/mem_obj/buffer.h"
|
#include "runtime/mem_obj/buffer.h"
|
||||||
@@ -338,7 +338,7 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
|
|||||||
|
|
||||||
if (blockQueue) {
|
if (blockQueue) {
|
||||||
if (parentKernel) {
|
if (parentKernel) {
|
||||||
size_t minSizeSSHForEM = KernelCommandsHelper<GfxFamily>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
size_t minSizeSSHForEM = HardwareCommandsHelper<GfxFamily>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||||
blockedCommandsData->surfaceStateHeapSizeEM = minSizeSSHForEM;
|
blockedCommandsData->surfaceStateHeapSizeEM = minSizeSSHForEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -469,7 +469,7 @@ void CommandQueueHw<GfxFamily>::processDeviceEnqueue(Kernel *parentKernel,
|
|||||||
TagNode<HwTimeStamps> *hwTimeStamps,
|
TagNode<HwTimeStamps> *hwTimeStamps,
|
||||||
PreemptionMode preemption,
|
PreemptionMode preemption,
|
||||||
bool &blocking) {
|
bool &blocking) {
|
||||||
size_t minSizeSSHForEM = KernelCommandsHelper<GfxFamily>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
size_t minSizeSSHForEM = HardwareCommandsHelper<GfxFamily>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||||
|
|
||||||
uint32_t taskCount = getCommandStreamReceiver().peekTaskCount() + 1;
|
uint32_t taskCount = getCommandStreamReceiver().peekTaskCount() + 1;
|
||||||
devQueueHw->setupExecutionModelDispatch(getIndirectHeap(IndirectHeap::SURFACE_STATE, minSizeSSHForEM),
|
devQueueHw->setupExecutionModelDispatch(getIndirectHeap(IndirectHeap::SURFACE_STATE, minSizeSSHForEM),
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#include "runtime/command_queue/command_queue_hw.h"
|
#include "runtime/command_queue/command_queue_hw.h"
|
||||||
#include "runtime/command_queue/enqueue_common.h"
|
#include "runtime/command_queue/enqueue_common.h"
|
||||||
#include "runtime/command_stream/command_stream_receiver.h"
|
#include "runtime/command_stream/command_stream_receiver.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/mem_obj/buffer.h"
|
#include "runtime/mem_obj/buffer.h"
|
||||||
#include "runtime/memory_manager/surface.h"
|
#include "runtime/memory_manager/surface.h"
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include "runtime/built_ins/built_ins.h"
|
#include "runtime/built_ins/built_ins.h"
|
||||||
#include "runtime/command_queue/command_queue_hw.h"
|
#include "runtime/command_queue/command_queue_hw.h"
|
||||||
#include "runtime/command_stream/command_stream_receiver.h"
|
#include "runtime/command_stream/command_stream_receiver.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/mem_obj/buffer.h"
|
#include "runtime/mem_obj/buffer.h"
|
||||||
#include "runtime/memory_manager/surface.h"
|
#include "runtime/memory_manager/surface.h"
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include "runtime/built_ins/built_ins.h"
|
#include "runtime/built_ins/built_ins.h"
|
||||||
#include "runtime/command_queue/command_queue_hw.h"
|
#include "runtime/command_queue/command_queue_hw.h"
|
||||||
#include "runtime/command_stream/command_stream_receiver.h"
|
#include "runtime/command_stream/command_stream_receiver.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/mipmap.h"
|
#include "runtime/helpers/mipmap.h"
|
||||||
#include "runtime/helpers/surface_formats.h"
|
#include "runtime/helpers/surface_formats.h"
|
||||||
#include "runtime/mem_obj/buffer.h"
|
#include "runtime/mem_obj/buffer.h"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#include "runtime/built_ins/built_ins.h"
|
#include "runtime/built_ins/built_ins.h"
|
||||||
#include "runtime/command_queue/command_queue_hw.h"
|
#include "runtime/command_queue/command_queue_hw.h"
|
||||||
#include "runtime/command_stream/command_stream_receiver.h"
|
#include "runtime/command_stream/command_stream_receiver.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/mipmap.h"
|
#include "runtime/helpers/mipmap.h"
|
||||||
#include "runtime/mem_obj/image.h"
|
#include "runtime/mem_obj/image.h"
|
||||||
#include "runtime/memory_manager/surface.h"
|
#include "runtime/memory_manager/surface.h"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include "runtime/built_ins/built_ins.h"
|
#include "runtime/built_ins/built_ins.h"
|
||||||
#include "runtime/command_queue/command_queue_hw.h"
|
#include "runtime/command_queue/command_queue_hw.h"
|
||||||
#include "runtime/command_stream/command_stream_receiver.h"
|
#include "runtime/command_stream/command_stream_receiver.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/mipmap.h"
|
#include "runtime/helpers/mipmap.h"
|
||||||
#include "runtime/helpers/surface_formats.h"
|
#include "runtime/helpers/surface_formats.h"
|
||||||
#include "runtime/mem_obj/buffer.h"
|
#include "runtime/mem_obj/buffer.h"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include "runtime/built_ins/built_ins.h"
|
#include "runtime/built_ins/built_ins.h"
|
||||||
#include "runtime/command_queue/command_queue_hw.h"
|
#include "runtime/command_queue/command_queue_hw.h"
|
||||||
#include "runtime/command_stream/command_stream_receiver.h"
|
#include "runtime/command_stream/command_stream_receiver.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/mem_obj/buffer.h"
|
#include "runtime/mem_obj/buffer.h"
|
||||||
#include "runtime/memory_manager/internal_allocation_storage.h"
|
#include "runtime/memory_manager/internal_allocation_storage.h"
|
||||||
#include "runtime/memory_manager/memory_manager.h"
|
#include "runtime/memory_manager/memory_manager.h"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#include "runtime/built_ins/built_ins.h"
|
#include "runtime/built_ins/built_ins.h"
|
||||||
#include "runtime/command_queue/command_queue_hw.h"
|
#include "runtime/command_queue/command_queue_hw.h"
|
||||||
#include "runtime/command_stream/command_stream_receiver.h"
|
#include "runtime/command_stream/command_stream_receiver.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/surface_formats.h"
|
#include "runtime/helpers/surface_formats.h"
|
||||||
#include "runtime/mem_obj/image.h"
|
#include "runtime/mem_obj/image.h"
|
||||||
#include "runtime/memory_manager/surface.h"
|
#include "runtime/memory_manager/surface.h"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#include "runtime/command_queue/command_queue_hw.h"
|
#include "runtime/command_queue/command_queue_hw.h"
|
||||||
#include "runtime/command_queue/gpgpu_walker.h"
|
#include "runtime/command_queue/gpgpu_walker.h"
|
||||||
#include "runtime/command_stream/command_stream_receiver.h"
|
#include "runtime/command_stream/command_stream_receiver.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/task_information.h"
|
#include "runtime/helpers/task_information.h"
|
||||||
#include "runtime/mem_obj/buffer.h"
|
#include "runtime/mem_obj/buffer.h"
|
||||||
#include "runtime/memory_manager/surface.h"
|
#include "runtime/memory_manager/surface.h"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
#include "runtime/command_queue/enqueue_common.h"
|
#include "runtime/command_queue/enqueue_common.h"
|
||||||
#include "runtime/command_stream/command_stream_receiver.h"
|
#include "runtime/command_stream/command_stream_receiver.h"
|
||||||
#include "runtime/helpers/cache_policy.h"
|
#include "runtime/helpers/cache_policy.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/mem_obj/buffer.h"
|
#include "runtime/mem_obj/buffer.h"
|
||||||
#include "runtime/memory_manager/surface.h"
|
#include "runtime/memory_manager/surface.h"
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#include "runtime/command_queue/command_queue_hw.h"
|
#include "runtime/command_queue/command_queue_hw.h"
|
||||||
#include "runtime/command_queue/enqueue_common.h"
|
#include "runtime/command_queue/enqueue_common.h"
|
||||||
#include "runtime/command_stream/command_stream_receiver.h"
|
#include "runtime/command_stream/command_stream_receiver.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/mem_obj/buffer.h"
|
#include "runtime/mem_obj/buffer.h"
|
||||||
#include "runtime/memory_manager/surface.h"
|
#include "runtime/memory_manager/surface.h"
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
#include "runtime/context/context.h"
|
#include "runtime/context/context.h"
|
||||||
#include "runtime/event/event.h"
|
#include "runtime/event/event.h"
|
||||||
#include "runtime/helpers/cache_policy.h"
|
#include "runtime/helpers/cache_policy.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/mipmap.h"
|
#include "runtime/helpers/mipmap.h"
|
||||||
#include "runtime/helpers/surface_formats.h"
|
#include "runtime/helpers/surface_formats.h"
|
||||||
#include "runtime/mem_obj/image.h"
|
#include "runtime/mem_obj/image.h"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include "runtime/built_ins/built_ins.h"
|
#include "runtime/built_ins/built_ins.h"
|
||||||
#include "runtime/command_queue/command_queue_hw.h"
|
#include "runtime/command_queue/command_queue_hw.h"
|
||||||
#include "runtime/command_stream/command_stream_receiver.h"
|
#include "runtime/command_stream/command_stream_receiver.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/string.h"
|
#include "runtime/helpers/string.h"
|
||||||
#include "runtime/mem_obj/buffer.h"
|
#include "runtime/mem_obj/buffer.h"
|
||||||
#include "runtime/memory_manager/surface.h"
|
#include "runtime/memory_manager/surface.h"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include "runtime/built_ins/built_ins.h"
|
#include "runtime/built_ins/built_ins.h"
|
||||||
#include "runtime/command_queue/command_queue_hw.h"
|
#include "runtime/command_queue/command_queue_hw.h"
|
||||||
#include "runtime/command_stream/command_stream_receiver.h"
|
#include "runtime/command_stream/command_stream_receiver.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/mem_obj/buffer.h"
|
#include "runtime/mem_obj/buffer.h"
|
||||||
#include "runtime/memory_manager/surface.h"
|
#include "runtime/memory_manager/surface.h"
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#include "runtime/built_ins/built_ins.h"
|
#include "runtime/built_ins/built_ins.h"
|
||||||
#include "runtime/command_queue/command_queue_hw.h"
|
#include "runtime/command_queue/command_queue_hw.h"
|
||||||
#include "runtime/command_stream/command_stream_receiver.h"
|
#include "runtime/command_stream/command_stream_receiver.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/mipmap.h"
|
#include "runtime/helpers/mipmap.h"
|
||||||
#include "runtime/helpers/surface_formats.h"
|
#include "runtime/helpers/surface_formats.h"
|
||||||
#include "runtime/mem_obj/image.h"
|
#include "runtime/mem_obj/image.h"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
#include "runtime/event/hw_timestamps.h"
|
#include "runtime/event/hw_timestamps.h"
|
||||||
#include "runtime/event/perf_counter.h"
|
#include "runtime/event/perf_counter.h"
|
||||||
#include "runtime/helpers/dispatch_info.h"
|
#include "runtime/helpers/dispatch_info.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/task_information.h"
|
#include "runtime/helpers/task_information.h"
|
||||||
#include "runtime/helpers/timestamp_packet.h"
|
#include "runtime/helpers/timestamp_packet.h"
|
||||||
#include "runtime/indirect_heap/indirect_heap.h"
|
#include "runtime/indirect_heap/indirect_heap.h"
|
||||||
@@ -225,15 +225,15 @@ IndirectHeap &getIndirectHeap(CommandQueue &commandQueue, const MultiDispatchInf
|
|||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
switch (heapType) {
|
switch (heapType) {
|
||||||
case IndirectHeap::DYNAMIC_STATE: expectedSize = KernelCommandsHelper<GfxFamily>::getTotalSizeRequiredDSH(multiDispatchInfo); break;
|
case IndirectHeap::DYNAMIC_STATE: expectedSize = HardwareCommandsHelper<GfxFamily>::getTotalSizeRequiredDSH(multiDispatchInfo); break;
|
||||||
case IndirectHeap::INDIRECT_OBJECT: expectedSize = KernelCommandsHelper<GfxFamily>::getTotalSizeRequiredIOH(multiDispatchInfo); break;
|
case IndirectHeap::INDIRECT_OBJECT: expectedSize = HardwareCommandsHelper<GfxFamily>::getTotalSizeRequiredIOH(multiDispatchInfo); break;
|
||||||
case IndirectHeap::SURFACE_STATE: expectedSize = KernelCommandsHelper<GfxFamily>::getTotalSizeRequiredSSH(multiDispatchInfo); break;
|
case IndirectHeap::SURFACE_STATE: expectedSize = HardwareCommandsHelper<GfxFamily>::getTotalSizeRequiredSSH(multiDispatchInfo); break;
|
||||||
}
|
}
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
if (Kernel *parentKernel = multiDispatchInfo.peekParentKernel()) {
|
if (Kernel *parentKernel = multiDispatchInfo.peekParentKernel()) {
|
||||||
if (heapType == IndirectHeap::SURFACE_STATE) {
|
if (heapType == IndirectHeap::SURFACE_STATE) {
|
||||||
expectedSize += KernelCommandsHelper<GfxFamily>::template getSizeRequiredForExecutionModel<heapType>(*parentKernel);
|
expectedSize += HardwareCommandsHelper<GfxFamily>::template getSizeRequiredForExecutionModel<heapType>(*parentKernel);
|
||||||
} else //if (heapType == IndirectHeap::DYNAMIC_STATE || heapType == IndirectHeap::INDIRECT_OBJECT)
|
} else //if (heapType == IndirectHeap::DYNAMIC_STATE || heapType == IndirectHeap::INDIRECT_OBJECT)
|
||||||
{
|
{
|
||||||
DeviceQueueHw<GfxFamily> *pDevQueue = castToObject<DeviceQueueHw<GfxFamily>>(commandQueue.getContext().getDefaultDeviceQueue());
|
DeviceQueueHw<GfxFamily> *pDevQueue = castToObject<DeviceQueueHw<GfxFamily>>(commandQueue.getContext().getDefaultDeviceQueue());
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
#include "runtime/event/user_event.h"
|
#include "runtime/event/user_event.h"
|
||||||
#include "runtime/helpers/aligned_memory.h"
|
#include "runtime/helpers/aligned_memory.h"
|
||||||
#include "runtime/helpers/debug_helpers.h"
|
#include "runtime/helpers/debug_helpers.h"
|
||||||
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/hw_helper.h"
|
#include "runtime/helpers/hw_helper.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
|
||||||
#include "runtime/helpers/queue_helpers.h"
|
#include "runtime/helpers/queue_helpers.h"
|
||||||
#include "runtime/helpers/validators.h"
|
#include "runtime/helpers/validators.h"
|
||||||
#include "runtime/indirect_heap/indirect_heap.h"
|
#include "runtime/indirect_heap/indirect_heap.h"
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ void GpgpuWalkerHelper<GfxFamily>::dispatchScheduler(
|
|||||||
const size_t totalInterfaceDescriptorTableSize = devQueueHw.interfaceDescriptorEntries * sizeof(INTERFACE_DESCRIPTOR_DATA);
|
const size_t totalInterfaceDescriptorTableSize = devQueueHw.interfaceDescriptorEntries * sizeof(INTERFACE_DESCRIPTOR_DATA);
|
||||||
|
|
||||||
// Program media interface descriptor load
|
// Program media interface descriptor load
|
||||||
KernelCommandsHelper<GfxFamily>::sendMediaInterfaceDescriptorLoad(
|
HardwareCommandsHelper<GfxFamily>::sendMediaInterfaceDescriptorLoad(
|
||||||
commandStream,
|
commandStream,
|
||||||
offsetInterfaceDescriptor,
|
offsetInterfaceDescriptor,
|
||||||
totalInterfaceDescriptorTableSize);
|
totalInterfaceDescriptorTableSize);
|
||||||
@@ -124,9 +124,9 @@ void GpgpuWalkerHelper<GfxFamily>::dispatchScheduler(
|
|||||||
auto pGpGpuWalkerCmd = static_cast<GPGPU_WALKER *>(commandStream.getSpace(sizeof(GPGPU_WALKER)));
|
auto pGpGpuWalkerCmd = static_cast<GPGPU_WALKER *>(commandStream.getSpace(sizeof(GPGPU_WALKER)));
|
||||||
*pGpGpuWalkerCmd = GfxFamily::cmdInitGpgpuWalker;
|
*pGpGpuWalkerCmd = GfxFamily::cmdInitGpgpuWalker;
|
||||||
|
|
||||||
bool localIdsGenerationByRuntime = KernelCommandsHelper<GfxFamily>::isRuntimeLocalIdsGenerationRequired(1, globalWorkSizes, localWorkSizes);
|
bool localIdsGenerationByRuntime = HardwareCommandsHelper<GfxFamily>::isRuntimeLocalIdsGenerationRequired(1, globalWorkSizes, localWorkSizes);
|
||||||
bool inlineDataProgrammingRequired = KernelCommandsHelper<GfxFamily>::inlineDataProgrammingRequired(scheduler);
|
bool inlineDataProgrammingRequired = HardwareCommandsHelper<GfxFamily>::inlineDataProgrammingRequired(scheduler);
|
||||||
KernelCommandsHelper<GfxFamily>::sendIndirectState(
|
HardwareCommandsHelper<GfxFamily>::sendIndirectState(
|
||||||
commandStream,
|
commandStream,
|
||||||
*dsh,
|
*dsh,
|
||||||
*ioh,
|
*ioh,
|
||||||
@@ -182,9 +182,9 @@ void GpgpuWalkerHelper<GfxFamily>::setupTimestampPacket(
|
|||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
size_t EnqueueOperation<GfxFamily>::getSizeRequiredCSKernel(bool reserveProfilingCmdsSpace, bool reservePerfCounters, CommandQueue &commandQueue, const Kernel *pKernel) {
|
size_t EnqueueOperation<GfxFamily>::getSizeRequiredCSKernel(bool reserveProfilingCmdsSpace, bool reservePerfCounters, CommandQueue &commandQueue, const Kernel *pKernel) {
|
||||||
size_t size = sizeof(typename GfxFamily::GPGPU_WALKER) + KernelCommandsHelper<GfxFamily>::getSizeRequiredCS(pKernel) +
|
size_t size = sizeof(typename GfxFamily::GPGPU_WALKER) + HardwareCommandsHelper<GfxFamily>::getSizeRequiredCS(pKernel) +
|
||||||
sizeof(PIPE_CONTROL) * (KernelCommandsHelper<GfxFamily>::isPipeControlWArequired() ? 2 : 1);
|
sizeof(PIPE_CONTROL) * (HardwareCommandsHelper<GfxFamily>::isPipeControlWArequired() ? 2 : 1);
|
||||||
size += KernelCommandsHelper<GfxFamily>::getSizeRequiredForCacheFlush(commandQueue, pKernel, 0U, 0U);
|
size += HardwareCommandsHelper<GfxFamily>::getSizeRequiredForCacheFlush(commandQueue, pKernel, 0U, 0U);
|
||||||
size += PreemptionHelper::getPreemptionWaCsSize<GfxFamily>(commandQueue.getDevice());
|
size += PreemptionHelper::getPreemptionWaCsSize<GfxFamily>(commandQueue.getDevice());
|
||||||
if (reserveProfilingCmdsSpace) {
|
if (reserveProfilingCmdsSpace) {
|
||||||
size += 2 * sizeof(PIPE_CONTROL) + 2 * sizeof(typename GfxFamily::MI_STORE_REGISTER_MEM);
|
size += 2 * sizeof(PIPE_CONTROL) + 2 * sizeof(typename GfxFamily::MI_STORE_REGISTER_MEM);
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "runtime/command_queue/hardware_interface.h"
|
#include "runtime/command_queue/hardware_interface.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/task_information.h"
|
#include "runtime/helpers/task_information.h"
|
||||||
#include "runtime/memory_manager/internal_allocation_storage.h"
|
#include "runtime/memory_manager/internal_allocation_storage.h"
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ void HardwareInterface<GfxFamily>::dispatchWalker(
|
|||||||
|
|
||||||
// Allocate command stream and indirect heaps
|
// Allocate command stream and indirect heaps
|
||||||
if (blockQueue) {
|
if (blockQueue) {
|
||||||
using KCH = KernelCommandsHelper<GfxFamily>;
|
using KCH = HardwareCommandsHelper<GfxFamily>;
|
||||||
|
|
||||||
constexpr static auto additionalAllocationSize = CSRequirements::csOverfetchSize;
|
constexpr static auto additionalAllocationSize = CSRequirements::csOverfetchSize;
|
||||||
constexpr static auto allocationSize = MemoryConstants::pageSize64k - additionalAllocationSize;
|
constexpr static auto allocationSize = MemoryConstants::pageSize64k - additionalAllocationSize;
|
||||||
@@ -68,7 +68,7 @@ void HardwareInterface<GfxFamily>::dispatchWalker(
|
|||||||
dsh->getSpace(colorCalcSize);
|
dsh->getSpace(colorCalcSize);
|
||||||
ioh = dsh;
|
ioh = dsh;
|
||||||
commandQueue.allocateHeapMemory(IndirectHeap::SURFACE_STATE,
|
commandQueue.allocateHeapMemory(IndirectHeap::SURFACE_STATE,
|
||||||
KernelCommandsHelper<GfxFamily>::template getSizeRequiredForExecutionModel<
|
HardwareCommandsHelper<GfxFamily>::template getSizeRequiredForExecutionModel<
|
||||||
IndirectHeap::SURFACE_STATE>(*parentKernel) +
|
IndirectHeap::SURFACE_STATE>(*parentKernel) +
|
||||||
KCH::getTotalSizeRequiredSSH(multiDispatchInfo),
|
KCH::getTotalSizeRequiredSSH(multiDispatchInfo),
|
||||||
ssh);
|
ssh);
|
||||||
@@ -96,7 +96,7 @@ void HardwareInterface<GfxFamily>::dispatchWalker(
|
|||||||
|
|
||||||
TimestampPacketHelper::programCsrDependencies<GfxFamily>(*commandStream, csrDependencies);
|
TimestampPacketHelper::programCsrDependencies<GfxFamily>(*commandStream, csrDependencies);
|
||||||
|
|
||||||
dsh->align(KernelCommandsHelper<GfxFamily>::alignInterfaceDescriptorData);
|
dsh->align(HardwareCommandsHelper<GfxFamily>::alignInterfaceDescriptorData);
|
||||||
|
|
||||||
uint32_t interfaceDescriptorIndex = 0;
|
uint32_t interfaceDescriptorIndex = 0;
|
||||||
const size_t offsetInterfaceDescriptorTable = dsh->getUsed();
|
const size_t offsetInterfaceDescriptorTable = dsh->getUsed();
|
||||||
@@ -107,7 +107,7 @@ void HardwareInterface<GfxFamily>::dispatchWalker(
|
|||||||
parentKernel, dsh, commandStream);
|
parentKernel, dsh, commandStream);
|
||||||
|
|
||||||
// Program media interface descriptor load
|
// Program media interface descriptor load
|
||||||
KernelCommandsHelper<GfxFamily>::sendMediaInterfaceDescriptorLoad(
|
HardwareCommandsHelper<GfxFamily>::sendMediaInterfaceDescriptorLoad(
|
||||||
*commandStream,
|
*commandStream,
|
||||||
offsetInterfaceDescriptorTable,
|
offsetInterfaceDescriptorTable,
|
||||||
totalInterfaceDescriptorTableSize);
|
totalInterfaceDescriptorTableSize);
|
||||||
@@ -219,7 +219,7 @@ void HardwareInterface<GfxFamily>::dispatchWalker(
|
|||||||
auto timestampPacketNodeForPostSync = currentTimestampPacketNodes->peekNodes().at(currentDispatchIndex);
|
auto timestampPacketNodeForPostSync = currentTimestampPacketNodes->peekNodes().at(currentDispatchIndex);
|
||||||
postSyncAddress = timestampPacketNodeForPostSync->getGpuAddress();
|
postSyncAddress = timestampPacketNodeForPostSync->getGpuAddress();
|
||||||
}
|
}
|
||||||
KernelCommandsHelper<GfxFamily>::programCacheFlushAfterWalkerCommand(commandStream, commandQueue, mainKernel, postSyncAddress, 0);
|
HardwareCommandsHelper<GfxFamily>::programCacheFlushAfterWalkerCommand(commandStream, commandQueue, mainKernel, postSyncAddress, 0);
|
||||||
}
|
}
|
||||||
dispatchProfilingPerfEndCommands(hwTimeStamps, hwPerfCounter, commandStream, commandQueue);
|
dispatchProfilingPerfEndCommands(hwTimeStamps, hwPerfCounter, commandStream, commandQueue);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ inline void HardwareInterface<GfxFamily>::programWalker(
|
|||||||
GpgpuWalkerHelper<GfxFamily>::setupTimestampPacket(&commandStream, walkerCmd, timestampPacketNode, TimestampPacketStorage::WriteOperationType::AfterWalker);
|
GpgpuWalkerHelper<GfxFamily>::setupTimestampPacket(&commandStream, walkerCmd, timestampPacketNode, TimestampPacketStorage::WriteOperationType::AfterWalker);
|
||||||
}
|
}
|
||||||
|
|
||||||
KernelCommandsHelper<GfxFamily>::sendIndirectState(
|
HardwareCommandsHelper<GfxFamily>::sendIndirectState(
|
||||||
commandStream,
|
commandStream,
|
||||||
dsh,
|
dsh,
|
||||||
ioh,
|
ioh,
|
||||||
|
|||||||
@@ -742,7 +742,7 @@ void CommandStreamReceiverHw<GfxFamily>::blitBuffer(Buffer &dstBuffer, Buffer &s
|
|||||||
|
|
||||||
BlitCommandsHelper<GfxFamily>::dispatchBlitCommandsForBuffer(dstBuffer, srcBuffer, commandStream, dstOffset, srcOffset, copySize);
|
BlitCommandsHelper<GfxFamily>::dispatchBlitCommandsForBuffer(dstBuffer, srcBuffer, commandStream, dstOffset, srcOffset, copySize);
|
||||||
|
|
||||||
KernelCommandsHelper<GfxFamily>::programMiFlushDw(commandStream, tagAllocation->getGpuAddress(), newTaskCount);
|
HardwareCommandsHelper<GfxFamily>::programMiFlushDw(commandStream, tagAllocation->getGpuAddress(), newTaskCount);
|
||||||
|
|
||||||
auto batchBufferEnd = reinterpret_cast<MI_BATCH_BUFFER_END *>(commandStream.getSpace(sizeof(MI_BATCH_BUFFER_END)));
|
auto batchBufferEnd = reinterpret_cast<MI_BATCH_BUFFER_END *>(commandStream.getSpace(sizeof(MI_BATCH_BUFFER_END)));
|
||||||
*batchBufferEnd = GfxFamily::cmdInitBatchBufferEnd;
|
*batchBufferEnd = GfxFamily::cmdInitBatchBufferEnd;
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "runtime/command_queue/gpgpu_walker.h"
|
#include "runtime/command_queue/gpgpu_walker.h"
|
||||||
#include "runtime/device_queue/device_queue_hw.h"
|
#include "runtime/device_queue/device_queue_hw.h"
|
||||||
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/hw_helper.h"
|
#include "runtime/helpers/hw_helper.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
|
||||||
#include "runtime/helpers/preamble.h"
|
#include "runtime/helpers/preamble.h"
|
||||||
#include "runtime/helpers/string.h"
|
#include "runtime/helpers/string.h"
|
||||||
#include "runtime/memory_manager/memory_manager.h"
|
#include "runtime/memory_manager/memory_manager.h"
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ void DeviceQueueHw<GfxFamily>::setupIndirectState(IndirectHeap &surfaceStateHeap
|
|||||||
|
|
||||||
totalBlockSSHSize += alignUp(pBlockInfo->heapInfo.pKernelHeader->SurfaceStateHeapSize, BINDING_TABLE_STATE::SURFACESTATEPOINTER_ALIGN_SIZE);
|
totalBlockSSHSize += alignUp(pBlockInfo->heapInfo.pKernelHeader->SurfaceStateHeapSize, BINDING_TABLE_STATE::SURFACESTATEPOINTER_ALIGN_SIZE);
|
||||||
|
|
||||||
auto btOffset = KernelCommandsHelper<GfxFamily>::pushBindingTableAndSurfaceStates(surfaceStateHeap, *pBlockInfo);
|
auto btOffset = HardwareCommandsHelper<GfxFamily>::pushBindingTableAndSurfaceStates(surfaceStateHeap, *pBlockInfo);
|
||||||
|
|
||||||
parentKernel->setReflectionSurfaceBlockBtOffset(i, static_cast<uint32_t>(btOffset));
|
parentKernel->setReflectionSurfaceBlockBtOffset(i, static_cast<uint32_t>(btOffset));
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2018 Intel Corporation
|
# Copyright (C) 2018-2019 Intel Corporation
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
#
|
#
|
||||||
@@ -34,10 +34,10 @@ set(RUNTIME_SRCS_GENX_CPP_BASE
|
|||||||
device_queue
|
device_queue
|
||||||
experimental_command_buffer
|
experimental_command_buffer
|
||||||
gpgpu_walker
|
gpgpu_walker
|
||||||
|
hardware_commands_helper
|
||||||
hw_helper
|
hw_helper
|
||||||
hw_info
|
hw_info
|
||||||
image
|
image
|
||||||
kernel_commands
|
|
||||||
preamble
|
preamble
|
||||||
preemption
|
preemption
|
||||||
sampler
|
sampler
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
#include "runtime/event/event_tracker.h"
|
#include "runtime/event/event_tracker.h"
|
||||||
#include "runtime/helpers/aligned_memory.h"
|
#include "runtime/helpers/aligned_memory.h"
|
||||||
#include "runtime/helpers/get_info.h"
|
#include "runtime/helpers/get_info.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/timestamp_packet.h"
|
#include "runtime/helpers/timestamp_packet.h"
|
||||||
#include "runtime/mem_obj/mem_obj.h"
|
#include "runtime/mem_obj/mem_obj.h"
|
||||||
#include "runtime/memory_manager/internal_allocation_storage.h"
|
#include "runtime/memory_manager/internal_allocation_storage.h"
|
||||||
|
|||||||
23
runtime/gen11/hardware_commands_helper_gen11.cpp
Normal file
23
runtime/gen11/hardware_commands_helper_gen11.cpp
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2018-2019 Intel Corporation
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
|
#include "runtime/helpers/hardware_commands_helper.inl"
|
||||||
|
#include "runtime/helpers/hardware_commands_helper_base.inl"
|
||||||
|
#include "runtime/os_interface/debug_settings_manager.h"
|
||||||
|
|
||||||
|
#include "hw_cmds.h"
|
||||||
|
|
||||||
|
namespace NEO {
|
||||||
|
|
||||||
|
template <>
|
||||||
|
bool HardwareCommandsHelper<ICLFamily>::doBindingTablePrefetch() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
template struct HardwareCommandsHelper<ICLFamily>;
|
||||||
|
} // namespace NEO
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2018-2019 Intel Corporation
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
|
||||||
#include "runtime/helpers/kernel_commands.inl"
|
|
||||||
#include "runtime/helpers/kernel_commands_base.inl"
|
|
||||||
#include "runtime/os_interface/debug_settings_manager.h"
|
|
||||||
|
|
||||||
#include "hw_cmds.h"
|
|
||||||
|
|
||||||
namespace NEO {
|
|
||||||
|
|
||||||
template <>
|
|
||||||
bool KernelCommandsHelper<ICLFamily>::doBindingTablePrefetch() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
template struct KernelCommandsHelper<ICLFamily>;
|
|
||||||
} // namespace NEO
|
|
||||||
@@ -5,9 +5,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/kernel_commands.inl"
|
#include "runtime/helpers/hardware_commands_helper.inl"
|
||||||
#include "runtime/helpers/kernel_commands_base.inl"
|
#include "runtime/helpers/hardware_commands_helper_base.inl"
|
||||||
|
|
||||||
#include "hw_cmds.h"
|
#include "hw_cmds.h"
|
||||||
#include "hw_cmds_generated.h"
|
#include "hw_cmds_generated.h"
|
||||||
@@ -19,7 +19,7 @@ namespace NEO {
|
|||||||
static uint32_t slmSizeId[] = {0, 1, 2, 4, 4, 8, 8, 8, 8, 16, 16, 16, 16, 16, 16, 16};
|
static uint32_t slmSizeId[] = {0, 1, 2, 4, 4, 8, 8, 8, 8, 16, 16, 16, 16, 16, 16, 16};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
uint32_t KernelCommandsHelper<BDWFamily>::computeSlmValues(uint32_t valueIn) {
|
uint32_t HardwareCommandsHelper<BDWFamily>::computeSlmValues(uint32_t valueIn) {
|
||||||
valueIn += (4 * KB - 1);
|
valueIn += (4 * KB - 1);
|
||||||
valueIn = valueIn >> 12;
|
valueIn = valueIn >> 12;
|
||||||
valueIn = std::min(valueIn, 15u);
|
valueIn = std::min(valueIn, 15u);
|
||||||
@@ -27,6 +27,6 @@ uint32_t KernelCommandsHelper<BDWFamily>::computeSlmValues(uint32_t valueIn) {
|
|||||||
return valueIn;
|
return valueIn;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Explicitly instantiate KernelCommandsHelper for BDW device family
|
// Explicitly instantiate HardwareCommandsHelper for BDW device family
|
||||||
template struct KernelCommandsHelper<BDWFamily>;
|
template struct HardwareCommandsHelper<BDWFamily>;
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
22
runtime/gen9/hardware_commands_helper_gen9.cpp
Normal file
22
runtime/gen9/hardware_commands_helper_gen9.cpp
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2017-2019 Intel Corporation
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
|
#include "runtime/helpers/hardware_commands_helper.inl"
|
||||||
|
#include "runtime/helpers/hardware_commands_helper_base.inl"
|
||||||
|
|
||||||
|
#include "hw_cmds.h"
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
namespace NEO {
|
||||||
|
|
||||||
|
template <>
|
||||||
|
bool HardwareCommandsHelper<SKLFamily>::isPipeControlWArequired() { return true; }
|
||||||
|
|
||||||
|
template struct HardwareCommandsHelper<SKLFamily>;
|
||||||
|
} // namespace NEO
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2017-2019 Intel Corporation
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
|
||||||
#include "runtime/helpers/kernel_commands.inl"
|
|
||||||
#include "runtime/helpers/kernel_commands_base.inl"
|
|
||||||
|
|
||||||
#include "hw_cmds.h"
|
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
namespace NEO {
|
|
||||||
|
|
||||||
template <>
|
|
||||||
bool KernelCommandsHelper<SKLFamily>::isPipeControlWArequired() { return true; }
|
|
||||||
|
|
||||||
template struct KernelCommandsHelper<SKLFamily>;
|
|
||||||
} // namespace NEO
|
|
||||||
@@ -45,6 +45,9 @@ set(RUNTIME_SRCS_HELPERS_BASE
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/flush_stamp.h
|
${CMAKE_CURRENT_SOURCE_DIR}/flush_stamp.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/get_info.h
|
${CMAKE_CURRENT_SOURCE_DIR}/get_info.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hash.h
|
${CMAKE_CURRENT_SOURCE_DIR}/hash.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/hardware_commands_helper.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/hardware_commands_helper.inl
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/hardware_commands_helper_base.inl
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware_context_controller.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/hardware_context_controller.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hardware_context_controller.h
|
${CMAKE_CURRENT_SOURCE_DIR}/hardware_context_controller.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper.cpp
|
||||||
@@ -53,9 +56,6 @@ set(RUNTIME_SRCS_HELPERS_BASE
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_bdw_plus.inl
|
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_bdw_plus.inl
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_info.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/hw_info.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_info.h
|
${CMAKE_CURRENT_SOURCE_DIR}/hw_info.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/kernel_commands.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/kernel_commands.inl
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/kernel_commands_base.inl
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/kernel_helpers.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/kernel_helpers.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/kmd_notify_properties.h
|
${CMAKE_CURRENT_SOURCE_DIR}/kmd_notify_properties.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/kmd_notify_properties.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/kmd_notify_properties.cpp
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ template <typename GfxFamily>
|
|||||||
using WALKER_TYPE = typename GfxFamily::WALKER_TYPE;
|
using WALKER_TYPE = typename GfxFamily::WALKER_TYPE;
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
struct KernelCommandsHelper : public PerThreadDataHelper {
|
struct HardwareCommandsHelper : public PerThreadDataHelper {
|
||||||
using BINDING_TABLE_STATE = typename GfxFamily::BINDING_TABLE_STATE;
|
using BINDING_TABLE_STATE = typename GfxFamily::BINDING_TABLE_STATE;
|
||||||
using RENDER_SURFACE_STATE = typename GfxFamily::RENDER_SURFACE_STATE;
|
using RENDER_SURFACE_STATE = typename GfxFamily::RENDER_SURFACE_STATE;
|
||||||
using INTERFACE_DESCRIPTOR_DATA = typename GfxFamily::INTERFACE_DESCRIPTOR_DATA;
|
using INTERFACE_DESCRIPTOR_DATA = typename GfxFamily::INTERFACE_DESCRIPTOR_DATA;
|
||||||
@@ -23,10 +23,10 @@
|
|||||||
namespace NEO {
|
namespace NEO {
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
bool KernelCommandsHelper<GfxFamily>::isPipeControlWArequired() { return false; }
|
bool HardwareCommandsHelper<GfxFamily>::isPipeControlWArequired() { return false; }
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
uint32_t KernelCommandsHelper<GfxFamily>::computeSlmValues(uint32_t valueIn) {
|
uint32_t HardwareCommandsHelper<GfxFamily>::computeSlmValues(uint32_t valueIn) {
|
||||||
auto value = std::max(valueIn, 1024u);
|
auto value = std::max(valueIn, 1024u);
|
||||||
value = Math::nextPowerOfTwo(value);
|
value = Math::nextPowerOfTwo(value);
|
||||||
value = Math::getMinLsbSet(value);
|
value = Math::getMinLsbSet(value);
|
||||||
@@ -36,7 +36,7 @@ uint32_t KernelCommandsHelper<GfxFamily>::computeSlmValues(uint32_t valueIn) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
size_t KernelCommandsHelper<GfxFamily>::getSizeRequiredDSH(
|
size_t HardwareCommandsHelper<GfxFamily>::getSizeRequiredDSH(
|
||||||
const Kernel &kernel) {
|
const Kernel &kernel) {
|
||||||
using INTERFACE_DESCRIPTOR_DATA = typename GfxFamily::INTERFACE_DESCRIPTOR_DATA;
|
using INTERFACE_DESCRIPTOR_DATA = typename GfxFamily::INTERFACE_DESCRIPTOR_DATA;
|
||||||
using SAMPLER_STATE = typename GfxFamily::SAMPLER_STATE;
|
using SAMPLER_STATE = typename GfxFamily::SAMPLER_STATE;
|
||||||
@@ -62,7 +62,7 @@ size_t KernelCommandsHelper<GfxFamily>::getSizeRequiredDSH(
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
size_t KernelCommandsHelper<GfxFamily>::getSizeRequiredIOH(
|
size_t HardwareCommandsHelper<GfxFamily>::getSizeRequiredIOH(
|
||||||
const Kernel &kernel,
|
const Kernel &kernel,
|
||||||
size_t localWorkSize) {
|
size_t localWorkSize) {
|
||||||
typedef typename GfxFamily::WALKER_TYPE WALKER_TYPE;
|
typedef typename GfxFamily::WALKER_TYPE WALKER_TYPE;
|
||||||
@@ -77,7 +77,7 @@ size_t KernelCommandsHelper<GfxFamily>::getSizeRequiredIOH(
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
size_t KernelCommandsHelper<GfxFamily>::getSizeRequiredSSH(
|
size_t HardwareCommandsHelper<GfxFamily>::getSizeRequiredSSH(
|
||||||
const Kernel &kernel) {
|
const Kernel &kernel) {
|
||||||
typedef typename GfxFamily::BINDING_TABLE_STATE BINDING_TABLE_STATE;
|
typedef typename GfxFamily::BINDING_TABLE_STATE BINDING_TABLE_STATE;
|
||||||
auto sizeSSH = kernel.getSurfaceStateHeapSize();
|
auto sizeSSH = kernel.getSurfaceStateHeapSize();
|
||||||
@@ -98,25 +98,25 @@ size_t getSizeRequired(const MultiDispatchInfo &multiDispatchInfo, SizeGetterT &
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
size_t KernelCommandsHelper<GfxFamily>::getTotalSizeRequiredDSH(
|
size_t HardwareCommandsHelper<GfxFamily>::getTotalSizeRequiredDSH(
|
||||||
const MultiDispatchInfo &multiDispatchInfo) {
|
const MultiDispatchInfo &multiDispatchInfo) {
|
||||||
return getSizeRequired(multiDispatchInfo, [](const DispatchInfo &dispatchInfo) { return getSizeRequiredDSH(*dispatchInfo.getKernel()); });
|
return getSizeRequired(multiDispatchInfo, [](const DispatchInfo &dispatchInfo) { return getSizeRequiredDSH(*dispatchInfo.getKernel()); });
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
size_t KernelCommandsHelper<GfxFamily>::getTotalSizeRequiredIOH(
|
size_t HardwareCommandsHelper<GfxFamily>::getTotalSizeRequiredIOH(
|
||||||
const MultiDispatchInfo &multiDispatchInfo) {
|
const MultiDispatchInfo &multiDispatchInfo) {
|
||||||
return getSizeRequired(multiDispatchInfo, [](const DispatchInfo &dispatchInfo) { return getSizeRequiredIOH(*dispatchInfo.getKernel(), Math::computeTotalElementsCount(dispatchInfo.getLocalWorkgroupSize())); });
|
return getSizeRequired(multiDispatchInfo, [](const DispatchInfo &dispatchInfo) { return getSizeRequiredIOH(*dispatchInfo.getKernel(), Math::computeTotalElementsCount(dispatchInfo.getLocalWorkgroupSize())); });
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
size_t KernelCommandsHelper<GfxFamily>::getTotalSizeRequiredSSH(
|
size_t HardwareCommandsHelper<GfxFamily>::getTotalSizeRequiredSSH(
|
||||||
const MultiDispatchInfo &multiDispatchInfo) {
|
const MultiDispatchInfo &multiDispatchInfo) {
|
||||||
return getSizeRequired(multiDispatchInfo, [](const DispatchInfo &dispatchInfo) { return getSizeRequiredSSH(*dispatchInfo.getKernel()); });
|
return getSizeRequired(multiDispatchInfo, [](const DispatchInfo &dispatchInfo) { return getSizeRequiredSSH(*dispatchInfo.getKernel()); });
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
size_t KernelCommandsHelper<GfxFamily>::sendInterfaceDescriptorData(
|
size_t HardwareCommandsHelper<GfxFamily>::sendInterfaceDescriptorData(
|
||||||
const IndirectHeap &indirectHeap,
|
const IndirectHeap &indirectHeap,
|
||||||
uint64_t offsetInterfaceDescriptor,
|
uint64_t offsetInterfaceDescriptor,
|
||||||
uint64_t kernelStartOffset,
|
uint64_t kernelStartOffset,
|
||||||
@@ -171,9 +171,9 @@ size_t KernelCommandsHelper<GfxFamily>::sendInterfaceDescriptorData(
|
|||||||
// Returned binding table pointer is relative to given heap (which is assumed to be the Surface state base addess)
|
// Returned binding table pointer is relative to given heap (which is assumed to be the Surface state base addess)
|
||||||
// as required by the INTERFACE_DESCRIPTOR_DATA.
|
// as required by the INTERFACE_DESCRIPTOR_DATA.
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
size_t KernelCommandsHelper<GfxFamily>::pushBindingTableAndSurfaceStates(IndirectHeap &dstHeap, const KernelInfo &srcKernelInfo,
|
size_t HardwareCommandsHelper<GfxFamily>::pushBindingTableAndSurfaceStates(IndirectHeap &dstHeap, const KernelInfo &srcKernelInfo,
|
||||||
const void *srcKernelSsh, size_t srcKernelSshSize,
|
const void *srcKernelSsh, size_t srcKernelSshSize,
|
||||||
size_t numberOfBindingTableStates, size_t offsetOfBindingTable) {
|
size_t numberOfBindingTableStates, size_t offsetOfBindingTable) {
|
||||||
using BINDING_TABLE_STATE = typename GfxFamily::BINDING_TABLE_STATE;
|
using BINDING_TABLE_STATE = typename GfxFamily::BINDING_TABLE_STATE;
|
||||||
using INTERFACE_DESCRIPTOR_DATA = typename GfxFamily::INTERFACE_DESCRIPTOR_DATA;
|
using INTERFACE_DESCRIPTOR_DATA = typename GfxFamily::INTERFACE_DESCRIPTOR_DATA;
|
||||||
using RENDER_SURFACE_STATE = typename GfxFamily::RENDER_SURFACE_STATE;
|
using RENDER_SURFACE_STATE = typename GfxFamily::RENDER_SURFACE_STATE;
|
||||||
@@ -221,7 +221,7 @@ size_t KernelCommandsHelper<GfxFamily>::pushBindingTableAndSurfaceStates(Indirec
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
size_t KernelCommandsHelper<GfxFamily>::sendIndirectState(
|
size_t HardwareCommandsHelper<GfxFamily>::sendIndirectState(
|
||||||
LinearStream &commandStream,
|
LinearStream &commandStream,
|
||||||
IndirectHeap &dsh,
|
IndirectHeap &dsh,
|
||||||
IndirectHeap &ioh,
|
IndirectHeap &ioh,
|
||||||
@@ -239,8 +239,8 @@ size_t KernelCommandsHelper<GfxFamily>::sendIndirectState(
|
|||||||
using SAMPLER_STATE = typename GfxFamily::SAMPLER_STATE;
|
using SAMPLER_STATE = typename GfxFamily::SAMPLER_STATE;
|
||||||
|
|
||||||
DEBUG_BREAK_IF(simd != 8 && simd != 16 && simd != 32);
|
DEBUG_BREAK_IF(simd != 8 && simd != 16 && simd != 32);
|
||||||
auto kernelUsesLocalIds = KernelCommandsHelper<GfxFamily>::kernelUsesLocalIds(kernel);
|
auto kernelUsesLocalIds = HardwareCommandsHelper<GfxFamily>::kernelUsesLocalIds(kernel);
|
||||||
auto inlineDataProgrammingRequired = KernelCommandsHelper<GfxFamily>::inlineDataProgrammingRequired(kernel);
|
auto inlineDataProgrammingRequired = HardwareCommandsHelper<GfxFamily>::inlineDataProgrammingRequired(kernel);
|
||||||
|
|
||||||
// Copy the kernel over to the ISH
|
// Copy the kernel over to the ISH
|
||||||
uint64_t kernelStartOffset = 0llu;
|
uint64_t kernelStartOffset = 0llu;
|
||||||
@@ -296,14 +296,14 @@ size_t KernelCommandsHelper<GfxFamily>::sendIndirectState(
|
|||||||
|
|
||||||
uint32_t sizeCrossThreadData = kernel.getCrossThreadDataSize();
|
uint32_t sizeCrossThreadData = kernel.getCrossThreadDataSize();
|
||||||
|
|
||||||
size_t offsetCrossThreadData = KernelCommandsHelper<GfxFamily>::sendCrossThreadData(
|
size_t offsetCrossThreadData = HardwareCommandsHelper<GfxFamily>::sendCrossThreadData(
|
||||||
ioh, kernel, inlineDataProgrammingRequired,
|
ioh, kernel, inlineDataProgrammingRequired,
|
||||||
walkerCmd, sizeCrossThreadData);
|
walkerCmd, sizeCrossThreadData);
|
||||||
|
|
||||||
size_t sizePerThreadDataTotal = 0;
|
size_t sizePerThreadDataTotal = 0;
|
||||||
size_t sizePerThreadData = 0;
|
size_t sizePerThreadData = 0;
|
||||||
|
|
||||||
KernelCommandsHelper<GfxFamily>::programPerThreadData(
|
HardwareCommandsHelper<GfxFamily>::programPerThreadData(
|
||||||
sizePerThreadData,
|
sizePerThreadData,
|
||||||
localIdsGenerationByRuntime,
|
localIdsGenerationByRuntime,
|
||||||
ioh,
|
ioh,
|
||||||
@@ -322,7 +322,7 @@ size_t KernelCommandsHelper<GfxFamily>::sendIndirectState(
|
|||||||
bindingTablePrefetchSize = 0;
|
bindingTablePrefetchSize = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
KernelCommandsHelper<GfxFamily>::sendInterfaceDescriptorData(
|
HardwareCommandsHelper<GfxFamily>::sendInterfaceDescriptorData(
|
||||||
dsh,
|
dsh,
|
||||||
offsetInterfaceDescriptor,
|
offsetInterfaceDescriptor,
|
||||||
kernelStartOffset,
|
kernelStartOffset,
|
||||||
@@ -360,7 +360,7 @@ size_t KernelCommandsHelper<GfxFamily>::sendIndirectState(
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
void KernelCommandsHelper<GfxFamily>::updatePerThreadDataTotal(
|
void HardwareCommandsHelper<GfxFamily>::updatePerThreadDataTotal(
|
||||||
size_t &sizePerThreadData,
|
size_t &sizePerThreadData,
|
||||||
uint32_t &simd,
|
uint32_t &simd,
|
||||||
uint32_t &numChannels,
|
uint32_t &numChannels,
|
||||||
@@ -377,7 +377,7 @@ void KernelCommandsHelper<GfxFamily>::updatePerThreadDataTotal(
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
void KernelCommandsHelper<GfxFamily>::programMiSemaphoreWait(LinearStream &commandStream, uint64_t compareAddress, uint32_t compareData) {
|
void HardwareCommandsHelper<GfxFamily>::programMiSemaphoreWait(LinearStream &commandStream, uint64_t compareAddress, uint32_t compareData) {
|
||||||
using MI_SEMAPHORE_WAIT = typename GfxFamily::MI_SEMAPHORE_WAIT;
|
using MI_SEMAPHORE_WAIT = typename GfxFamily::MI_SEMAPHORE_WAIT;
|
||||||
|
|
||||||
auto miSemaphoreCmd = commandStream.getSpaceForCmd<MI_SEMAPHORE_WAIT>();
|
auto miSemaphoreCmd = commandStream.getSpaceForCmd<MI_SEMAPHORE_WAIT>();
|
||||||
@@ -389,9 +389,9 @@ void KernelCommandsHelper<GfxFamily>::programMiSemaphoreWait(LinearStream &comma
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
typename GfxFamily::MI_ATOMIC *KernelCommandsHelper<GfxFamily>::programMiAtomic(LinearStream &commandStream, uint64_t writeAddress,
|
typename GfxFamily::MI_ATOMIC *HardwareCommandsHelper<GfxFamily>::programMiAtomic(LinearStream &commandStream, uint64_t writeAddress,
|
||||||
typename MI_ATOMIC::ATOMIC_OPCODES opcode,
|
typename MI_ATOMIC::ATOMIC_OPCODES opcode,
|
||||||
typename MI_ATOMIC::DATA_SIZE dataSize) {
|
typename MI_ATOMIC::DATA_SIZE dataSize) {
|
||||||
auto miAtomic = commandStream.getSpaceForCmd<MI_ATOMIC>();
|
auto miAtomic = commandStream.getSpaceForCmd<MI_ATOMIC>();
|
||||||
*miAtomic = GfxFamily::cmdInitAtomic;
|
*miAtomic = GfxFamily::cmdInitAtomic;
|
||||||
miAtomic->setAtomicOpcode(opcode);
|
miAtomic->setAtomicOpcode(opcode);
|
||||||
@@ -402,12 +402,12 @@ typename GfxFamily::MI_ATOMIC *KernelCommandsHelper<GfxFamily>::programMiAtomic(
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
bool KernelCommandsHelper<GfxFamily>::doBindingTablePrefetch() {
|
bool HardwareCommandsHelper<GfxFamily>::doBindingTablePrefetch() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
bool KernelCommandsHelper<GfxFamily>::inlineDataProgrammingRequired(const Kernel &kernel) {
|
bool HardwareCommandsHelper<GfxFamily>::inlineDataProgrammingRequired(const Kernel &kernel) {
|
||||||
if (DebugManager.flags.EnablePassInlineData.get()) {
|
if (DebugManager.flags.EnablePassInlineData.get()) {
|
||||||
return kernel.getKernelInfo().patchInfo.threadPayload->PassInlineData;
|
return kernel.getKernelInfo().patchInfo.threadPayload->PassInlineData;
|
||||||
}
|
}
|
||||||
@@ -415,14 +415,14 @@ bool KernelCommandsHelper<GfxFamily>::inlineDataProgrammingRequired(const Kernel
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
bool KernelCommandsHelper<GfxFamily>::kernelUsesLocalIds(const Kernel &kernel) {
|
bool HardwareCommandsHelper<GfxFamily>::kernelUsesLocalIds(const Kernel &kernel) {
|
||||||
return (kernel.getKernelInfo().patchInfo.threadPayload->LocalIDXPresent ||
|
return (kernel.getKernelInfo().patchInfo.threadPayload->LocalIDXPresent ||
|
||||||
kernel.getKernelInfo().patchInfo.threadPayload->LocalIDYPresent ||
|
kernel.getKernelInfo().patchInfo.threadPayload->LocalIDYPresent ||
|
||||||
kernel.getKernelInfo().patchInfo.threadPayload->LocalIDZPresent);
|
kernel.getKernelInfo().patchInfo.threadPayload->LocalIDZPresent);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
void KernelCommandsHelper<GfxFamily>::programMiFlushDw(LinearStream &commandStream, uint64_t immediateDataGpuAddress, uint64_t immediateData) {
|
void HardwareCommandsHelper<GfxFamily>::programMiFlushDw(LinearStream &commandStream, uint64_t immediateDataGpuAddress, uint64_t immediateData) {
|
||||||
using MI_FLUSH_DW = typename GfxFamily::MI_FLUSH_DW;
|
using MI_FLUSH_DW = typename GfxFamily::MI_FLUSH_DW;
|
||||||
|
|
||||||
auto miFlushDwCmd = commandStream.getSpaceForCmd<MI_FLUSH_DW>();
|
auto miFlushDwCmd = commandStream.getSpaceForCmd<MI_FLUSH_DW>();
|
||||||
@@ -6,21 +6,21 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/kernel/kernel.h"
|
#include "runtime/kernel/kernel.h"
|
||||||
|
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
typename KernelCommandsHelper<GfxFamily>::INTERFACE_DESCRIPTOR_DATA *KernelCommandsHelper<GfxFamily>::getInterfaceDescriptor(
|
typename HardwareCommandsHelper<GfxFamily>::INTERFACE_DESCRIPTOR_DATA *HardwareCommandsHelper<GfxFamily>::getInterfaceDescriptor(
|
||||||
const IndirectHeap &indirectHeap,
|
const IndirectHeap &indirectHeap,
|
||||||
uint64_t offsetInterfaceDescriptor,
|
uint64_t offsetInterfaceDescriptor,
|
||||||
KernelCommandsHelper<GfxFamily>::INTERFACE_DESCRIPTOR_DATA *inlineInterfaceDescriptor) {
|
HardwareCommandsHelper<GfxFamily>::INTERFACE_DESCRIPTOR_DATA *inlineInterfaceDescriptor) {
|
||||||
return static_cast<INTERFACE_DESCRIPTOR_DATA *>(ptrOffset(indirectHeap.getCpuBase(), (size_t)offsetInterfaceDescriptor));
|
return static_cast<INTERFACE_DESCRIPTOR_DATA *>(ptrOffset(indirectHeap.getCpuBase(), (size_t)offsetInterfaceDescriptor));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
void KernelCommandsHelper<GfxFamily>::setAdditionalInfo(
|
void HardwareCommandsHelper<GfxFamily>::setAdditionalInfo(
|
||||||
INTERFACE_DESCRIPTOR_DATA *pInterfaceDescriptor,
|
INTERFACE_DESCRIPTOR_DATA *pInterfaceDescriptor,
|
||||||
const size_t &sizeCrossThreadData,
|
const size_t &sizeCrossThreadData,
|
||||||
const size_t &sizePerThreadData) {
|
const size_t &sizePerThreadData) {
|
||||||
@@ -39,24 +39,24 @@ void KernelCommandsHelper<GfxFamily>::setAdditionalInfo(
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
uint32_t KernelCommandsHelper<GfxFamily>::additionalSizeRequiredDsh() {
|
uint32_t HardwareCommandsHelper<GfxFamily>::additionalSizeRequiredDsh() {
|
||||||
return sizeof(INTERFACE_DESCRIPTOR_DATA);
|
return sizeof(INTERFACE_DESCRIPTOR_DATA);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
size_t KernelCommandsHelper<GfxFamily>::getSizeRequiredCS(const Kernel *kernel) {
|
size_t HardwareCommandsHelper<GfxFamily>::getSizeRequiredCS(const Kernel *kernel) {
|
||||||
size_t size = 2 * sizeof(typename GfxFamily::MEDIA_STATE_FLUSH) +
|
size_t size = 2 * sizeof(typename GfxFamily::MEDIA_STATE_FLUSH) +
|
||||||
sizeof(typename GfxFamily::MEDIA_INTERFACE_DESCRIPTOR_LOAD);
|
sizeof(typename GfxFamily::MEDIA_INTERFACE_DESCRIPTOR_LOAD);
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
size_t KernelCommandsHelper<GfxFamily>::getSizeRequiredForCacheFlush(const CommandQueue &commandQueue, const Kernel *kernel, uint64_t postSyncAddress, uint64_t postSyncData) {
|
size_t HardwareCommandsHelper<GfxFamily>::getSizeRequiredForCacheFlush(const CommandQueue &commandQueue, const Kernel *kernel, uint64_t postSyncAddress, uint64_t postSyncData) {
|
||||||
return kernel->requiresCacheFlushCommand(commandQueue) ? sizeof(typename GfxFamily::PIPE_CONTROL) : 0;
|
return kernel->requiresCacheFlushCommand(commandQueue) ? sizeof(typename GfxFamily::PIPE_CONTROL) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
void KernelCommandsHelper<GfxFamily>::sendMediaStateFlush(
|
void HardwareCommandsHelper<GfxFamily>::sendMediaStateFlush(
|
||||||
LinearStream &commandStream,
|
LinearStream &commandStream,
|
||||||
size_t offsetInterfaceDescriptorData) {
|
size_t offsetInterfaceDescriptorData) {
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ void KernelCommandsHelper<GfxFamily>::sendMediaStateFlush(
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
void KernelCommandsHelper<GfxFamily>::sendMediaInterfaceDescriptorLoad(
|
void HardwareCommandsHelper<GfxFamily>::sendMediaInterfaceDescriptorLoad(
|
||||||
LinearStream &commandStream,
|
LinearStream &commandStream,
|
||||||
size_t offsetInterfaceDescriptorData,
|
size_t offsetInterfaceDescriptorData,
|
||||||
size_t sizeInterfaceDescriptorData) {
|
size_t sizeInterfaceDescriptorData) {
|
||||||
@@ -87,7 +87,7 @@ void KernelCommandsHelper<GfxFamily>::sendMediaInterfaceDescriptorLoad(
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
void KernelCommandsHelper<GfxFamily>::setKernelStartOffset(
|
void HardwareCommandsHelper<GfxFamily>::setKernelStartOffset(
|
||||||
uint64_t &kernelStartOffset,
|
uint64_t &kernelStartOffset,
|
||||||
bool kernelAllocation,
|
bool kernelAllocation,
|
||||||
const KernelInfo &kernelInfo,
|
const KernelInfo &kernelInfo,
|
||||||
@@ -102,7 +102,7 @@ void KernelCommandsHelper<GfxFamily>::setKernelStartOffset(
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
void KernelCommandsHelper<GfxFamily>::programPerThreadData(
|
void HardwareCommandsHelper<GfxFamily>::programPerThreadData(
|
||||||
size_t &sizePerThreadData,
|
size_t &sizePerThreadData,
|
||||||
const bool &localIdsGenerationByRuntime,
|
const bool &localIdsGenerationByRuntime,
|
||||||
LinearStream &ioh,
|
LinearStream &ioh,
|
||||||
@@ -125,7 +125,7 @@ void KernelCommandsHelper<GfxFamily>::programPerThreadData(
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
size_t KernelCommandsHelper<GfxFamily>::sendCrossThreadData(
|
size_t HardwareCommandsHelper<GfxFamily>::sendCrossThreadData(
|
||||||
IndirectHeap &indirectHeap,
|
IndirectHeap &indirectHeap,
|
||||||
Kernel &kernel,
|
Kernel &kernel,
|
||||||
bool inlineDataProgrammingRequired,
|
bool inlineDataProgrammingRequired,
|
||||||
@@ -145,12 +145,12 @@ size_t KernelCommandsHelper<GfxFamily>::sendCrossThreadData(
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
bool KernelCommandsHelper<GfxFamily>::resetBindingTablePrefetch(Kernel &kernel) {
|
bool HardwareCommandsHelper<GfxFamily>::resetBindingTablePrefetch(Kernel &kernel) {
|
||||||
return kernel.isSchedulerKernel || !doBindingTablePrefetch();
|
return kernel.isSchedulerKernel || !doBindingTablePrefetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
void KernelCommandsHelper<GfxFamily>::setInterfaceDescriptorOffset(
|
void HardwareCommandsHelper<GfxFamily>::setInterfaceDescriptorOffset(
|
||||||
WALKER_TYPE<GfxFamily> *walkerCmd,
|
WALKER_TYPE<GfxFamily> *walkerCmd,
|
||||||
uint32_t &interfaceDescriptorIndex) {
|
uint32_t &interfaceDescriptorIndex) {
|
||||||
|
|
||||||
@@ -158,12 +158,12 @@ void KernelCommandsHelper<GfxFamily>::setInterfaceDescriptorOffset(
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
bool KernelCommandsHelper<GfxFamily>::isRuntimeLocalIdsGenerationRequired(uint32_t workDim, size_t *gws, size_t *lws) {
|
bool HardwareCommandsHelper<GfxFamily>::isRuntimeLocalIdsGenerationRequired(uint32_t workDim, size_t *gws, size_t *lws) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
void KernelCommandsHelper<GfxFamily>::programCacheFlushAfterWalkerCommand(LinearStream *commandStream, const CommandQueue &commandQueue, const Kernel *kernel, uint64_t postSyncAddress, uint64_t postSyncData) {
|
void HardwareCommandsHelper<GfxFamily>::programCacheFlushAfterWalkerCommand(LinearStream *commandStream, const CommandQueue &commandQueue, const Kernel *kernel, uint64_t postSyncAddress, uint64_t postSyncData) {
|
||||||
using PIPE_CONTROL = typename GfxFamily::PIPE_CONTROL;
|
using PIPE_CONTROL = typename GfxFamily::PIPE_CONTROL;
|
||||||
auto pipeControl = reinterpret_cast<PIPE_CONTROL *>(commandStream->getSpace(sizeof(PIPE_CONTROL)));
|
auto pipeControl = reinterpret_cast<PIPE_CONTROL *>(commandStream->getSpace(sizeof(PIPE_CONTROL)));
|
||||||
*pipeControl = GfxFamily::cmdInitPipeControl;
|
*pipeControl = GfxFamily::cmdInitPipeControl;
|
||||||
@@ -172,5 +172,5 @@ void KernelCommandsHelper<GfxFamily>::programCacheFlushAfterWalkerCommand(Linear
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
void KernelCommandsHelper<GfxFamily>::appendMiFlushDw(typename GfxFamily::MI_FLUSH_DW *miFlushDwCmd) {}
|
void HardwareCommandsHelper<GfxFamily>::appendMiFlushDw(typename GfxFamily::MI_FLUSH_DW *miFlushDwCmd) {}
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
@@ -10,9 +10,9 @@
|
|||||||
#include "runtime/gmm_helper/gmm.h"
|
#include "runtime/gmm_helper/gmm.h"
|
||||||
#include "runtime/gmm_helper/gmm_helper.h"
|
#include "runtime/gmm_helper/gmm_helper.h"
|
||||||
#include "runtime/helpers/aligned_memory.h"
|
#include "runtime/helpers/aligned_memory.h"
|
||||||
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/hw_helper.h"
|
#include "runtime/helpers/hw_helper.h"
|
||||||
#include "runtime/helpers/hw_info.h"
|
#include "runtime/helpers/hw_info.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
|
||||||
#include "runtime/memory_manager/graphics_allocation.h"
|
#include "runtime/memory_manager/graphics_allocation.h"
|
||||||
#include "runtime/memory_manager/memory_constants.h"
|
#include "runtime/memory_manager/memory_constants.h"
|
||||||
#include "runtime/os_interface/os_interface.h"
|
#include "runtime/os_interface/os_interface.h"
|
||||||
@@ -200,7 +200,7 @@ void PipeControlHelper<GfxFamily>::addPipeControl(LinearStream &commandStream, b
|
|||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
int PipeControlHelper<GfxFamily>::getRequiredPipeControlSize() {
|
int PipeControlHelper<GfxFamily>::getRequiredPipeControlSize() {
|
||||||
const auto pipeControlCount = KernelCommandsHelper<GfxFamily>::isPipeControlWArequired() ? 2u : 1u;
|
const auto pipeControlCount = HardwareCommandsHelper<GfxFamily>::isPipeControlWArequired() ? 2u : 1u;
|
||||||
return pipeControlCount * sizeof(typename GfxFamily::PIPE_CONTROL);
|
return pipeControlCount * sizeof(typename GfxFamily::PIPE_CONTROL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#include "runtime/command_stream/command_stream_receiver.h"
|
#include "runtime/command_stream/command_stream_receiver.h"
|
||||||
#include "runtime/command_stream/linear_stream.h"
|
#include "runtime/command_stream/linear_stream.h"
|
||||||
#include "runtime/event/event.h"
|
#include "runtime/event/event.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/utilities/tag_allocator.h"
|
#include "runtime/utilities/tag_allocator.h"
|
||||||
|
|
||||||
using namespace NEO;
|
using namespace NEO;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "runtime/helpers/csr_deps.h"
|
#include "runtime/helpers/csr_deps.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/properties_helper.h"
|
#include "runtime/helpers/properties_helper.h"
|
||||||
#include "runtime/utilities/tag_allocator.h"
|
#include "runtime/utilities/tag_allocator.h"
|
||||||
|
|
||||||
@@ -92,13 +92,13 @@ struct TimestampPacketHelper {
|
|||||||
auto compareAddress = timestampPacketNode.getGpuAddress() + offsetof(TimestampPacketStorage, packets[0].contextEnd);
|
auto compareAddress = timestampPacketNode.getGpuAddress() + offsetof(TimestampPacketStorage, packets[0].contextEnd);
|
||||||
auto dependenciesCountAddress = timestampPacketNode.getGpuAddress() + offsetof(TimestampPacketStorage, implicitDependenciesCount);
|
auto dependenciesCountAddress = timestampPacketNode.getGpuAddress() + offsetof(TimestampPacketStorage, implicitDependenciesCount);
|
||||||
|
|
||||||
KernelCommandsHelper<GfxFamily>::programMiSemaphoreWait(cmdStream, compareAddress, 1);
|
HardwareCommandsHelper<GfxFamily>::programMiSemaphoreWait(cmdStream, compareAddress, 1);
|
||||||
|
|
||||||
timestampPacketNode.tagForCpuAccess->incImplicitDependenciesCount();
|
timestampPacketNode.tagForCpuAccess->incImplicitDependenciesCount();
|
||||||
|
|
||||||
KernelCommandsHelper<GfxFamily>::programMiAtomic(cmdStream, dependenciesCountAddress,
|
HardwareCommandsHelper<GfxFamily>::programMiAtomic(cmdStream, dependenciesCountAddress,
|
||||||
MI_ATOMIC::ATOMIC_OPCODES::ATOMIC_4B_DECREMENT,
|
MI_ATOMIC::ATOMIC_OPCODES::ATOMIC_4B_DECREMENT,
|
||||||
MI_ATOMIC::DATA_SIZE::DATA_SIZE_DWORD);
|
MI_ATOMIC::DATA_SIZE::DATA_SIZE_DWORD);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
|
|||||||
@@ -16,9 +16,9 @@
|
|||||||
#include "runtime/gmm_helper/gmm_helper.h"
|
#include "runtime/gmm_helper/gmm_helper.h"
|
||||||
#include "runtime/gmm_helper/resource_info.h"
|
#include "runtime/gmm_helper/resource_info.h"
|
||||||
#include "runtime/helpers/aligned_memory.h"
|
#include "runtime/helpers/aligned_memory.h"
|
||||||
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/hw_helper.h"
|
#include "runtime/helpers/hw_helper.h"
|
||||||
#include "runtime/helpers/hw_info.h"
|
#include "runtime/helpers/hw_info.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
|
||||||
#include "runtime/helpers/options.h"
|
#include "runtime/helpers/options.h"
|
||||||
#include "runtime/mem_obj/image.h"
|
#include "runtime/mem_obj/image.h"
|
||||||
#include "runtime/memory_manager/deferrable_allocation_deletion.h"
|
#include "runtime/memory_manager/deferrable_allocation_deletion.h"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#include "core/helpers/ptr_math.h"
|
#include "core/helpers/ptr_math.h"
|
||||||
#include "runtime/command_queue/command_queue.h"
|
#include "runtime/command_queue/command_queue.h"
|
||||||
#include "runtime/event/event.h"
|
#include "runtime/event/event.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
#include "unit_tests/aub_tests/fixtures/aub_fixture.h"
|
#include "unit_tests/aub_tests/fixtures/aub_fixture.h"
|
||||||
#include "unit_tests/aub_tests/fixtures/hello_world_fixture.h"
|
#include "unit_tests/aub_tests/fixtures/hello_world_fixture.h"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "runtime/event/event.h"
|
#include "runtime/event/event.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/timestamp_packet.h"
|
#include "runtime/helpers/timestamp_packet.h"
|
||||||
#include "runtime/mem_obj/buffer.h"
|
#include "runtime/mem_obj/buffer.h"
|
||||||
#include "runtime/utilities/tag_allocator.h"
|
#include "runtime/utilities/tag_allocator.h"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include "runtime/command_queue/command_queue_hw.h"
|
#include "runtime/command_queue/command_queue_hw.h"
|
||||||
#include "runtime/command_stream/command_stream_receiver.h"
|
#include "runtime/command_stream/command_stream_receiver.h"
|
||||||
#include "runtime/event/event.h"
|
#include "runtime/event/event.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/options.h"
|
#include "runtime/helpers/options.h"
|
||||||
#include "runtime/helpers/timestamp_packet.h"
|
#include "runtime/helpers/timestamp_packet.h"
|
||||||
#include "runtime/memory_manager/internal_allocation_storage.h"
|
#include "runtime/memory_manager/internal_allocation_storage.h"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include "runtime/command_queue/hardware_interface.h"
|
#include "runtime/command_queue/hardware_interface.h"
|
||||||
#include "runtime/event/perf_counter.h"
|
#include "runtime/event/perf_counter.h"
|
||||||
#include "runtime/helpers/aligned_memory.h"
|
#include "runtime/helpers/aligned_memory.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/task_information.h"
|
#include "runtime/helpers/task_information.h"
|
||||||
#include "runtime/memory_manager/internal_allocation_storage.h"
|
#include "runtime/memory_manager/internal_allocation_storage.h"
|
||||||
#include "runtime/utilities/tag_allocator.h"
|
#include "runtime/utilities/tag_allocator.h"
|
||||||
@@ -118,7 +118,7 @@ HWTEST_F(DispatchWalkerTest, shouldntChangeCommandStreamMemory) {
|
|||||||
|
|
||||||
// Consume all memory except what is needed for this enqueue
|
// Consume all memory except what is needed for this enqueue
|
||||||
auto sizeDispatchWalkerNeeds = sizeof(typename FamilyType::WALKER_TYPE) +
|
auto sizeDispatchWalkerNeeds = sizeof(typename FamilyType::WALKER_TYPE) +
|
||||||
KernelCommandsHelper<FamilyType>::getSizeRequiredCS(&kernel);
|
HardwareCommandsHelper<FamilyType>::getSizeRequiredCS(&kernel);
|
||||||
|
|
||||||
//cs has a minimum required size
|
//cs has a minimum required size
|
||||||
auto sizeThatNeedsToBeSubstracted = sizeDispatchWalkerNeeds + CSRequirements::minCommandQueueCommandStreamSize;
|
auto sizeThatNeedsToBeSubstracted = sizeDispatchWalkerNeeds + CSRequirements::minCommandQueueCommandStreamSize;
|
||||||
@@ -166,7 +166,7 @@ HWTEST_F(DispatchWalkerTest, noLocalIdsShouldntCrash) {
|
|||||||
|
|
||||||
// Consume all memory except what is needed for this enqueue
|
// Consume all memory except what is needed for this enqueue
|
||||||
auto sizeDispatchWalkerNeeds = sizeof(typename FamilyType::WALKER_TYPE) +
|
auto sizeDispatchWalkerNeeds = sizeof(typename FamilyType::WALKER_TYPE) +
|
||||||
KernelCommandsHelper<FamilyType>::getSizeRequiredCS(&kernel);
|
HardwareCommandsHelper<FamilyType>::getSizeRequiredCS(&kernel);
|
||||||
|
|
||||||
//cs has a minimum required size
|
//cs has a minimum required size
|
||||||
auto sizeThatNeedsToBeSubstracted = sizeDispatchWalkerNeeds + CSRequirements::minCommandQueueCommandStreamSize;
|
auto sizeThatNeedsToBeSubstracted = sizeDispatchWalkerNeeds + CSRequirements::minCommandQueueCommandStreamSize;
|
||||||
@@ -723,9 +723,9 @@ HWTEST_F(DispatchWalkerTest, dispatchWalkerShouldGetRequiredHeapSizesFromKernelW
|
|||||||
|
|
||||||
auto expectedSizeCSAllocation = MemoryConstants::pageSize64k;
|
auto expectedSizeCSAllocation = MemoryConstants::pageSize64k;
|
||||||
auto expectedSizeCS = MemoryConstants::pageSize64k - CSRequirements::csOverfetchSize;
|
auto expectedSizeCS = MemoryConstants::pageSize64k - CSRequirements::csOverfetchSize;
|
||||||
auto expectedSizeDSH = KernelCommandsHelper<FamilyType>::getSizeRequiredDSH(kernel);
|
auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredDSH(kernel);
|
||||||
auto expectedSizeIOH = KernelCommandsHelper<FamilyType>::getSizeRequiredIOH(kernel, Math::computeTotalElementsCount(localWorkgroupSize));
|
auto expectedSizeIOH = HardwareCommandsHelper<FamilyType>::getSizeRequiredIOH(kernel, Math::computeTotalElementsCount(localWorkgroupSize));
|
||||||
auto expectedSizeSSH = KernelCommandsHelper<FamilyType>::getSizeRequiredSSH(kernel);
|
auto expectedSizeSSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredSSH(kernel);
|
||||||
|
|
||||||
EXPECT_EQ(expectedSizeCSAllocation, blockedCommandsData->commandStream->getGraphicsAllocation()->getUnderlyingBufferSize());
|
EXPECT_EQ(expectedSizeCSAllocation, blockedCommandsData->commandStream->getGraphicsAllocation()->getUnderlyingBufferSize());
|
||||||
EXPECT_EQ(expectedSizeCS, blockedCommandsData->commandStream->getMaxAvailableSpace());
|
EXPECT_EQ(expectedSizeCS, blockedCommandsData->commandStream->getMaxAvailableSpace());
|
||||||
@@ -761,9 +761,9 @@ HWTEST_F(DispatchWalkerTest, dispatchWalkerShouldGetRequiredHeapSizesFromMdiWhen
|
|||||||
|
|
||||||
auto expectedSizeCSAllocation = MemoryConstants::pageSize64k;
|
auto expectedSizeCSAllocation = MemoryConstants::pageSize64k;
|
||||||
auto expectedSizeCS = MemoryConstants::pageSize64k - CSRequirements::csOverfetchSize;
|
auto expectedSizeCS = MemoryConstants::pageSize64k - CSRequirements::csOverfetchSize;
|
||||||
auto expectedSizeDSH = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredDSH(multiDispatchInfo);
|
auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredDSH(multiDispatchInfo);
|
||||||
auto expectedSizeIOH = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredIOH(multiDispatchInfo);
|
auto expectedSizeIOH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredIOH(multiDispatchInfo);
|
||||||
auto expectedSizeSSH = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
auto expectedSizeSSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
||||||
|
|
||||||
EXPECT_EQ(expectedSizeCSAllocation, blockedCommandsData->commandStream->getGraphicsAllocation()->getUnderlyingBufferSize());
|
EXPECT_EQ(expectedSizeCSAllocation, blockedCommandsData->commandStream->getGraphicsAllocation()->getUnderlyingBufferSize());
|
||||||
EXPECT_EQ(expectedSizeCS, blockedCommandsData->commandStream->getMaxAvailableSpace());
|
EXPECT_EQ(expectedSizeCS, blockedCommandsData->commandStream->getMaxAvailableSpace());
|
||||||
@@ -877,7 +877,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, DispatchWalkerTest, dispatchWalkerWithMultipleDispat
|
|||||||
// create Indirect DSH heap
|
// create Indirect DSH heap
|
||||||
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192);
|
auto &indirectHeap = pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192);
|
||||||
|
|
||||||
indirectHeap.align(KernelCommandsHelper<FamilyType>::alignInterfaceDescriptorData);
|
indirectHeap.align(HardwareCommandsHelper<FamilyType>::alignInterfaceDescriptorData);
|
||||||
auto dshBeforeMultiDisptach = indirectHeap.getUsed();
|
auto dshBeforeMultiDisptach = indirectHeap.getUsed();
|
||||||
|
|
||||||
HardwareInterface<FamilyType>::dispatchWalker(
|
HardwareInterface<FamilyType>::dispatchWalker(
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "runtime/command_queue/gpgpu_walker.h"
|
#include "runtime/command_queue/gpgpu_walker.h"
|
||||||
#include "runtime/command_stream/command_stream_receiver.h"
|
#include "runtime/command_stream/command_stream_receiver.h"
|
||||||
#include "runtime/event/user_event.h"
|
#include "runtime/event/user_event.h"
|
||||||
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
#include "unit_tests/command_queue/command_enqueue_fixture.h"
|
#include "unit_tests/command_queue/command_enqueue_fixture.h"
|
||||||
#include "unit_tests/gen_common/gen_cmd_parse.h"
|
#include "unit_tests/gen_common/gen_cmd_parse.h"
|
||||||
@@ -241,7 +242,6 @@ HWTEST_F(BarrierTest, givenBlockedCommandQueueAndEnqueueBarrierWithWaitlistRetur
|
|||||||
event2.setStatus(CL_COMPLETE);
|
event2.setStatus(CL_COMPLETE);
|
||||||
clReleaseEvent(event);
|
clReleaseEvent(event);
|
||||||
}
|
}
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
|
||||||
|
|
||||||
HWTEST_F(BarrierTest, givenEmptyCommandStreamAndBlockedBarrierCommandWhenUserEventIsSignaledThenNewCommandStreamIsAcquired) {
|
HWTEST_F(BarrierTest, givenEmptyCommandStreamAndBlockedBarrierCommandWhenUserEventIsSignaledThenNewCommandStreamIsAcquired) {
|
||||||
UserEvent event2(&pCmdQ->getContext());
|
UserEvent event2(&pCmdQ->getContext());
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
#include "unit_tests/fixtures/two_walker_fixture.h"
|
#include "unit_tests/fixtures/two_walker_fixture.h"
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ HWTEST_F(IOQWithTwoWalkers, shouldHaveAPipecontrolBetweenWalkers2) {
|
|||||||
|
|
||||||
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
|
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
|
||||||
|
|
||||||
auto WaNeeded = KernelCommandsHelper<FamilyType>::isPipeControlWArequired();
|
auto WaNeeded = HardwareCommandsHelper<FamilyType>::isPipeControlWArequired();
|
||||||
|
|
||||||
auto itorCmd = find<PIPE_CONTROL *>(itorWalker1, itorWalker2);
|
auto itorCmd = find<PIPE_CONTROL *>(itorWalker1, itorWalker2);
|
||||||
ASSERT_NE(itorWalker2, itorCmd);
|
ASSERT_NE(itorWalker2, itorCmd);
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
#include "runtime/command_queue/enqueue_write_buffer.h"
|
#include "runtime/command_queue/enqueue_write_buffer.h"
|
||||||
#include "runtime/command_queue/gpgpu_walker.h"
|
#include "runtime/command_queue/gpgpu_walker.h"
|
||||||
#include "runtime/event/event.h"
|
#include "runtime/event/event.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/kernel/kernel.h"
|
#include "runtime/kernel/kernel.h"
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
#include "unit_tests/command_queue/command_enqueue_fixture.h"
|
#include "unit_tests/command_queue/command_enqueue_fixture.h"
|
||||||
@@ -96,9 +96,9 @@ HWTEST_F(GetSizeRequiredBufferTest, enqueueFillBuffer) {
|
|||||||
auto usedAfterSSH = ssh.getUsed();
|
auto usedAfterSSH = ssh.getUsed();
|
||||||
|
|
||||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_FILL_BUFFER, CsrDependencies(), false, false, *pCmdQ, multiDispatchInfo);
|
auto expectedSizeCS = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_FILL_BUFFER, CsrDependencies(), false, false, *pCmdQ, multiDispatchInfo);
|
||||||
auto expectedSizeDSH = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredDSH(multiDispatchInfo);
|
auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredDSH(multiDispatchInfo);
|
||||||
auto expectedSizeIOH = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredIOH(multiDispatchInfo);
|
auto expectedSizeIOH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredIOH(multiDispatchInfo);
|
||||||
auto expectedSizeSSH = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
auto expectedSizeSSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
||||||
|
|
||||||
EXPECT_EQ(0u, expectedSizeIOH % GPGPU_WALKER::INDIRECTDATASTARTADDRESS_ALIGN_SIZE);
|
EXPECT_EQ(0u, expectedSizeIOH % GPGPU_WALKER::INDIRECTDATASTARTADDRESS_ALIGN_SIZE);
|
||||||
EXPECT_EQ(0u, expectedSizeDSH % 64);
|
EXPECT_EQ(0u, expectedSizeDSH % 64);
|
||||||
@@ -147,9 +147,9 @@ HWTEST_F(GetSizeRequiredBufferTest, enqueueCopyBuffer) {
|
|||||||
auto usedAfterSSH = ssh.getUsed();
|
auto usedAfterSSH = ssh.getUsed();
|
||||||
|
|
||||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_COPY_BUFFER, CsrDependencies(), false, false, *pCmdQ, multiDispatchInfo);
|
auto expectedSizeCS = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_COPY_BUFFER, CsrDependencies(), false, false, *pCmdQ, multiDispatchInfo);
|
||||||
auto expectedSizeDSH = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredDSH(multiDispatchInfo);
|
auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredDSH(multiDispatchInfo);
|
||||||
auto expectedSizeIOH = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredIOH(multiDispatchInfo);
|
auto expectedSizeIOH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredIOH(multiDispatchInfo);
|
||||||
auto expectedSizeSSH = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
auto expectedSizeSSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
||||||
|
|
||||||
EXPECT_EQ(0u, expectedSizeIOH % GPGPU_WALKER::INDIRECTDATASTARTADDRESS_ALIGN_SIZE);
|
EXPECT_EQ(0u, expectedSizeIOH % GPGPU_WALKER::INDIRECTDATASTARTADDRESS_ALIGN_SIZE);
|
||||||
EXPECT_EQ(0u, expectedSizeDSH % 64);
|
EXPECT_EQ(0u, expectedSizeDSH % 64);
|
||||||
@@ -199,9 +199,9 @@ HWTEST_F(GetSizeRequiredBufferTest, enqueueReadBufferNonBlocking) {
|
|||||||
auto usedAfterSSH = ssh.getUsed();
|
auto usedAfterSSH = ssh.getUsed();
|
||||||
|
|
||||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_READ_BUFFER, CsrDependencies(), false, false, *pCmdQ, multiDispatchInfo);
|
auto expectedSizeCS = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_READ_BUFFER, CsrDependencies(), false, false, *pCmdQ, multiDispatchInfo);
|
||||||
auto expectedSizeDSH = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredDSH(multiDispatchInfo);
|
auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredDSH(multiDispatchInfo);
|
||||||
auto expectedSizeIOH = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredIOH(multiDispatchInfo);
|
auto expectedSizeIOH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredIOH(multiDispatchInfo);
|
||||||
auto expectedSizeSSH = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
auto expectedSizeSSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
||||||
|
|
||||||
EXPECT_EQ(0u, expectedSizeIOH % GPGPU_WALKER::INDIRECTDATASTARTADDRESS_ALIGN_SIZE);
|
EXPECT_EQ(0u, expectedSizeIOH % GPGPU_WALKER::INDIRECTDATASTARTADDRESS_ALIGN_SIZE);
|
||||||
EXPECT_EQ(0u, expectedSizeDSH % 64);
|
EXPECT_EQ(0u, expectedSizeDSH % 64);
|
||||||
@@ -252,9 +252,9 @@ HWTEST_F(GetSizeRequiredBufferTest, enqueueReadBufferBlocking) {
|
|||||||
auto usedAfterSSH = ssh.getUsed();
|
auto usedAfterSSH = ssh.getUsed();
|
||||||
|
|
||||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_READ_BUFFER, CsrDependencies(), false, false, *pCmdQ, multiDispatchInfo);
|
auto expectedSizeCS = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_READ_BUFFER, CsrDependencies(), false, false, *pCmdQ, multiDispatchInfo);
|
||||||
auto expectedSizeDSH = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredDSH(multiDispatchInfo);
|
auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredDSH(multiDispatchInfo);
|
||||||
auto expectedSizeIOH = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredIOH(multiDispatchInfo);
|
auto expectedSizeIOH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredIOH(multiDispatchInfo);
|
||||||
auto expectedSizeSSH = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
auto expectedSizeSSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
||||||
|
|
||||||
EXPECT_EQ(0u, expectedSizeIOH % GPGPU_WALKER::INDIRECTDATASTARTADDRESS_ALIGN_SIZE);
|
EXPECT_EQ(0u, expectedSizeIOH % GPGPU_WALKER::INDIRECTDATASTARTADDRESS_ALIGN_SIZE);
|
||||||
EXPECT_EQ(0u, expectedSizeDSH % 64);
|
EXPECT_EQ(0u, expectedSizeDSH % 64);
|
||||||
@@ -305,9 +305,9 @@ HWTEST_F(GetSizeRequiredBufferTest, enqueueWriteBufferNonBlocking) {
|
|||||||
auto usedAfterSSH = ssh.getUsed();
|
auto usedAfterSSH = ssh.getUsed();
|
||||||
|
|
||||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_WRITE_BUFFER, CsrDependencies(), false, false, *pCmdQ, multiDispatchInfo);
|
auto expectedSizeCS = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_WRITE_BUFFER, CsrDependencies(), false, false, *pCmdQ, multiDispatchInfo);
|
||||||
auto expectedSizeDSH = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredDSH(multiDispatchInfo);
|
auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredDSH(multiDispatchInfo);
|
||||||
auto expectedSizeIOH = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredIOH(multiDispatchInfo);
|
auto expectedSizeIOH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredIOH(multiDispatchInfo);
|
||||||
auto expectedSizeSSH = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
auto expectedSizeSSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
||||||
|
|
||||||
// Since each enqueue* may flush, we may see a MI_BATCH_BUFFER_END appended.
|
// Since each enqueue* may flush, we may see a MI_BATCH_BUFFER_END appended.
|
||||||
expectedSizeCS += sizeof(typename FamilyType::MI_BATCH_BUFFER_END);
|
expectedSizeCS += sizeof(typename FamilyType::MI_BATCH_BUFFER_END);
|
||||||
@@ -355,9 +355,9 @@ HWTEST_F(GetSizeRequiredBufferTest, enqueueWriteBufferBlocking) {
|
|||||||
auto usedAfterSSH = ssh.getUsed();
|
auto usedAfterSSH = ssh.getUsed();
|
||||||
|
|
||||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_WRITE_BUFFER, CsrDependencies(), false, false, *pCmdQ, multiDispatchInfo);
|
auto expectedSizeCS = EnqueueOperation<FamilyType>::getTotalSizeRequiredCS(CL_COMMAND_WRITE_BUFFER, CsrDependencies(), false, false, *pCmdQ, multiDispatchInfo);
|
||||||
auto expectedSizeDSH = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredDSH(multiDispatchInfo);
|
auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredDSH(multiDispatchInfo);
|
||||||
auto expectedSizeIOH = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredIOH(multiDispatchInfo);
|
auto expectedSizeIOH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredIOH(multiDispatchInfo);
|
||||||
auto expectedSizeSSH = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
auto expectedSizeSSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
||||||
|
|
||||||
// Since each enqueue* may flush, we may see a MI_BATCH_BUFFER_END appended.
|
// Since each enqueue* may flush, we may see a MI_BATCH_BUFFER_END appended.
|
||||||
expectedSizeCS += sizeof(typename FamilyType::MI_BATCH_BUFFER_END);
|
expectedSizeCS += sizeof(typename FamilyType::MI_BATCH_BUFFER_END);
|
||||||
@@ -394,7 +394,7 @@ HWTEST_F(GetSizeRequiredBufferTest, givenMultipleKernelRequiringSshWhenTotalSize
|
|||||||
sizeSSH = alignUp(sizeSSH, MemoryConstants::pageSize);
|
sizeSSH = alignUp(sizeSSH, MemoryConstants::pageSize);
|
||||||
|
|
||||||
EXPECT_EQ(4u, multiDispatchInfo.size());
|
EXPECT_EQ(4u, multiDispatchInfo.size());
|
||||||
auto expectedSizeSSH = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
auto expectedSizeSSH = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
||||||
EXPECT_EQ(sizeSSH, expectedSizeSSH);
|
EXPECT_EQ(sizeSSH, expectedSizeSSH);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -422,9 +422,9 @@ HWTEST_F(GetSizeRequiredBufferTest, enqueueKernelHelloWorld) {
|
|||||||
auto sshAfter = pSSH->getUsed();
|
auto sshAfter = pSSH->getUsed();
|
||||||
|
|
||||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, false, false, *pCmdQ, KernelFixture::pKernel);
|
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, false, false, *pCmdQ, KernelFixture::pKernel);
|
||||||
auto expectedSizeDSH = KernelCommandsHelper<FamilyType>::getSizeRequiredDSH(*KernelFixture::pKernel);
|
auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredDSH(*KernelFixture::pKernel);
|
||||||
auto expectedSizeIOH = KernelCommandsHelper<FamilyType>::getSizeRequiredIOH(*KernelFixture::pKernel, workSize[0]);
|
auto expectedSizeIOH = HardwareCommandsHelper<FamilyType>::getSizeRequiredIOH(*KernelFixture::pKernel, workSize[0]);
|
||||||
auto expectedSizeSSH = KernelCommandsHelper<FamilyType>::getSizeRequiredSSH(*KernelFixture::pKernel);
|
auto expectedSizeSSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredSSH(*KernelFixture::pKernel);
|
||||||
|
|
||||||
// Since each enqueue* may flush, we may see a MI_BATCH_BUFFER_END appended.
|
// Since each enqueue* may flush, we may see a MI_BATCH_BUFFER_END appended.
|
||||||
expectedSizeCS += sizeof(typename FamilyType::MI_BATCH_BUFFER_END);
|
expectedSizeCS += sizeof(typename FamilyType::MI_BATCH_BUFFER_END);
|
||||||
@@ -461,9 +461,9 @@ HWTEST_F(GetSizeRequiredBufferTest, enqueueKernelSimpleArg) {
|
|||||||
auto sshAfter = pSSH->getUsed();
|
auto sshAfter = pSSH->getUsed();
|
||||||
|
|
||||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, false, false, *pCmdQ, KernelFixture::pKernel);
|
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, false, false, *pCmdQ, KernelFixture::pKernel);
|
||||||
auto expectedSizeDSH = KernelCommandsHelper<FamilyType>::getSizeRequiredDSH(*KernelFixture::pKernel);
|
auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredDSH(*KernelFixture::pKernel);
|
||||||
auto expectedSizeIOH = KernelCommandsHelper<FamilyType>::getSizeRequiredIOH(*KernelFixture::pKernel, workSize[0]);
|
auto expectedSizeIOH = HardwareCommandsHelper<FamilyType>::getSizeRequiredIOH(*KernelFixture::pKernel, workSize[0]);
|
||||||
auto expectedSizeSSH = KernelCommandsHelper<FamilyType>::getSizeRequiredSSH(*KernelFixture::pKernel);
|
auto expectedSizeSSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredSSH(*KernelFixture::pKernel);
|
||||||
|
|
||||||
EXPECT_EQ(0u, expectedSizeIOH % GPGPU_WALKER::INDIRECTDATASTARTADDRESS_ALIGN_SIZE);
|
EXPECT_EQ(0u, expectedSizeIOH % GPGPU_WALKER::INDIRECTDATASTARTADDRESS_ALIGN_SIZE);
|
||||||
EXPECT_EQ(0u, expectedSizeDSH % 64);
|
EXPECT_EQ(0u, expectedSizeDSH % 64);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
#include "runtime/command_queue/gpgpu_walker.h"
|
#include "runtime/command_queue/gpgpu_walker.h"
|
||||||
#include "runtime/event/event.h"
|
#include "runtime/event/event.h"
|
||||||
#include "runtime/event/perf_counter.h"
|
#include "runtime/event/perf_counter.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/kernel/kernel.h"
|
#include "runtime/kernel/kernel.h"
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
#include "unit_tests/command_queue/command_enqueue_fixture.h"
|
#include "unit_tests/command_queue/command_enqueue_fixture.h"
|
||||||
@@ -89,9 +89,9 @@ HWTEST_F(GetSizeRequiredImageTest, enqueueCopyImage) {
|
|||||||
auto usedAfterSSH = ssh.getUsed();
|
auto usedAfterSSH = ssh.getUsed();
|
||||||
|
|
||||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_COPY_IMAGE, false, false, *pCmdQ, kernel);
|
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_COPY_IMAGE, false, false, *pCmdQ, kernel);
|
||||||
auto expectedSizeDSH = KernelCommandsHelper<FamilyType>::getSizeRequiredDSH(*kernel);
|
auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredDSH(*kernel);
|
||||||
auto expectedSizeIOH = KernelCommandsHelper<FamilyType>::getSizeRequiredIOH(*kernel);
|
auto expectedSizeIOH = HardwareCommandsHelper<FamilyType>::getSizeRequiredIOH(*kernel);
|
||||||
auto expectedSizeSSH = KernelCommandsHelper<FamilyType>::getSizeRequiredSSH(*kernel);
|
auto expectedSizeSSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredSSH(*kernel);
|
||||||
|
|
||||||
// Since each enqueue* may flush, we may see a MI_BATCH_BUFFER_END appended.
|
// Since each enqueue* may flush, we may see a MI_BATCH_BUFFER_END appended.
|
||||||
expectedSizeCS += sizeof(typename FamilyType::MI_BATCH_BUFFER_END);
|
expectedSizeCS += sizeof(typename FamilyType::MI_BATCH_BUFFER_END);
|
||||||
@@ -137,9 +137,9 @@ HWTEST_F(GetSizeRequiredImageTest, enqueueCopyReadAndWriteImage) {
|
|||||||
auto usedAfterSSH = ssh.getUsed();
|
auto usedAfterSSH = ssh.getUsed();
|
||||||
|
|
||||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_COPY_IMAGE, false, false, *pCmdQ, kernel.get());
|
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_COPY_IMAGE, false, false, *pCmdQ, kernel.get());
|
||||||
auto expectedSizeDSH = KernelCommandsHelper<FamilyType>::getSizeRequiredDSH(*kernel.get());
|
auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredDSH(*kernel.get());
|
||||||
auto expectedSizeIOH = KernelCommandsHelper<FamilyType>::getSizeRequiredIOH(*kernel.get());
|
auto expectedSizeIOH = HardwareCommandsHelper<FamilyType>::getSizeRequiredIOH(*kernel.get());
|
||||||
auto expectedSizeSSH = KernelCommandsHelper<FamilyType>::getSizeRequiredSSH(*kernel.get());
|
auto expectedSizeSSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredSSH(*kernel.get());
|
||||||
|
|
||||||
// Since each enqueue* may flush, we may see a MI_BATCH_BUFFER_END appended.
|
// Since each enqueue* may flush, we may see a MI_BATCH_BUFFER_END appended.
|
||||||
expectedSizeCS += sizeof(typename FamilyType::MI_BATCH_BUFFER_END);
|
expectedSizeCS += sizeof(typename FamilyType::MI_BATCH_BUFFER_END);
|
||||||
@@ -193,9 +193,9 @@ HWTEST_F(GetSizeRequiredImageTest, enqueueReadImageNonBlocking) {
|
|||||||
auto usedAfterSSH = ssh.getUsed();
|
auto usedAfterSSH = ssh.getUsed();
|
||||||
|
|
||||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_READ_IMAGE, false, false, *pCmdQ, kernel);
|
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_READ_IMAGE, false, false, *pCmdQ, kernel);
|
||||||
auto expectedSizeDSH = KernelCommandsHelper<FamilyType>::getSizeRequiredDSH(*kernel);
|
auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredDSH(*kernel);
|
||||||
auto expectedSizeIOH = KernelCommandsHelper<FamilyType>::getSizeRequiredIOH(*kernel);
|
auto expectedSizeIOH = HardwareCommandsHelper<FamilyType>::getSizeRequiredIOH(*kernel);
|
||||||
auto expectedSizeSSH = KernelCommandsHelper<FamilyType>::getSizeRequiredSSH(*kernel);
|
auto expectedSizeSSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredSSH(*kernel);
|
||||||
|
|
||||||
// Since each enqueue* may flush, we may see a MI_BATCH_BUFFER_END appended.
|
// Since each enqueue* may flush, we may see a MI_BATCH_BUFFER_END appended.
|
||||||
expectedSizeCS += sizeof(typename FamilyType::MI_BATCH_BUFFER_END);
|
expectedSizeCS += sizeof(typename FamilyType::MI_BATCH_BUFFER_END);
|
||||||
@@ -247,9 +247,9 @@ HWTEST_F(GetSizeRequiredImageTest, enqueueReadImageBlocking) {
|
|||||||
auto usedAfterSSH = ssh.getUsed();
|
auto usedAfterSSH = ssh.getUsed();
|
||||||
|
|
||||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_READ_IMAGE, false, false, *pCmdQ, kernel);
|
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_READ_IMAGE, false, false, *pCmdQ, kernel);
|
||||||
auto expectedSizeDSH = KernelCommandsHelper<FamilyType>::getSizeRequiredDSH(*kernel);
|
auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredDSH(*kernel);
|
||||||
auto expectedSizeIOH = KernelCommandsHelper<FamilyType>::getSizeRequiredIOH(*kernel);
|
auto expectedSizeIOH = HardwareCommandsHelper<FamilyType>::getSizeRequiredIOH(*kernel);
|
||||||
auto expectedSizeSSH = KernelCommandsHelper<FamilyType>::getSizeRequiredSSH(*kernel);
|
auto expectedSizeSSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredSSH(*kernel);
|
||||||
|
|
||||||
// Since each enqueue* may flush, we may see a MI_BATCH_BUFFER_END appended.
|
// Since each enqueue* may flush, we may see a MI_BATCH_BUFFER_END appended.
|
||||||
expectedSizeCS += sizeof(typename FamilyType::MI_BATCH_BUFFER_END);
|
expectedSizeCS += sizeof(typename FamilyType::MI_BATCH_BUFFER_END);
|
||||||
@@ -301,9 +301,9 @@ HWTEST_F(GetSizeRequiredImageTest, enqueueWriteImageNonBlocking) {
|
|||||||
auto usedAfterSSH = ssh.getUsed();
|
auto usedAfterSSH = ssh.getUsed();
|
||||||
|
|
||||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_WRITE_IMAGE, false, false, *pCmdQ, kernel);
|
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_WRITE_IMAGE, false, false, *pCmdQ, kernel);
|
||||||
auto expectedSizeDSH = KernelCommandsHelper<FamilyType>::getSizeRequiredDSH(*kernel);
|
auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredDSH(*kernel);
|
||||||
auto expectedSizeIOH = KernelCommandsHelper<FamilyType>::getSizeRequiredIOH(*kernel);
|
auto expectedSizeIOH = HardwareCommandsHelper<FamilyType>::getSizeRequiredIOH(*kernel);
|
||||||
auto expectedSizeSSH = KernelCommandsHelper<FamilyType>::getSizeRequiredSSH(*kernel);
|
auto expectedSizeSSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredSSH(*kernel);
|
||||||
|
|
||||||
// Since each enqueue* may flush, we may see a MI_BATCH_BUFFER_END appended.
|
// Since each enqueue* may flush, we may see a MI_BATCH_BUFFER_END appended.
|
||||||
expectedSizeCS += sizeof(typename FamilyType::MI_BATCH_BUFFER_END);
|
expectedSizeCS += sizeof(typename FamilyType::MI_BATCH_BUFFER_END);
|
||||||
@@ -355,9 +355,9 @@ HWTEST_F(GetSizeRequiredImageTest, enqueueWriteImageBlocking) {
|
|||||||
auto usedAfterSSH = ssh.getUsed();
|
auto usedAfterSSH = ssh.getUsed();
|
||||||
|
|
||||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_WRITE_IMAGE, false, false, *pCmdQ, kernel);
|
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_WRITE_IMAGE, false, false, *pCmdQ, kernel);
|
||||||
auto expectedSizeDSH = KernelCommandsHelper<FamilyType>::getSizeRequiredDSH(*kernel);
|
auto expectedSizeDSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredDSH(*kernel);
|
||||||
auto expectedSizeIOH = KernelCommandsHelper<FamilyType>::getSizeRequiredIOH(*kernel);
|
auto expectedSizeIOH = HardwareCommandsHelper<FamilyType>::getSizeRequiredIOH(*kernel);
|
||||||
auto expectedSizeSSH = KernelCommandsHelper<FamilyType>::getSizeRequiredSSH(*kernel);
|
auto expectedSizeSSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredSSH(*kernel);
|
||||||
|
|
||||||
// Since each enqueue* may flush, we may see a MI_BATCH_BUFFER_END appended.
|
// Since each enqueue* may flush, we may see a MI_BATCH_BUFFER_END appended.
|
||||||
expectedSizeCS += sizeof(typename FamilyType::MI_BATCH_BUFFER_END);
|
expectedSizeCS += sizeof(typename FamilyType::MI_BATCH_BUFFER_END);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/mem_obj/buffer.h"
|
#include "runtime/mem_obj/buffer.h"
|
||||||
#include "runtime/memory_manager/internal_allocation_storage.h"
|
#include "runtime/memory_manager/internal_allocation_storage.h"
|
||||||
#include "runtime/memory_manager/memory_manager.h"
|
#include "runtime/memory_manager/memory_manager.h"
|
||||||
@@ -1463,7 +1463,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenDcFlushArgumentIsTrueWhenCall
|
|||||||
LinearStream commandStream(buffer.get(), 128);
|
LinearStream commandStream(buffer.get(), 128);
|
||||||
|
|
||||||
PipeControlHelper<FamilyType>::addPipeControl(commandStream, true);
|
PipeControlHelper<FamilyType>::addPipeControl(commandStream, true);
|
||||||
auto pipeControlOffset = KernelCommandsHelper<FamilyType>::isPipeControlWArequired() ? sizeof(PIPE_CONTROL) : 0u;
|
auto pipeControlOffset = HardwareCommandsHelper<FamilyType>::isPipeControlWArequired() ? sizeof(PIPE_CONTROL) : 0u;
|
||||||
auto pipeControlAddress = buffer.get() + pipeControlOffset;
|
auto pipeControlAddress = buffer.get() + pipeControlOffset;
|
||||||
auto pipeControl = genCmdCast<PIPE_CONTROL *>(pipeControlAddress);
|
auto pipeControl = genCmdCast<PIPE_CONTROL *>(pipeControlAddress);
|
||||||
|
|
||||||
@@ -1477,7 +1477,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenDcFlushArgumentIsFalseWhenCal
|
|||||||
LinearStream commandStream(buffer.get(), 128);
|
LinearStream commandStream(buffer.get(), 128);
|
||||||
|
|
||||||
PipeControlHelper<FamilyType>::addPipeControl(commandStream, false);
|
PipeControlHelper<FamilyType>::addPipeControl(commandStream, false);
|
||||||
auto pipeControlOffset = KernelCommandsHelper<FamilyType>::isPipeControlWArequired() ? sizeof(PIPE_CONTROL) : 0u;
|
auto pipeControlOffset = HardwareCommandsHelper<FamilyType>::isPipeControlWArequired() ? sizeof(PIPE_CONTROL) : 0u;
|
||||||
auto pipeControlAddress = buffer.get() + pipeControlOffset;
|
auto pipeControlAddress = buffer.get() + pipeControlOffset;
|
||||||
auto pipeControl = genCmdCast<PIPE_CONTROL *>(pipeControlAddress);
|
auto pipeControl = genCmdCast<PIPE_CONTROL *>(pipeControlAddress);
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "runtime/command_queue/gpgpu_walker.h"
|
#include "runtime/command_queue/gpgpu_walker.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/options.h"
|
#include "runtime/helpers/options.h"
|
||||||
#include "runtime/utilities/tag_allocator.h"
|
#include "runtime/utilities/tag_allocator.h"
|
||||||
#include "unit_tests/fixtures/device_host_queue_fixture.h"
|
#include "unit_tests/fixtures/device_host_queue_fixture.h"
|
||||||
@@ -509,7 +509,7 @@ HWTEST_P(DeviceQueueHwWithKernel, setupIndirectState) {
|
|||||||
auto dsh = devQueueHw->getIndirectHeap(IndirectHeap::DYNAMIC_STATE);
|
auto dsh = devQueueHw->getIndirectHeap(IndirectHeap::DYNAMIC_STATE);
|
||||||
ASSERT_NE(nullptr, dsh);
|
ASSERT_NE(nullptr, dsh);
|
||||||
|
|
||||||
size_t surfaceStateHeapSize = KernelCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(const_cast<const Kernel &>(*pKernel));
|
size_t surfaceStateHeapSize = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(const_cast<const Kernel &>(*pKernel));
|
||||||
|
|
||||||
auto ssh = new IndirectHeap(alignedMalloc(surfaceStateHeapSize, MemoryConstants::pageSize), surfaceStateHeapSize);
|
auto ssh = new IndirectHeap(alignedMalloc(surfaceStateHeapSize, MemoryConstants::pageSize), surfaceStateHeapSize);
|
||||||
auto usedBeforeSSH = ssh->getUsed();
|
auto usedBeforeSSH = ssh->getUsed();
|
||||||
@@ -539,7 +539,7 @@ HWTEST_P(DeviceQueueHwWithKernel, setupIndirectStateSetsCorrectStartBlockID) {
|
|||||||
auto dsh = devQueueHw->getIndirectHeap(IndirectHeap::DYNAMIC_STATE);
|
auto dsh = devQueueHw->getIndirectHeap(IndirectHeap::DYNAMIC_STATE);
|
||||||
ASSERT_NE(nullptr, dsh);
|
ASSERT_NE(nullptr, dsh);
|
||||||
|
|
||||||
size_t surfaceStateHeapSize = KernelCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(const_cast<const Kernel &>(*pKernel));
|
size_t surfaceStateHeapSize = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(const_cast<const Kernel &>(*pKernel));
|
||||||
|
|
||||||
auto ssh = new IndirectHeap(alignedMalloc(surfaceStateHeapSize, MemoryConstants::pageSize), surfaceStateHeapSize);
|
auto ssh = new IndirectHeap(alignedMalloc(surfaceStateHeapSize, MemoryConstants::pageSize), surfaceStateHeapSize);
|
||||||
|
|
||||||
@@ -569,7 +569,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, DeviceQueueHwWithKernel, setupIndirectStateSetsCorre
|
|||||||
auto dsh = devQueueHw->getIndirectHeap(IndirectHeap::DYNAMIC_STATE);
|
auto dsh = devQueueHw->getIndirectHeap(IndirectHeap::DYNAMIC_STATE);
|
||||||
ASSERT_NE(nullptr, dsh);
|
ASSERT_NE(nullptr, dsh);
|
||||||
|
|
||||||
size_t surfaceStateHeapSize = KernelCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(const_cast<const Kernel &>(*pKernel));
|
size_t surfaceStateHeapSize = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(const_cast<const Kernel &>(*pKernel));
|
||||||
|
|
||||||
auto ssh = new IndirectHeap(alignedMalloc(surfaceStateHeapSize, MemoryConstants::pageSize), surfaceStateHeapSize);
|
auto ssh = new IndirectHeap(alignedMalloc(surfaceStateHeapSize, MemoryConstants::pageSize), surfaceStateHeapSize);
|
||||||
|
|
||||||
|
|||||||
@@ -142,8 +142,8 @@ HWTEST_P(ParentKernelDispatchTest, givenParentKernelWhenQueueIsNotBlockedThenSSH
|
|||||||
|
|
||||||
EXPECT_LE(pKernel->getKernelInfo().heapInfo.pKernelHeader->SurfaceStateHeapSize, ssh.getMaxAvailableSpace());
|
EXPECT_LE(pKernel->getKernelInfo().heapInfo.pKernelHeader->SurfaceStateHeapSize, ssh.getMaxAvailableSpace());
|
||||||
|
|
||||||
size_t minRequiredSize = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
size_t minRequiredSize = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
||||||
size_t minRequiredSizeForEM = KernelCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*pKernel);
|
size_t minRequiredSizeForEM = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*pKernel);
|
||||||
|
|
||||||
EXPECT_LE(minRequiredSize + minRequiredSizeForEM, ssh.getMaxAvailableSpace());
|
EXPECT_LE(minRequiredSize + minRequiredSizeForEM, ssh.getMaxAvailableSpace());
|
||||||
}
|
}
|
||||||
@@ -175,8 +175,8 @@ HWTEST_P(ParentKernelDispatchTest, givenParentKernelWhenQueueIsBlockedThenSSHSiz
|
|||||||
true);
|
true);
|
||||||
ASSERT_NE(nullptr, blockedCommandsData);
|
ASSERT_NE(nullptr, blockedCommandsData);
|
||||||
|
|
||||||
size_t minRequiredSize = KernelCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo) + UnitTestHelper<FamilyType>::getDefaultSshUsage();
|
size_t minRequiredSize = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo) + UnitTestHelper<FamilyType>::getDefaultSshUsage();
|
||||||
size_t minRequiredSizeForEM = KernelCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*pKernel);
|
size_t minRequiredSizeForEM = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*pKernel);
|
||||||
|
|
||||||
size_t sshUsed = blockedCommandsData->ssh->getUsed();
|
size_t sshUsed = blockedCommandsData->ssh->getUsed();
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ExecutionModelSchedulerFixture, dispatchScheduler) {
|
|||||||
|
|
||||||
EXPECT_NE(nullptr, executionModelDsh);
|
EXPECT_NE(nullptr, executionModelDsh);
|
||||||
|
|
||||||
size_t minRequiredSizeForSchedulerSSH = KernelCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
size_t minRequiredSizeForSchedulerSSH = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||||
// Setup heaps in pCmdQ
|
// Setup heaps in pCmdQ
|
||||||
LinearStream &commandStream = getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*pCmdQ, false, false, &scheduler);
|
LinearStream &commandStream = getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*pCmdQ, false, false, &scheduler);
|
||||||
pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, minRequiredSizeForSchedulerSSH);
|
pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, minRequiredSizeForSchedulerSSH);
|
||||||
@@ -171,7 +171,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ExecutionModelSchedulerFixture, dispatchSchedulerDoe
|
|||||||
DeviceQueueHw<FamilyType> *pDevQueueHw = castToObject<DeviceQueueHw<FamilyType>>(pDevQueue);
|
DeviceQueueHw<FamilyType> *pDevQueueHw = castToObject<DeviceQueueHw<FamilyType>>(pDevQueue);
|
||||||
SchedulerKernel &scheduler = pDevice->getExecutionEnvironment()->getBuiltIns()->getSchedulerKernel(*context);
|
SchedulerKernel &scheduler = pDevice->getExecutionEnvironment()->getBuiltIns()->getSchedulerKernel(*context);
|
||||||
|
|
||||||
size_t minRequiredSizeForSchedulerSSH = KernelCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
size_t minRequiredSizeForSchedulerSSH = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||||
// Setup heaps in pCmdQ
|
// Setup heaps in pCmdQ
|
||||||
getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*pCmdQ, false, false, &scheduler);
|
getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*pCmdQ, false, false, &scheduler);
|
||||||
pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, minRequiredSizeForSchedulerSSH);
|
pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, minRequiredSizeForSchedulerSSH);
|
||||||
@@ -204,7 +204,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, dispatchSchedulerWi
|
|||||||
|
|
||||||
SchedulerKernel &scheduler = device->getExecutionEnvironment()->getBuiltIns()->getSchedulerKernel(*context);
|
SchedulerKernel &scheduler = device->getExecutionEnvironment()->getBuiltIns()->getSchedulerKernel(*context);
|
||||||
|
|
||||||
size_t minRequiredSizeForSchedulerSSH = KernelCommandsHelper<FamilyType>::getSizeRequiredSSH(scheduler);
|
size_t minRequiredSizeForSchedulerSSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredSSH(scheduler);
|
||||||
// Setup heaps in pCmdQ
|
// Setup heaps in pCmdQ
|
||||||
LinearStream &commandStream = getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*pCmdQ, false, false, &scheduler);
|
LinearStream &commandStream = getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*pCmdQ, false, false, &scheduler);
|
||||||
pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, minRequiredSizeForSchedulerSSH);
|
pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, minRequiredSizeForSchedulerSSH);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#include "runtime/command_queue/gpgpu_walker.h"
|
#include "runtime/command_queue/gpgpu_walker.h"
|
||||||
#include "runtime/command_queue/hardware_interface.h"
|
#include "runtime/command_queue/hardware_interface.h"
|
||||||
#include "runtime/event/hw_timestamps.h"
|
#include "runtime/event/hw_timestamps.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/task_information.h"
|
#include "runtime/helpers/task_information.h"
|
||||||
#include "runtime/utilities/tag_allocator.h"
|
#include "runtime/utilities/tag_allocator.h"
|
||||||
#include "unit_tests/fixtures/execution_model_fixture.h"
|
#include "unit_tests/fixtures/execution_model_fixture.h"
|
||||||
@@ -94,7 +94,7 @@ HWTEST_F(ParentKernelCommandQueueFixture, givenLockedEMcritcalSectionWhenParentK
|
|||||||
|
|
||||||
dsh->getSpace(mockDevQueue.getDshOffset());
|
dsh->getSpace(mockDevQueue.getDshOffset());
|
||||||
|
|
||||||
size_t minSizeSSHForEM = KernelCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
size_t minSizeSSHForEM = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||||
|
|
||||||
auto cmdStreamAllocation = device->getMemoryManager()->allocateGraphicsMemoryWithProperties({4096, GraphicsAllocation::AllocationType::COMMAND_BUFFER});
|
auto cmdStreamAllocation = device->getMemoryManager()->allocateGraphicsMemoryWithProperties({4096, GraphicsAllocation::AllocationType::COMMAND_BUFFER});
|
||||||
KernelOperation *blockedCommandData = new KernelOperation(std::unique_ptr<LinearStream>(new LinearStream(cmdStreamAllocation)),
|
KernelOperation *blockedCommandData = new KernelOperation(std::unique_ptr<LinearStream>(new LinearStream(cmdStreamAllocation)),
|
||||||
@@ -163,7 +163,7 @@ HWTEST_F(ParentKernelCommandQueueFixture, givenParentKernelWhenCommandIsSubmitte
|
|||||||
std::unique_ptr<IndirectHeap>(ssh),
|
std::unique_ptr<IndirectHeap>(ssh),
|
||||||
*pCmdQ->getCommandStreamReceiver().getInternalAllocationStorage());
|
*pCmdQ->getCommandStreamReceiver().getInternalAllocationStorage());
|
||||||
|
|
||||||
size_t minSizeSSHForEM = KernelCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
size_t minSizeSSHForEM = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||||
|
|
||||||
blockedCommandData->surfaceStateHeapSizeEM = minSizeSSHForEM;
|
blockedCommandData->surfaceStateHeapSizeEM = minSizeSSHForEM;
|
||||||
PreemptionMode preemptionMode = device->getPreemptionMode();
|
PreemptionMode preemptionMode = device->getPreemptionMode();
|
||||||
@@ -206,7 +206,7 @@ HWTEST_F(ParentKernelCommandQueueFixture, givenParentKernelWhenCommandIsSubmitte
|
|||||||
std::unique_ptr<IndirectHeap>(ssh),
|
std::unique_ptr<IndirectHeap>(ssh),
|
||||||
*pCmdQ->getCommandStreamReceiver().getInternalAllocationStorage());
|
*pCmdQ->getCommandStreamReceiver().getInternalAllocationStorage());
|
||||||
|
|
||||||
size_t minSizeSSHForEM = KernelCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
size_t minSizeSSHForEM = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||||
|
|
||||||
blockedCommandData->surfaceStateHeapSizeEM = minSizeSSHForEM;
|
blockedCommandData->surfaceStateHeapSizeEM = minSizeSSHForEM;
|
||||||
PreemptionMode preemptionMode = device->getPreemptionMode();
|
PreemptionMode preemptionMode = device->getPreemptionMode();
|
||||||
@@ -246,7 +246,7 @@ HWTEST_F(ParentKernelCommandQueueFixture, givenBlockedParentKernelWithProfilingW
|
|||||||
std::unique_ptr<IndirectHeap>(ssh),
|
std::unique_ptr<IndirectHeap>(ssh),
|
||||||
*pCmdQ->getCommandStreamReceiver().getInternalAllocationStorage());
|
*pCmdQ->getCommandStreamReceiver().getInternalAllocationStorage());
|
||||||
|
|
||||||
size_t minSizeSSHForEM = KernelCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
size_t minSizeSSHForEM = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||||
|
|
||||||
blockedCommandData->surfaceStateHeapSizeEM = minSizeSSHForEM;
|
blockedCommandData->surfaceStateHeapSizeEM = minSizeSSHForEM;
|
||||||
PreemptionMode preemptionMode = device->getPreemptionMode();
|
PreemptionMode preemptionMode = device->getPreemptionMode();
|
||||||
@@ -289,7 +289,7 @@ HWTEST_F(ParentKernelCommandQueueFixture, givenParentKernelWhenCommandIsSubmitte
|
|||||||
std::unique_ptr<IndirectHeap>(ssh),
|
std::unique_ptr<IndirectHeap>(ssh),
|
||||||
*pCmdQ->getCommandStreamReceiver().getInternalAllocationStorage());
|
*pCmdQ->getCommandStreamReceiver().getInternalAllocationStorage());
|
||||||
|
|
||||||
size_t minSizeSSHForEM = KernelCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
size_t minSizeSSHForEM = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||||
|
|
||||||
blockedCommandData->surfaceStateHeapSizeEM = minSizeSSHForEM;
|
blockedCommandData->surfaceStateHeapSizeEM = minSizeSSHForEM;
|
||||||
PreemptionMode preemptionMode = device->getPreemptionMode();
|
PreemptionMode preemptionMode = device->getPreemptionMode();
|
||||||
@@ -315,7 +315,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenUsedCommandQue
|
|||||||
|
|
||||||
MockCommandQueue cmdQ(context, device, properties);
|
MockCommandQueue cmdQ(context, device, properties);
|
||||||
|
|
||||||
size_t minSizeSSHForEM = KernelCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
size_t minSizeSSHForEM = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||||
|
|
||||||
size_t heapSize = 20;
|
size_t heapSize = 20;
|
||||||
|
|
||||||
@@ -369,7 +369,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenNotUsedSSHWhen
|
|||||||
parentKernel->createReflectionSurface();
|
parentKernel->createReflectionSurface();
|
||||||
context->setDefaultDeviceQueue(&mockDevQueue);
|
context->setDefaultDeviceQueue(&mockDevQueue);
|
||||||
|
|
||||||
size_t minSizeSSHForEM = KernelCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
size_t minSizeSSHForEM = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||||
|
|
||||||
size_t heapSize = 20;
|
size_t heapSize = 20;
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
#include "unit_tests/fixtures/device_fixture.h"
|
#include "unit_tests/fixtures/device_fixture.h"
|
||||||
#include "unit_tests/mocks/mock_kernel.h"
|
#include "unit_tests/mocks/mock_kernel.h"
|
||||||
@@ -19,7 +19,7 @@ GEN11TEST_F(Gen11KernelTest, givenKernelWhenCanTransformImagesIsCalledThenReturn
|
|||||||
EXPECT_TRUE(retVal);
|
EXPECT_TRUE(retVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
using Gen11KernelCommandsTest = testing::Test;
|
using Gen11HardwareCommandsTest = testing::Test;
|
||||||
GEN11TEST_F(Gen11KernelCommandsTest, givenGen11PlatformWhenDoBindingTablePrefetchIsCalledThenReturnsFalse) {
|
GEN11TEST_F(Gen11HardwareCommandsTest, givenGen11PlatformWhenDoBindingTablePrefetchIsCalledThenReturnsFalse) {
|
||||||
EXPECT_FALSE(KernelCommandsHelper<FamilyType>::doBindingTablePrefetch());
|
EXPECT_FALSE(HardwareCommandsHelper<FamilyType>::doBindingTablePrefetch());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
#include "unit_tests/fixtures/device_fixture.h"
|
#include "unit_tests/fixtures/device_fixture.h"
|
||||||
#include "unit_tests/mocks/mock_kernel.h"
|
#include "unit_tests/mocks/mock_kernel.h"
|
||||||
@@ -18,7 +18,7 @@ GEN8TEST_F(Gen8KernelTest, givenKernelWhenCanTransformImagesIsCalledThenReturnsF
|
|||||||
auto retVal = mockKernel.mockKernel->Kernel::canTransformImages();
|
auto retVal = mockKernel.mockKernel->Kernel::canTransformImages();
|
||||||
EXPECT_FALSE(retVal);
|
EXPECT_FALSE(retVal);
|
||||||
}
|
}
|
||||||
using Gen8KernelCommandsTest = testing::Test;
|
using Gen8HardwareCommandsTest = testing::Test;
|
||||||
GEN8TEST_F(Gen8KernelCommandsTest, givenGen8PlatformWhenDoBindingTablePrefetchIsCalledThenReturnsTrue) {
|
GEN8TEST_F(Gen8HardwareCommandsTest, givenGen8PlatformWhenDoBindingTablePrefetchIsCalledThenReturnsTrue) {
|
||||||
EXPECT_TRUE(KernelCommandsHelper<FamilyType>::doBindingTablePrefetch());
|
EXPECT_TRUE(HardwareCommandsHelper<FamilyType>::doBindingTablePrefetch());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#include "runtime/command_queue/gpgpu_walker.h"
|
#include "runtime/command_queue/gpgpu_walker.h"
|
||||||
#include "runtime/device_queue/device_queue.h"
|
#include "runtime/device_queue/device_queue.h"
|
||||||
#include "runtime/device_queue/device_queue_hw.h"
|
#include "runtime/device_queue/device_queue_hw.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/scheduler/scheduler_kernel.h"
|
#include "runtime/scheduler/scheduler_kernel.h"
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
#include "unit_tests/fixtures/execution_model_fixture.h"
|
#include "unit_tests/fixtures/execution_model_fixture.h"
|
||||||
@@ -30,7 +30,7 @@ BDWTEST_F(BdwSchedulerTest, givenCallToDispatchSchedulerWhenPipeControlWithCSSta
|
|||||||
DeviceQueueHw<FamilyType> *pDevQueueHw = castToObject<DeviceQueueHw<FamilyType>>(pDevQueue);
|
DeviceQueueHw<FamilyType> *pDevQueueHw = castToObject<DeviceQueueHw<FamilyType>>(pDevQueue);
|
||||||
SchedulerKernel &scheduler = pDevice->getExecutionEnvironment()->getBuiltIns()->getSchedulerKernel(*context);
|
SchedulerKernel &scheduler = pDevice->getExecutionEnvironment()->getBuiltIns()->getSchedulerKernel(*context);
|
||||||
|
|
||||||
size_t minRequiredSizeForSchedulerSSH = KernelCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
size_t minRequiredSizeForSchedulerSSH = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||||
|
|
||||||
// Setup heaps in pCmdQ
|
// Setup heaps in pCmdQ
|
||||||
LinearStream &commandStream = getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*pCmdQ, false, false, &scheduler);
|
LinearStream &commandStream = getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*pCmdQ, false, false, &scheduler);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "runtime/gmm_helper/gmm_helper.h"
|
#include "runtime/gmm_helper/gmm_helper.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/mem_obj/buffer.h"
|
#include "runtime/mem_obj/buffer.h"
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
#include "unit_tests/fixtures/device_fixture.h"
|
#include "unit_tests/fixtures/device_fixture.h"
|
||||||
@@ -20,12 +20,12 @@ GEN9TEST_F(Gen9KernelTest, givenKernelWhenCanTransformImagesIsCalledThenReturnsT
|
|||||||
auto retVal = mockKernel.mockKernel->Kernel::canTransformImages();
|
auto retVal = mockKernel.mockKernel->Kernel::canTransformImages();
|
||||||
EXPECT_TRUE(retVal);
|
EXPECT_TRUE(retVal);
|
||||||
}
|
}
|
||||||
using Gen9KernelCommandsTest = testing::Test;
|
using Gen9HardwareCommandsTest = testing::Test;
|
||||||
GEN9TEST_F(Gen9KernelCommandsTest, givenGen9PlatformWhenDoBindingTablePrefetchIsCalledThenReturnsTrue) {
|
GEN9TEST_F(Gen9HardwareCommandsTest, givenGen9PlatformWhenDoBindingTablePrefetchIsCalledThenReturnsTrue) {
|
||||||
EXPECT_TRUE(KernelCommandsHelper<FamilyType>::doBindingTablePrefetch());
|
EXPECT_TRUE(HardwareCommandsHelper<FamilyType>::doBindingTablePrefetch());
|
||||||
}
|
}
|
||||||
|
|
||||||
GEN9TEST_F(Gen9KernelCommandsTest, givenBufferThatIsNotZeroCopyWhenSurfaceStateisSetThenL3IsTurnedOn) {
|
GEN9TEST_F(Gen9HardwareCommandsTest, givenBufferThatIsNotZeroCopyWhenSurfaceStateisSetThenL3IsTurnedOn) {
|
||||||
MockContext context;
|
MockContext context;
|
||||||
|
|
||||||
auto retVal = CL_SUCCESS;
|
auto retVal = CL_SUCCESS;
|
||||||
|
|||||||
@@ -26,14 +26,14 @@ set(IGDRCL_SRCS_tests_helpers
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/get_gpgpu_engines_tests.inl
|
${CMAKE_CURRENT_SOURCE_DIR}/get_gpgpu_engines_tests.inl
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/get_info_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/get_info_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/gtest_helpers.h
|
${CMAKE_CURRENT_SOURCE_DIR}/gtest_helpers.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/hardware_commands_helper_tests.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/hardware_commands_helper_tests.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hash_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/hash_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_default_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_default_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests.h
|
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_parse.h
|
${CMAKE_CURRENT_SOURCE_DIR}/hw_parse.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_parse.inl
|
${CMAKE_CURRENT_SOURCE_DIR}/hw_parse.inl
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/kernel_commands_tests.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/kernel_commands_tests.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/kernel_filename_helper.h
|
${CMAKE_CURRENT_SOURCE_DIR}/kernel_filename_helper.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/kmd_notify_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/kmd_notify_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/memory_management_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/memory_management_tests.cpp
|
||||||
|
|||||||
@@ -5,13 +5,13 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "unit_tests/helpers/kernel_commands_tests.h"
|
#include "unit_tests/helpers/hardware_commands_helper_tests.h"
|
||||||
|
|
||||||
#include "core/helpers/basic_math.h"
|
#include "core/helpers/basic_math.h"
|
||||||
#include "runtime/api/api.h"
|
#include "runtime/api/api.h"
|
||||||
#include "runtime/built_ins/builtins_dispatch_builder.h"
|
#include "runtime/built_ins/builtins_dispatch_builder.h"
|
||||||
#include "runtime/command_queue/command_queue_hw.h"
|
#include "runtime/command_queue/command_queue_hw.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/memory_manager/svm_memory_manager.h"
|
#include "runtime/memory_manager/svm_memory_manager.h"
|
||||||
#include "unit_tests/fixtures/execution_model_kernel_fixture.h"
|
#include "unit_tests/fixtures/execution_model_kernel_fixture.h"
|
||||||
#include "unit_tests/fixtures/hello_world_fixture.h"
|
#include "unit_tests/fixtures/hello_world_fixture.h"
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
using namespace NEO;
|
using namespace NEO;
|
||||||
|
|
||||||
void KernelCommandsTest::SetUp() {
|
void HardwareCommandsTest::SetUp() {
|
||||||
DeviceFixture::SetUp();
|
DeviceFixture::SetUp();
|
||||||
ASSERT_NE(nullptr, pDevice);
|
ASSERT_NE(nullptr, pDevice);
|
||||||
cl_device_id device = pDevice;
|
cl_device_id device = pDevice;
|
||||||
@@ -38,14 +38,14 @@ void KernelCommandsTest::SetUp() {
|
|||||||
mockKernelWithInternal = std::make_unique<MockKernelWithInternals>(*pDevice, pContext);
|
mockKernelWithInternal = std::make_unique<MockKernelWithInternals>(*pDevice, pContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KernelCommandsTest::TearDown() {
|
void HardwareCommandsTest::TearDown() {
|
||||||
mockKernelWithInternal.reset(nullptr);
|
mockKernelWithInternal.reset(nullptr);
|
||||||
BuiltInFixture::TearDown();
|
BuiltInFixture::TearDown();
|
||||||
ContextFixture::TearDown();
|
ContextFixture::TearDown();
|
||||||
DeviceFixture::TearDown();
|
DeviceFixture::TearDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
void KernelCommandsTest::addSpaceForSingleKernelArg() {
|
void HardwareCommandsTest::addSpaceForSingleKernelArg() {
|
||||||
kernelArguments.resize(1);
|
kernelArguments.resize(1);
|
||||||
kernelArguments[0] = kernelArgInfo;
|
kernelArguments[0] = kernelArgInfo;
|
||||||
mockKernelWithInternal->kernelInfo.resizeKernelArgInfoAndRegisterParameter(1);
|
mockKernelWithInternal->kernelInfo.resizeKernelArgInfoAndRegisterParameter(1);
|
||||||
@@ -57,7 +57,7 @@ void KernelCommandsTest::addSpaceForSingleKernelArg() {
|
|||||||
mockKernelWithInternal->mockKernel->kernelArgRequiresCacheFlush.resize(1);
|
mockKernelWithInternal->mockKernel->kernelArgRequiresCacheFlush.resize(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, programInterfaceDescriptorDataResourceUsage) {
|
HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, programInterfaceDescriptorDataResourceUsage) {
|
||||||
CommandQueueHw<FamilyType> cmdQ(pContext, pDevice, 0);
|
CommandQueueHw<FamilyType> cmdQ(pContext, pDevice, 0);
|
||||||
|
|
||||||
std::unique_ptr<Image> srcImage(Image2dHelper<>::create(pContext));
|
std::unique_ptr<Image> srcImage(Image2dHelper<>::create(pContext));
|
||||||
@@ -88,14 +88,14 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, programInterfaceDescriptorDataRe
|
|||||||
indirectHeap.getSpace(sizeof(INTERFACE_DESCRIPTOR_DATA));
|
indirectHeap.getSpace(sizeof(INTERFACE_DESCRIPTOR_DATA));
|
||||||
|
|
||||||
size_t crossThreadDataSize = kernel->getCrossThreadDataSize();
|
size_t crossThreadDataSize = kernel->getCrossThreadDataSize();
|
||||||
KernelCommandsHelper<FamilyType>::sendInterfaceDescriptorData(
|
HardwareCommandsHelper<FamilyType>::sendInterfaceDescriptorData(
|
||||||
indirectHeap, 0, 0, crossThreadDataSize, 64, 0, 0, 0, 1, 0 * KB, 0, false, pDevice->getPreemptionMode(), nullptr);
|
indirectHeap, 0, 0, crossThreadDataSize, 64, 0, 0, 0, 1, 0 * KB, 0, false, pDevice->getPreemptionMode(), nullptr);
|
||||||
|
|
||||||
auto usedIndirectHeapAfter = indirectHeap.getUsed();
|
auto usedIndirectHeapAfter = indirectHeap.getUsed();
|
||||||
EXPECT_EQ(sizeof(INTERFACE_DESCRIPTOR_DATA), usedIndirectHeapAfter - usedIndirectHeapBefore);
|
EXPECT_EQ(sizeof(INTERFACE_DESCRIPTOR_DATA), usedIndirectHeapAfter - usedIndirectHeapBefore);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, programMediaInterfaceDescriptorLoadResourceUsage) {
|
HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, programMediaInterfaceDescriptorLoadResourceUsage) {
|
||||||
CommandQueueHw<FamilyType> cmdQ(nullptr, pDevice, 0);
|
CommandQueueHw<FamilyType> cmdQ(nullptr, pDevice, 0);
|
||||||
|
|
||||||
typedef typename FamilyType::INTERFACE_DESCRIPTOR_DATA INTERFACE_DESCRIPTOR_DATA;
|
typedef typename FamilyType::INTERFACE_DESCRIPTOR_DATA INTERFACE_DESCRIPTOR_DATA;
|
||||||
@@ -105,15 +105,15 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, programMediaInterfaceDescriptorL
|
|||||||
auto &commandStream = cmdQ.getCS(1024);
|
auto &commandStream = cmdQ.getCS(1024);
|
||||||
auto usedBefore = commandStream.getUsed();
|
auto usedBefore = commandStream.getUsed();
|
||||||
|
|
||||||
KernelCommandsHelper<FamilyType>::sendMediaInterfaceDescriptorLoad(commandStream,
|
HardwareCommandsHelper<FamilyType>::sendMediaInterfaceDescriptorLoad(commandStream,
|
||||||
0,
|
0,
|
||||||
sizeof(INTERFACE_DESCRIPTOR_DATA));
|
sizeof(INTERFACE_DESCRIPTOR_DATA));
|
||||||
|
|
||||||
auto usedAfter = commandStream.getUsed();
|
auto usedAfter = commandStream.getUsed();
|
||||||
EXPECT_EQ(sizeof(MEDIA_INTERFACE_DESCRIPTOR_LOAD) + sizeof(MEDIA_STATE_FLUSH), usedAfter - usedBefore);
|
EXPECT_EQ(sizeof(MEDIA_INTERFACE_DESCRIPTOR_LOAD) + sizeof(MEDIA_STATE_FLUSH), usedAfter - usedBefore);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, programMediaStateFlushResourceUsage) {
|
HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, programMediaStateFlushResourceUsage) {
|
||||||
CommandQueueHw<FamilyType> cmdQ(nullptr, pDevice, 0);
|
CommandQueueHw<FamilyType> cmdQ(nullptr, pDevice, 0);
|
||||||
|
|
||||||
typedef typename FamilyType::INTERFACE_DESCRIPTOR_DATA INTERFACE_DESCRIPTOR_DATA;
|
typedef typename FamilyType::INTERFACE_DESCRIPTOR_DATA INTERFACE_DESCRIPTOR_DATA;
|
||||||
@@ -122,14 +122,14 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, programMediaStateFlushResourceUs
|
|||||||
auto &commandStream = cmdQ.getCS(1024);
|
auto &commandStream = cmdQ.getCS(1024);
|
||||||
auto usedBefore = commandStream.getUsed();
|
auto usedBefore = commandStream.getUsed();
|
||||||
|
|
||||||
KernelCommandsHelper<FamilyType>::sendMediaStateFlush(commandStream,
|
HardwareCommandsHelper<FamilyType>::sendMediaStateFlush(commandStream,
|
||||||
sizeof(INTERFACE_DESCRIPTOR_DATA));
|
sizeof(INTERFACE_DESCRIPTOR_DATA));
|
||||||
|
|
||||||
auto usedAfter = commandStream.getUsed();
|
auto usedAfter = commandStream.getUsed();
|
||||||
EXPECT_EQ(sizeof(MEDIA_STATE_FLUSH), usedAfter - usedBefore);
|
EXPECT_EQ(sizeof(MEDIA_STATE_FLUSH), usedAfter - usedBefore);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST_F(KernelCommandsTest, sendCrossThreadDataResourceUsage) {
|
HWTEST_F(HardwareCommandsTest, sendCrossThreadDataResourceUsage) {
|
||||||
CommandQueueHw<FamilyType> cmdQ(pContext, pDevice, 0);
|
CommandQueueHw<FamilyType> cmdQ(pContext, pDevice, 0);
|
||||||
|
|
||||||
std::unique_ptr<Image> srcImage(Image2dHelper<>::create(pContext));
|
std::unique_ptr<Image> srcImage(Image2dHelper<>::create(pContext));
|
||||||
@@ -157,7 +157,7 @@ HWTEST_F(KernelCommandsTest, sendCrossThreadDataResourceUsage) {
|
|||||||
auto &indirectHeap = cmdQ.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192);
|
auto &indirectHeap = cmdQ.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192);
|
||||||
auto usedBefore = indirectHeap.getUsed();
|
auto usedBefore = indirectHeap.getUsed();
|
||||||
auto sizeCrossThreadData = kernel->getCrossThreadDataSize();
|
auto sizeCrossThreadData = kernel->getCrossThreadDataSize();
|
||||||
KernelCommandsHelper<FamilyType>::sendCrossThreadData(
|
HardwareCommandsHelper<FamilyType>::sendCrossThreadData(
|
||||||
indirectHeap,
|
indirectHeap,
|
||||||
*kernel,
|
*kernel,
|
||||||
false,
|
false,
|
||||||
@@ -168,7 +168,7 @@ HWTEST_F(KernelCommandsTest, sendCrossThreadDataResourceUsage) {
|
|||||||
EXPECT_EQ(kernel->getCrossThreadDataSize(), usedAfter - usedBefore);
|
EXPECT_EQ(kernel->getCrossThreadDataSize(), usedAfter - usedBefore);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST_F(KernelCommandsTest, givenSendCrossThreadDataWhenWhenAddPatchInfoCommentsForAUBDumpIsNotSetThenAddPatchInfoDataOffsetsAreNotMoved) {
|
HWTEST_F(HardwareCommandsTest, givenSendCrossThreadDataWhenWhenAddPatchInfoCommentsForAUBDumpIsNotSetThenAddPatchInfoDataOffsetsAreNotMoved) {
|
||||||
CommandQueueHw<FamilyType> cmdQ(pContext, pDevice, 0);
|
CommandQueueHw<FamilyType> cmdQ(pContext, pDevice, 0);
|
||||||
|
|
||||||
MockContext context;
|
MockContext context;
|
||||||
@@ -183,7 +183,7 @@ HWTEST_F(KernelCommandsTest, givenSendCrossThreadDataWhenWhenAddPatchInfoComment
|
|||||||
PatchInfoData patchInfoData = {0xaaaaaaaa, 0, PatchInfoAllocationType::KernelArg, 0xbbbbbbbb, 0, PatchInfoAllocationType::IndirectObjectHeap};
|
PatchInfoData patchInfoData = {0xaaaaaaaa, 0, PatchInfoAllocationType::KernelArg, 0xbbbbbbbb, 0, PatchInfoAllocationType::IndirectObjectHeap};
|
||||||
kernel->getPatchInfoDataList().push_back(patchInfoData);
|
kernel->getPatchInfoDataList().push_back(patchInfoData);
|
||||||
auto sizeCrossThreadData = kernel->getCrossThreadDataSize();
|
auto sizeCrossThreadData = kernel->getCrossThreadDataSize();
|
||||||
KernelCommandsHelper<FamilyType>::sendCrossThreadData(
|
HardwareCommandsHelper<FamilyType>::sendCrossThreadData(
|
||||||
indirectHeap,
|
indirectHeap,
|
||||||
*kernel,
|
*kernel,
|
||||||
false,
|
false,
|
||||||
@@ -199,12 +199,12 @@ HWTEST_F(KernelCommandsTest, givenSendCrossThreadDataWhenWhenAddPatchInfoComment
|
|||||||
EXPECT_EQ(PatchInfoAllocationType::IndirectObjectHeap, kernel->getPatchInfoDataList()[0].targetType);
|
EXPECT_EQ(PatchInfoAllocationType::IndirectObjectHeap, kernel->getPatchInfoDataList()[0].targetType);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST_F(KernelCommandsTest, givenIndirectHeapNotAllocatedFromInternalPoolWhenSendCrossThreadDataIsCalledThenOffsetZeroIsReturned) {
|
HWTEST_F(HardwareCommandsTest, givenIndirectHeapNotAllocatedFromInternalPoolWhenSendCrossThreadDataIsCalledThenOffsetZeroIsReturned) {
|
||||||
auto nonInternalAllocation = pDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties(MockAllocationProperties{MemoryConstants::pageSize});
|
auto nonInternalAllocation = pDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties(MockAllocationProperties{MemoryConstants::pageSize});
|
||||||
IndirectHeap indirectHeap(nonInternalAllocation, false);
|
IndirectHeap indirectHeap(nonInternalAllocation, false);
|
||||||
|
|
||||||
auto sizeCrossThreadData = mockKernelWithInternal->mockKernel->getCrossThreadDataSize();
|
auto sizeCrossThreadData = mockKernelWithInternal->mockKernel->getCrossThreadDataSize();
|
||||||
auto offset = KernelCommandsHelper<FamilyType>::sendCrossThreadData(
|
auto offset = HardwareCommandsHelper<FamilyType>::sendCrossThreadData(
|
||||||
indirectHeap,
|
indirectHeap,
|
||||||
*mockKernelWithInternal->mockKernel,
|
*mockKernelWithInternal->mockKernel,
|
||||||
false,
|
false,
|
||||||
@@ -214,13 +214,13 @@ HWTEST_F(KernelCommandsTest, givenIndirectHeapNotAllocatedFromInternalPoolWhenSe
|
|||||||
pDevice->getMemoryManager()->freeGraphicsMemory(nonInternalAllocation);
|
pDevice->getMemoryManager()->freeGraphicsMemory(nonInternalAllocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST_F(KernelCommandsTest, givenIndirectHeapAllocatedFromInternalPoolWhenSendCrossThreadDataIsCalledThenHeapBaseOffsetIsReturned) {
|
HWTEST_F(HardwareCommandsTest, givenIndirectHeapAllocatedFromInternalPoolWhenSendCrossThreadDataIsCalledThenHeapBaseOffsetIsReturned) {
|
||||||
auto internalAllocation = pDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties(MockAllocationProperties(true, MemoryConstants::pageSize, GraphicsAllocation::AllocationType::INTERNAL_HEAP));
|
auto internalAllocation = pDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties(MockAllocationProperties(true, MemoryConstants::pageSize, GraphicsAllocation::AllocationType::INTERNAL_HEAP));
|
||||||
IndirectHeap indirectHeap(internalAllocation, true);
|
IndirectHeap indirectHeap(internalAllocation, true);
|
||||||
auto expectedOffset = internalAllocation->getGpuAddressToPatch();
|
auto expectedOffset = internalAllocation->getGpuAddressToPatch();
|
||||||
|
|
||||||
auto sizeCrossThreadData = mockKernelWithInternal->mockKernel->getCrossThreadDataSize();
|
auto sizeCrossThreadData = mockKernelWithInternal->mockKernel->getCrossThreadDataSize();
|
||||||
auto offset = KernelCommandsHelper<FamilyType>::sendCrossThreadData(
|
auto offset = HardwareCommandsHelper<FamilyType>::sendCrossThreadData(
|
||||||
indirectHeap,
|
indirectHeap,
|
||||||
*mockKernelWithInternal->mockKernel,
|
*mockKernelWithInternal->mockKernel,
|
||||||
false,
|
false,
|
||||||
@@ -231,7 +231,7 @@ HWTEST_F(KernelCommandsTest, givenIndirectHeapAllocatedFromInternalPoolWhenSendC
|
|||||||
pDevice->getMemoryManager()->freeGraphicsMemory(internalAllocation);
|
pDevice->getMemoryManager()->freeGraphicsMemory(internalAllocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST_F(KernelCommandsTest, givenSendCrossThreadDataWhenWhenAddPatchInfoCommentsForAUBDumpIsSetThenAddPatchInfoDataOffsetsAreMoved) {
|
HWTEST_F(HardwareCommandsTest, givenSendCrossThreadDataWhenWhenAddPatchInfoCommentsForAUBDumpIsSetThenAddPatchInfoDataOffsetsAreMoved) {
|
||||||
DebugManagerStateRestore dbgRestore;
|
DebugManagerStateRestore dbgRestore;
|
||||||
DebugManager.flags.AddPatchInfoCommentsForAUBDump.set(true);
|
DebugManager.flags.AddPatchInfoCommentsForAUBDump.set(true);
|
||||||
|
|
||||||
@@ -253,7 +253,7 @@ HWTEST_F(KernelCommandsTest, givenSendCrossThreadDataWhenWhenAddPatchInfoComment
|
|||||||
kernel->getPatchInfoDataList().push_back(patchInfoData1);
|
kernel->getPatchInfoDataList().push_back(patchInfoData1);
|
||||||
kernel->getPatchInfoDataList().push_back(patchInfoData2);
|
kernel->getPatchInfoDataList().push_back(patchInfoData2);
|
||||||
auto sizeCrossThreadData = kernel->getCrossThreadDataSize();
|
auto sizeCrossThreadData = kernel->getCrossThreadDataSize();
|
||||||
auto offsetCrossThreadData = KernelCommandsHelper<FamilyType>::sendCrossThreadData(
|
auto offsetCrossThreadData = HardwareCommandsHelper<FamilyType>::sendCrossThreadData(
|
||||||
indirectHeap,
|
indirectHeap,
|
||||||
*kernel,
|
*kernel,
|
||||||
false,
|
false,
|
||||||
@@ -274,7 +274,7 @@ HWTEST_F(KernelCommandsTest, givenSendCrossThreadDataWhenWhenAddPatchInfoComment
|
|||||||
EXPECT_EQ(PatchInfoAllocationType::IndirectObjectHeap, kernel->getPatchInfoDataList()[0].targetType);
|
EXPECT_EQ(PatchInfoAllocationType::IndirectObjectHeap, kernel->getPatchInfoDataList()[0].targetType);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, sendIndirectStateResourceUsage) {
|
HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, sendIndirectStateResourceUsage) {
|
||||||
using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA;
|
using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA;
|
||||||
using GPGPU_WALKER = typename FamilyType::GPGPU_WALKER;
|
using GPGPU_WALKER = typename FamilyType::GPGPU_WALKER;
|
||||||
|
|
||||||
@@ -317,16 +317,16 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, sendIndirectStateResourceUsage)
|
|||||||
auto usedBeforeIOH = ioh.getUsed();
|
auto usedBeforeIOH = ioh.getUsed();
|
||||||
auto usedBeforeSSH = ssh.getUsed();
|
auto usedBeforeSSH = ssh.getUsed();
|
||||||
|
|
||||||
dsh.align(KernelCommandsHelper<FamilyType>::alignInterfaceDescriptorData);
|
dsh.align(HardwareCommandsHelper<FamilyType>::alignInterfaceDescriptorData);
|
||||||
size_t IDToffset = dsh.getUsed();
|
size_t IDToffset = dsh.getUsed();
|
||||||
dsh.getSpace(sizeof(INTERFACE_DESCRIPTOR_DATA));
|
dsh.getSpace(sizeof(INTERFACE_DESCRIPTOR_DATA));
|
||||||
|
|
||||||
KernelCommandsHelper<FamilyType>::sendMediaInterfaceDescriptorLoad(
|
HardwareCommandsHelper<FamilyType>::sendMediaInterfaceDescriptorLoad(
|
||||||
commandStream,
|
commandStream,
|
||||||
IDToffset,
|
IDToffset,
|
||||||
sizeof(INTERFACE_DESCRIPTOR_DATA));
|
sizeof(INTERFACE_DESCRIPTOR_DATA));
|
||||||
uint32_t interfaceDescriptorIndex = 0;
|
uint32_t interfaceDescriptorIndex = 0;
|
||||||
KernelCommandsHelper<FamilyType>::sendIndirectState(
|
HardwareCommandsHelper<FamilyType>::sendIndirectState(
|
||||||
commandStream,
|
commandStream,
|
||||||
dsh,
|
dsh,
|
||||||
ioh,
|
ioh,
|
||||||
@@ -346,19 +346,19 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, sendIndirectStateResourceUsage)
|
|||||||
auto usedAfterDSH = dsh.getUsed();
|
auto usedAfterDSH = dsh.getUsed();
|
||||||
auto usedAfterIOH = ioh.getUsed();
|
auto usedAfterIOH = ioh.getUsed();
|
||||||
auto usedAfterSSH = ssh.getUsed();
|
auto usedAfterSSH = ssh.getUsed();
|
||||||
auto sizeRequiredDSH = KernelCommandsHelper<FamilyType>::getSizeRequiredDSH(*kernel);
|
auto sizeRequiredDSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredDSH(*kernel);
|
||||||
auto sizeRequiredIOH = KernelCommandsHelper<FamilyType>::getSizeRequiredIOH(*kernel, localWorkSize);
|
auto sizeRequiredIOH = HardwareCommandsHelper<FamilyType>::getSizeRequiredIOH(*kernel, localWorkSize);
|
||||||
auto sizeRequiredSSH = KernelCommandsHelper<FamilyType>::getSizeRequiredSSH(*kernel);
|
auto sizeRequiredSSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredSSH(*kernel);
|
||||||
|
|
||||||
EXPECT_GE(sizeRequiredDSH, usedAfterDSH - usedBeforeDSH);
|
EXPECT_GE(sizeRequiredDSH, usedAfterDSH - usedBeforeDSH);
|
||||||
EXPECT_GE(sizeRequiredIOH, usedAfterIOH - usedBeforeIOH);
|
EXPECT_GE(sizeRequiredIOH, usedAfterIOH - usedBeforeIOH);
|
||||||
EXPECT_GE(sizeRequiredSSH, usedAfterSSH - usedBeforeSSH);
|
EXPECT_GE(sizeRequiredSSH, usedAfterSSH - usedBeforeSSH);
|
||||||
|
|
||||||
auto usedAfterCS = commandStream.getUsed();
|
auto usedAfterCS = commandStream.getUsed();
|
||||||
EXPECT_GE(KernelCommandsHelper<FamilyType>::getSizeRequiredCS(kernel), usedAfterCS - usedBeforeCS);
|
EXPECT_GE(HardwareCommandsHelper<FamilyType>::getSizeRequiredCS(kernel), usedAfterCS - usedBeforeCS);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, givenKernelWithFourBindingTableEntriesWhenIndirectStateIsEmittedThenInterfaceDescriptorContainsCorrectBindingTableEntryCount) {
|
HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, givenKernelWithFourBindingTableEntriesWhenIndirectStateIsEmittedThenInterfaceDescriptorContainsCorrectBindingTableEntryCount) {
|
||||||
using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA;
|
using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA;
|
||||||
using GPGPU_WALKER = typename FamilyType::GPGPU_WALKER;
|
using GPGPU_WALKER = typename FamilyType::GPGPU_WALKER;
|
||||||
CommandQueueHw<FamilyType> cmdQ(pContext, pDevice, 0);
|
CommandQueueHw<FamilyType> cmdQ(pContext, pDevice, 0);
|
||||||
@@ -376,7 +376,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, givenKernelWithFourBindingTableE
|
|||||||
const size_t localWorkSize = 256;
|
const size_t localWorkSize = 256;
|
||||||
const size_t localWorkSizes[3]{localWorkSize, 1, 1};
|
const size_t localWorkSizes[3]{localWorkSize, 1, 1};
|
||||||
uint32_t interfaceDescriptorIndex = 0;
|
uint32_t interfaceDescriptorIndex = 0;
|
||||||
KernelCommandsHelper<FamilyType>::sendIndirectState(
|
HardwareCommandsHelper<FamilyType>::sendIndirectState(
|
||||||
commandStream,
|
commandStream,
|
||||||
dsh,
|
dsh,
|
||||||
ioh,
|
ioh,
|
||||||
@@ -392,14 +392,14 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, givenKernelWithFourBindingTableE
|
|||||||
true);
|
true);
|
||||||
|
|
||||||
auto interfaceDescriptor = reinterpret_cast<INTERFACE_DESCRIPTOR_DATA *>(dsh.getCpuBase());
|
auto interfaceDescriptor = reinterpret_cast<INTERFACE_DESCRIPTOR_DATA *>(dsh.getCpuBase());
|
||||||
if (KernelCommandsHelper<FamilyType>::doBindingTablePrefetch()) {
|
if (HardwareCommandsHelper<FamilyType>::doBindingTablePrefetch()) {
|
||||||
EXPECT_EQ(expectedBindingTableCount, interfaceDescriptor->getBindingTableEntryCount());
|
EXPECT_EQ(expectedBindingTableCount, interfaceDescriptor->getBindingTableEntryCount());
|
||||||
} else {
|
} else {
|
||||||
EXPECT_EQ(0u, interfaceDescriptor->getBindingTableEntryCount());
|
EXPECT_EQ(0u, interfaceDescriptor->getBindingTableEntryCount());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, givenKernelThatIsSchedulerWhenIndirectStateIsEmittedThenInterfaceDescriptorContainsZeroBindingTableEntryCount) {
|
HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, givenKernelThatIsSchedulerWhenIndirectStateIsEmittedThenInterfaceDescriptorContainsZeroBindingTableEntryCount) {
|
||||||
using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA;
|
using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA;
|
||||||
using GPGPU_WALKER = typename FamilyType::GPGPU_WALKER;
|
using GPGPU_WALKER = typename FamilyType::GPGPU_WALKER;
|
||||||
CommandQueueHw<FamilyType> cmdQ(pContext, pDevice, 0);
|
CommandQueueHw<FamilyType> cmdQ(pContext, pDevice, 0);
|
||||||
@@ -419,7 +419,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, givenKernelThatIsSchedulerWhenIn
|
|||||||
const size_t localWorkSize = 256;
|
const size_t localWorkSize = 256;
|
||||||
const size_t localWorkSizes[3]{localWorkSize, 1, 1};
|
const size_t localWorkSizes[3]{localWorkSize, 1, 1};
|
||||||
uint32_t interfaceDescriptorIndex = 0;
|
uint32_t interfaceDescriptorIndex = 0;
|
||||||
KernelCommandsHelper<FamilyType>::sendIndirectState(
|
HardwareCommandsHelper<FamilyType>::sendIndirectState(
|
||||||
commandStream,
|
commandStream,
|
||||||
dsh,
|
dsh,
|
||||||
ioh,
|
ioh,
|
||||||
@@ -438,7 +438,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, givenKernelThatIsSchedulerWhenIn
|
|||||||
EXPECT_EQ(0u, interfaceDescriptor->getBindingTableEntryCount());
|
EXPECT_EQ(0u, interfaceDescriptor->getBindingTableEntryCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, givenKernelWith100BindingTableEntriesWhenIndirectStateIsEmittedThenInterfaceDescriptorHas31BindingTableEntriesSet) {
|
HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, givenKernelWith100BindingTableEntriesWhenIndirectStateIsEmittedThenInterfaceDescriptorHas31BindingTableEntriesSet) {
|
||||||
using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA;
|
using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA;
|
||||||
using GPGPU_WALKER = typename FamilyType::GPGPU_WALKER;
|
using GPGPU_WALKER = typename FamilyType::GPGPU_WALKER;
|
||||||
CommandQueueHw<FamilyType> cmdQ(pContext, pDevice, 0);
|
CommandQueueHw<FamilyType> cmdQ(pContext, pDevice, 0);
|
||||||
@@ -456,7 +456,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, givenKernelWith100BindingTableEn
|
|||||||
const size_t localWorkSize = 256;
|
const size_t localWorkSize = 256;
|
||||||
const size_t localWorkSizes[3]{localWorkSize, 1, 1};
|
const size_t localWorkSizes[3]{localWorkSize, 1, 1};
|
||||||
uint32_t interfaceDescriptorIndex = 0;
|
uint32_t interfaceDescriptorIndex = 0;
|
||||||
KernelCommandsHelper<FamilyType>::sendIndirectState(
|
HardwareCommandsHelper<FamilyType>::sendIndirectState(
|
||||||
commandStream,
|
commandStream,
|
||||||
dsh,
|
dsh,
|
||||||
ioh,
|
ioh,
|
||||||
@@ -472,14 +472,14 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, givenKernelWith100BindingTableEn
|
|||||||
true);
|
true);
|
||||||
|
|
||||||
auto interfaceDescriptor = reinterpret_cast<INTERFACE_DESCRIPTOR_DATA *>(dsh.getCpuBase());
|
auto interfaceDescriptor = reinterpret_cast<INTERFACE_DESCRIPTOR_DATA *>(dsh.getCpuBase());
|
||||||
if (KernelCommandsHelper<FamilyType>::doBindingTablePrefetch()) {
|
if (HardwareCommandsHelper<FamilyType>::doBindingTablePrefetch()) {
|
||||||
EXPECT_EQ(31u, interfaceDescriptor->getBindingTableEntryCount());
|
EXPECT_EQ(31u, interfaceDescriptor->getBindingTableEntryCount());
|
||||||
} else {
|
} else {
|
||||||
EXPECT_EQ(0u, interfaceDescriptor->getBindingTableEntryCount());
|
EXPECT_EQ(0u, interfaceDescriptor->getBindingTableEntryCount());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, whenSendingIndirectStateThenKernelsWalkOrderIsTakenIntoAccount) {
|
HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, whenSendingIndirectStateThenKernelsWalkOrderIsTakenIntoAccount) {
|
||||||
using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA;
|
using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA;
|
||||||
using GPGPU_WALKER = typename FamilyType::GPGPU_WALKER;
|
using GPGPU_WALKER = typename FamilyType::GPGPU_WALKER;
|
||||||
|
|
||||||
@@ -514,7 +514,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, whenSendingIndirectStateThenKern
|
|||||||
auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 8192);
|
auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 8192);
|
||||||
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::SURFACE_STATE, 8192);
|
auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::SURFACE_STATE, 8192);
|
||||||
|
|
||||||
dsh.align(KernelCommandsHelper<FamilyType>::alignInterfaceDescriptorData);
|
dsh.align(HardwareCommandsHelper<FamilyType>::alignInterfaceDescriptorData);
|
||||||
size_t IDToffset = dsh.getUsed();
|
size_t IDToffset = dsh.getUsed();
|
||||||
dsh.getSpace(sizeof(INTERFACE_DESCRIPTOR_DATA));
|
dsh.getSpace(sizeof(INTERFACE_DESCRIPTOR_DATA));
|
||||||
|
|
||||||
@@ -528,7 +528,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, whenSendingIndirectStateThenKern
|
|||||||
modifiedKernelInfo.workgroupDimensionsOrder[2] = 0;
|
modifiedKernelInfo.workgroupDimensionsOrder[2] = 0;
|
||||||
MockKernel mockKernel{kernel->getProgram(), modifiedKernelInfo, kernel->getDevice(), false};
|
MockKernel mockKernel{kernel->getProgram(), modifiedKernelInfo, kernel->getDevice(), false};
|
||||||
uint32_t interfaceDescriptorIndex = 0;
|
uint32_t interfaceDescriptorIndex = 0;
|
||||||
KernelCommandsHelper<FamilyType>::sendIndirectState(
|
HardwareCommandsHelper<FamilyType>::sendIndirectState(
|
||||||
commandStream,
|
commandStream,
|
||||||
dsh,
|
dsh,
|
||||||
ioh,
|
ioh,
|
||||||
@@ -555,7 +555,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, whenSendingIndirectStateThenKern
|
|||||||
alignedFree(expectedLocalIds);
|
alignedFree(expectedLocalIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, usedBindingTableStatePointer) {
|
HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, usedBindingTableStatePointer) {
|
||||||
typedef typename FamilyType::BINDING_TABLE_STATE BINDING_TABLE_STATE;
|
typedef typename FamilyType::BINDING_TABLE_STATE BINDING_TABLE_STATE;
|
||||||
typedef typename FamilyType::RENDER_SURFACE_STATE RENDER_SURFACE_STATE;
|
typedef typename FamilyType::RENDER_SURFACE_STATE RENDER_SURFACE_STATE;
|
||||||
using GPGPU_WALKER = typename FamilyType::GPGPU_WALKER;
|
using GPGPU_WALKER = typename FamilyType::GPGPU_WALKER;
|
||||||
@@ -607,7 +607,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, usedBindingTableStatePointer) {
|
|||||||
// force statefull path for buffers
|
// force statefull path for buffers
|
||||||
const_cast<KernelInfo &>(kernelInfo).requiresSshForBuffers = true;
|
const_cast<KernelInfo &>(kernelInfo).requiresSshForBuffers = true;
|
||||||
uint32_t interfaceDescriptorIndex = 0;
|
uint32_t interfaceDescriptorIndex = 0;
|
||||||
KernelCommandsHelper<FamilyType>::sendIndirectState(
|
HardwareCommandsHelper<FamilyType>::sendIndirectState(
|
||||||
commandStream,
|
commandStream,
|
||||||
dsh,
|
dsh,
|
||||||
ioh,
|
ioh,
|
||||||
@@ -626,7 +626,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, usedBindingTableStatePointer) {
|
|||||||
EXPECT_EQ(0x00000040u, *(&bindingTableStatesPointers[1]));
|
EXPECT_EQ(0x00000040u, *(&bindingTableStatesPointers[1]));
|
||||||
}
|
}
|
||||||
|
|
||||||
HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, usedBindingTableStatePointersForGlobalAndConstantAndPrivateAndEventPoolAndDefaultCommandQueueSurfaces) {
|
HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, usedBindingTableStatePointersForGlobalAndConstantAndPrivateAndEventPoolAndDefaultCommandQueueSurfaces) {
|
||||||
using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA;
|
using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA;
|
||||||
using GPGPU_WALKER = typename FamilyType::GPGPU_WALKER;
|
using GPGPU_WALKER = typename FamilyType::GPGPU_WALKER;
|
||||||
|
|
||||||
@@ -767,7 +767,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, usedBindingTableStatePointersFor
|
|||||||
|
|
||||||
// push surfaces states and binding table to given ssh heap
|
// push surfaces states and binding table to given ssh heap
|
||||||
uint32_t interfaceDescriptorIndex = 0;
|
uint32_t interfaceDescriptorIndex = 0;
|
||||||
KernelCommandsHelper<FamilyType>::sendIndirectState(
|
HardwareCommandsHelper<FamilyType>::sendIndirectState(
|
||||||
commandStream,
|
commandStream,
|
||||||
dsh,
|
dsh,
|
||||||
ioh,
|
ioh,
|
||||||
@@ -799,7 +799,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, usedBindingTableStatePointersFor
|
|||||||
delete pKernel;
|
delete pKernel;
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST_F(KernelCommandsTest, setBindingTableStatesForKernelWithBuffersNotRequiringSSHDoesNotTouchSSH) {
|
HWTEST_F(HardwareCommandsTest, setBindingTableStatesForKernelWithBuffersNotRequiringSSHDoesNotTouchSSH) {
|
||||||
|
|
||||||
// define kernel info
|
// define kernel info
|
||||||
auto pKernelInfo = std::make_unique<KernelInfo>();
|
auto pKernelInfo = std::make_unique<KernelInfo>();
|
||||||
@@ -845,7 +845,7 @@ HWTEST_F(KernelCommandsTest, setBindingTableStatesForKernelWithBuffersNotRequiri
|
|||||||
EXPECT_EQ(0u, numSurfaceStates);
|
EXPECT_EQ(0u, numSurfaceStates);
|
||||||
|
|
||||||
// set binding table states
|
// set binding table states
|
||||||
auto dstBindingTablePointer = KernelCommandsHelper<FamilyType>::pushBindingTableAndSurfaceStates(ssh, *pKernel);
|
auto dstBindingTablePointer = HardwareCommandsHelper<FamilyType>::pushBindingTableAndSurfaceStates(ssh, *pKernel);
|
||||||
EXPECT_EQ(0u, dstBindingTablePointer);
|
EXPECT_EQ(0u, dstBindingTablePointer);
|
||||||
|
|
||||||
auto usedAfter = ssh.getUsed();
|
auto usedAfter = ssh.getUsed();
|
||||||
@@ -857,7 +857,7 @@ HWTEST_F(KernelCommandsTest, setBindingTableStatesForKernelWithBuffersNotRequiri
|
|||||||
delete pKernel;
|
delete pKernel;
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST_F(KernelCommandsTest, setBindingTableStatesForNoSurfaces) {
|
HWTEST_F(HardwareCommandsTest, setBindingTableStatesForNoSurfaces) {
|
||||||
|
|
||||||
// define kernel info
|
// define kernel info
|
||||||
auto pKernelInfo = std::make_unique<KernelInfo>();
|
auto pKernelInfo = std::make_unique<KernelInfo>();
|
||||||
@@ -890,10 +890,10 @@ HWTEST_F(KernelCommandsTest, setBindingTableStatesForNoSurfaces) {
|
|||||||
auto numSurfaceStates = pKernel->getNumberOfBindingTableStates();
|
auto numSurfaceStates = pKernel->getNumberOfBindingTableStates();
|
||||||
EXPECT_EQ(0u, numSurfaceStates);
|
EXPECT_EQ(0u, numSurfaceStates);
|
||||||
|
|
||||||
auto dstBindingTablePointer = KernelCommandsHelper<FamilyType>::pushBindingTableAndSurfaceStates(ssh, *pKernelInfo);
|
auto dstBindingTablePointer = HardwareCommandsHelper<FamilyType>::pushBindingTableAndSurfaceStates(ssh, *pKernelInfo);
|
||||||
EXPECT_EQ(0u, dstBindingTablePointer);
|
EXPECT_EQ(0u, dstBindingTablePointer);
|
||||||
|
|
||||||
dstBindingTablePointer = KernelCommandsHelper<FamilyType>::pushBindingTableAndSurfaceStates(ssh, *pKernel);
|
dstBindingTablePointer = HardwareCommandsHelper<FamilyType>::pushBindingTableAndSurfaceStates(ssh, *pKernel);
|
||||||
EXPECT_EQ(0u, dstBindingTablePointer);
|
EXPECT_EQ(0u, dstBindingTablePointer);
|
||||||
|
|
||||||
SPatchBindingTableState bindingTableState;
|
SPatchBindingTableState bindingTableState;
|
||||||
@@ -904,7 +904,7 @@ HWTEST_F(KernelCommandsTest, setBindingTableStatesForNoSurfaces) {
|
|||||||
bindingTableState.SurfaceStateOffset = 0;
|
bindingTableState.SurfaceStateOffset = 0;
|
||||||
pKernelInfo->patchInfo.bindingTableState = &bindingTableState;
|
pKernelInfo->patchInfo.bindingTableState = &bindingTableState;
|
||||||
|
|
||||||
dstBindingTablePointer = KernelCommandsHelper<FamilyType>::pushBindingTableAndSurfaceStates(ssh, *pKernel);
|
dstBindingTablePointer = HardwareCommandsHelper<FamilyType>::pushBindingTableAndSurfaceStates(ssh, *pKernel);
|
||||||
EXPECT_EQ(0u, dstBindingTablePointer);
|
EXPECT_EQ(0u, dstBindingTablePointer);
|
||||||
|
|
||||||
pKernelInfo->patchInfo.bindingTableState = nullptr;
|
pKernelInfo->patchInfo.bindingTableState = nullptr;
|
||||||
@@ -912,47 +912,47 @@ HWTEST_F(KernelCommandsTest, setBindingTableStatesForNoSurfaces) {
|
|||||||
delete pKernel;
|
delete pKernel;
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST_F(KernelCommandsTest, slmValueScenarios) {
|
HWTEST_F(HardwareCommandsTest, slmValueScenarios) {
|
||||||
if (::renderCoreFamily == IGFX_GEN8_CORE) {
|
if (::renderCoreFamily == IGFX_GEN8_CORE) {
|
||||||
EXPECT_EQ(0u, KernelCommandsHelper<FamilyType>::computeSlmValues(0));
|
EXPECT_EQ(0u, HardwareCommandsHelper<FamilyType>::computeSlmValues(0));
|
||||||
EXPECT_EQ(1u, KernelCommandsHelper<FamilyType>::computeSlmValues(1));
|
EXPECT_EQ(1u, HardwareCommandsHelper<FamilyType>::computeSlmValues(1));
|
||||||
EXPECT_EQ(1u, KernelCommandsHelper<FamilyType>::computeSlmValues(1024));
|
EXPECT_EQ(1u, HardwareCommandsHelper<FamilyType>::computeSlmValues(1024));
|
||||||
EXPECT_EQ(1u, KernelCommandsHelper<FamilyType>::computeSlmValues(1025));
|
EXPECT_EQ(1u, HardwareCommandsHelper<FamilyType>::computeSlmValues(1025));
|
||||||
EXPECT_EQ(1u, KernelCommandsHelper<FamilyType>::computeSlmValues(2048));
|
EXPECT_EQ(1u, HardwareCommandsHelper<FamilyType>::computeSlmValues(2048));
|
||||||
EXPECT_EQ(1u, KernelCommandsHelper<FamilyType>::computeSlmValues(2049));
|
EXPECT_EQ(1u, HardwareCommandsHelper<FamilyType>::computeSlmValues(2049));
|
||||||
EXPECT_EQ(1u, KernelCommandsHelper<FamilyType>::computeSlmValues(4096));
|
EXPECT_EQ(1u, HardwareCommandsHelper<FamilyType>::computeSlmValues(4096));
|
||||||
EXPECT_EQ(2u, KernelCommandsHelper<FamilyType>::computeSlmValues(4097));
|
EXPECT_EQ(2u, HardwareCommandsHelper<FamilyType>::computeSlmValues(4097));
|
||||||
EXPECT_EQ(2u, KernelCommandsHelper<FamilyType>::computeSlmValues(8192));
|
EXPECT_EQ(2u, HardwareCommandsHelper<FamilyType>::computeSlmValues(8192));
|
||||||
EXPECT_EQ(4u, KernelCommandsHelper<FamilyType>::computeSlmValues(8193));
|
EXPECT_EQ(4u, HardwareCommandsHelper<FamilyType>::computeSlmValues(8193));
|
||||||
EXPECT_EQ(4u, KernelCommandsHelper<FamilyType>::computeSlmValues(12288));
|
EXPECT_EQ(4u, HardwareCommandsHelper<FamilyType>::computeSlmValues(12288));
|
||||||
EXPECT_EQ(4u, KernelCommandsHelper<FamilyType>::computeSlmValues(16384));
|
EXPECT_EQ(4u, HardwareCommandsHelper<FamilyType>::computeSlmValues(16384));
|
||||||
EXPECT_EQ(8u, KernelCommandsHelper<FamilyType>::computeSlmValues(16385));
|
EXPECT_EQ(8u, HardwareCommandsHelper<FamilyType>::computeSlmValues(16385));
|
||||||
EXPECT_EQ(8u, KernelCommandsHelper<FamilyType>::computeSlmValues(24576));
|
EXPECT_EQ(8u, HardwareCommandsHelper<FamilyType>::computeSlmValues(24576));
|
||||||
EXPECT_EQ(8u, KernelCommandsHelper<FamilyType>::computeSlmValues(32768));
|
EXPECT_EQ(8u, HardwareCommandsHelper<FamilyType>::computeSlmValues(32768));
|
||||||
EXPECT_EQ(16u, KernelCommandsHelper<FamilyType>::computeSlmValues(32769));
|
EXPECT_EQ(16u, HardwareCommandsHelper<FamilyType>::computeSlmValues(32769));
|
||||||
EXPECT_EQ(16u, KernelCommandsHelper<FamilyType>::computeSlmValues(49152));
|
EXPECT_EQ(16u, HardwareCommandsHelper<FamilyType>::computeSlmValues(49152));
|
||||||
EXPECT_EQ(16u, KernelCommandsHelper<FamilyType>::computeSlmValues(65535));
|
EXPECT_EQ(16u, HardwareCommandsHelper<FamilyType>::computeSlmValues(65535));
|
||||||
EXPECT_EQ(16u, KernelCommandsHelper<FamilyType>::computeSlmValues(65536));
|
EXPECT_EQ(16u, HardwareCommandsHelper<FamilyType>::computeSlmValues(65536));
|
||||||
} else {
|
} else {
|
||||||
EXPECT_EQ(0u, KernelCommandsHelper<FamilyType>::computeSlmValues(0));
|
EXPECT_EQ(0u, HardwareCommandsHelper<FamilyType>::computeSlmValues(0));
|
||||||
EXPECT_EQ(1u, KernelCommandsHelper<FamilyType>::computeSlmValues(1));
|
EXPECT_EQ(1u, HardwareCommandsHelper<FamilyType>::computeSlmValues(1));
|
||||||
EXPECT_EQ(1u, KernelCommandsHelper<FamilyType>::computeSlmValues(1024));
|
EXPECT_EQ(1u, HardwareCommandsHelper<FamilyType>::computeSlmValues(1024));
|
||||||
EXPECT_EQ(2u, KernelCommandsHelper<FamilyType>::computeSlmValues(1025));
|
EXPECT_EQ(2u, HardwareCommandsHelper<FamilyType>::computeSlmValues(1025));
|
||||||
EXPECT_EQ(2u, KernelCommandsHelper<FamilyType>::computeSlmValues(2048));
|
EXPECT_EQ(2u, HardwareCommandsHelper<FamilyType>::computeSlmValues(2048));
|
||||||
EXPECT_EQ(3u, KernelCommandsHelper<FamilyType>::computeSlmValues(2049));
|
EXPECT_EQ(3u, HardwareCommandsHelper<FamilyType>::computeSlmValues(2049));
|
||||||
EXPECT_EQ(3u, KernelCommandsHelper<FamilyType>::computeSlmValues(4096));
|
EXPECT_EQ(3u, HardwareCommandsHelper<FamilyType>::computeSlmValues(4096));
|
||||||
EXPECT_EQ(4u, KernelCommandsHelper<FamilyType>::computeSlmValues(4097));
|
EXPECT_EQ(4u, HardwareCommandsHelper<FamilyType>::computeSlmValues(4097));
|
||||||
EXPECT_EQ(4u, KernelCommandsHelper<FamilyType>::computeSlmValues(8192));
|
EXPECT_EQ(4u, HardwareCommandsHelper<FamilyType>::computeSlmValues(8192));
|
||||||
EXPECT_EQ(5u, KernelCommandsHelper<FamilyType>::computeSlmValues(8193));
|
EXPECT_EQ(5u, HardwareCommandsHelper<FamilyType>::computeSlmValues(8193));
|
||||||
EXPECT_EQ(5u, KernelCommandsHelper<FamilyType>::computeSlmValues(16384));
|
EXPECT_EQ(5u, HardwareCommandsHelper<FamilyType>::computeSlmValues(16384));
|
||||||
EXPECT_EQ(6u, KernelCommandsHelper<FamilyType>::computeSlmValues(16385));
|
EXPECT_EQ(6u, HardwareCommandsHelper<FamilyType>::computeSlmValues(16385));
|
||||||
EXPECT_EQ(6u, KernelCommandsHelper<FamilyType>::computeSlmValues(32768));
|
EXPECT_EQ(6u, HardwareCommandsHelper<FamilyType>::computeSlmValues(32768));
|
||||||
EXPECT_EQ(7u, KernelCommandsHelper<FamilyType>::computeSlmValues(32769));
|
EXPECT_EQ(7u, HardwareCommandsHelper<FamilyType>::computeSlmValues(32769));
|
||||||
EXPECT_EQ(7u, KernelCommandsHelper<FamilyType>::computeSlmValues(65536));
|
EXPECT_EQ(7u, HardwareCommandsHelper<FamilyType>::computeSlmValues(65536));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, GivenKernelWithSamplersWhenIndirectStateIsProgrammedThenBorderColorIsCorrectlyCopiedToDshAndSamplerStatesAreProgrammedWithPointer) {
|
HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, GivenKernelWithSamplersWhenIndirectStateIsProgrammedThenBorderColorIsCorrectlyCopiedToDshAndSamplerStatesAreProgrammedWithPointer) {
|
||||||
typedef typename FamilyType::BINDING_TABLE_STATE BINDING_TABLE_STATE;
|
typedef typename FamilyType::BINDING_TABLE_STATE BINDING_TABLE_STATE;
|
||||||
typedef typename FamilyType::RENDER_SURFACE_STATE RENDER_SURFACE_STATE;
|
typedef typename FamilyType::RENDER_SURFACE_STATE RENDER_SURFACE_STATE;
|
||||||
typedef typename FamilyType::SAMPLER_STATE SAMPLER_STATE;
|
typedef typename FamilyType::SAMPLER_STATE SAMPLER_STATE;
|
||||||
@@ -1005,7 +1005,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, GivenKernelWithSamplersWhenIndir
|
|||||||
mockKernelWithInternal->mockKernel->setCrossThreadData(mockKernelWithInternal->crossThreadData, sizeof(mockKernelWithInternal->crossThreadData));
|
mockKernelWithInternal->mockKernel->setCrossThreadData(mockKernelWithInternal->crossThreadData, sizeof(mockKernelWithInternal->crossThreadData));
|
||||||
mockKernelWithInternal->mockKernel->setSshLocal(mockKernelWithInternal->sshLocal, sizeof(mockKernelWithInternal->sshLocal));
|
mockKernelWithInternal->mockKernel->setSshLocal(mockKernelWithInternal->sshLocal, sizeof(mockKernelWithInternal->sshLocal));
|
||||||
uint32_t interfaceDescriptorIndex = 0;
|
uint32_t interfaceDescriptorIndex = 0;
|
||||||
KernelCommandsHelper<FamilyType>::sendIndirectState(
|
HardwareCommandsHelper<FamilyType>::sendIndirectState(
|
||||||
commandStream,
|
commandStream,
|
||||||
dsh,
|
dsh,
|
||||||
ioh,
|
ioh,
|
||||||
@@ -1059,9 +1059,9 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, GivenKernelWithSamplersWhenIndir
|
|||||||
delete[] mockDsh;
|
delete[] mockDsh;
|
||||||
}
|
}
|
||||||
|
|
||||||
using KernelCommandsHelperTests = ::testing::Test;
|
using HardwareCommandsHelperTests = ::testing::Test;
|
||||||
|
|
||||||
HWTEST_F(KernelCommandsHelperTests, givenCompareAddressAndDataWhenProgrammingSemaphoreWaitThenSetupAllFields) {
|
HWTEST_F(HardwareCommandsHelperTests, givenCompareAddressAndDataWhenProgrammingSemaphoreWaitThenSetupAllFields) {
|
||||||
using MI_SEMAPHORE_WAIT = typename FamilyType::MI_SEMAPHORE_WAIT;
|
using MI_SEMAPHORE_WAIT = typename FamilyType::MI_SEMAPHORE_WAIT;
|
||||||
uint64_t compareAddress = 0x10000;
|
uint64_t compareAddress = 0x10000;
|
||||||
uint32_t compareData = 1234;
|
uint32_t compareData = 1234;
|
||||||
@@ -1075,12 +1075,12 @@ HWTEST_F(KernelCommandsHelperTests, givenCompareAddressAndDataWhenProgrammingSem
|
|||||||
referenceCommand.setSemaphoreGraphicsAddress(compareAddress);
|
referenceCommand.setSemaphoreGraphicsAddress(compareAddress);
|
||||||
referenceCommand.setWaitMode(MI_SEMAPHORE_WAIT::WAIT_MODE::WAIT_MODE_POLLING_MODE);
|
referenceCommand.setWaitMode(MI_SEMAPHORE_WAIT::WAIT_MODE::WAIT_MODE_POLLING_MODE);
|
||||||
|
|
||||||
KernelCommandsHelper<FamilyType>::programMiSemaphoreWait(cmdStream, compareAddress, compareData);
|
HardwareCommandsHelper<FamilyType>::programMiSemaphoreWait(cmdStream, compareAddress, compareData);
|
||||||
EXPECT_EQ(sizeof(MI_SEMAPHORE_WAIT), cmdStream.getUsed());
|
EXPECT_EQ(sizeof(MI_SEMAPHORE_WAIT), cmdStream.getUsed());
|
||||||
EXPECT_EQ(0, memcmp(&referenceCommand, buffer, sizeof(MI_SEMAPHORE_WAIT)));
|
EXPECT_EQ(0, memcmp(&referenceCommand, buffer, sizeof(MI_SEMAPHORE_WAIT)));
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST_F(KernelCommandsHelperTests, whenProgrammingMiAtomicThenSetupAllFields) {
|
HWTEST_F(HardwareCommandsHelperTests, whenProgrammingMiAtomicThenSetupAllFields) {
|
||||||
using MI_ATOMIC = typename FamilyType::MI_ATOMIC;
|
using MI_ATOMIC = typename FamilyType::MI_ATOMIC;
|
||||||
uint64_t writeAddress = 0x10000;
|
uint64_t writeAddress = 0x10000;
|
||||||
auto opcode = MI_ATOMIC::ATOMIC_OPCODES::ATOMIC_4B_DECREMENT;
|
auto opcode = MI_ATOMIC::ATOMIC_OPCODES::ATOMIC_4B_DECREMENT;
|
||||||
@@ -1095,7 +1095,7 @@ HWTEST_F(KernelCommandsHelperTests, whenProgrammingMiAtomicThenSetupAllFields) {
|
|||||||
referenceCommand.setMemoryAddress(static_cast<uint32_t>(writeAddress & 0x0000FFFFFFFFULL));
|
referenceCommand.setMemoryAddress(static_cast<uint32_t>(writeAddress & 0x0000FFFFFFFFULL));
|
||||||
referenceCommand.setMemoryAddressHigh(static_cast<uint32_t>(writeAddress >> 32));
|
referenceCommand.setMemoryAddressHigh(static_cast<uint32_t>(writeAddress >> 32));
|
||||||
|
|
||||||
auto miAtomic = KernelCommandsHelper<FamilyType>::programMiAtomic(cmdStream, writeAddress, opcode, dataSize);
|
auto miAtomic = HardwareCommandsHelper<FamilyType>::programMiAtomic(cmdStream, writeAddress, opcode, dataSize);
|
||||||
EXPECT_EQ(sizeof(MI_ATOMIC), cmdStream.getUsed());
|
EXPECT_EQ(sizeof(MI_ATOMIC), cmdStream.getUsed());
|
||||||
EXPECT_EQ(miAtomic, cmdStream.getCpuBase());
|
EXPECT_EQ(miAtomic, cmdStream.getCpuBase());
|
||||||
EXPECT_EQ(0, memcmp(&referenceCommand, miAtomic, sizeof(MI_ATOMIC)));
|
EXPECT_EQ(0, memcmp(&referenceCommand, miAtomic, sizeof(MI_ATOMIC)));
|
||||||
@@ -1136,7 +1136,7 @@ HWTEST_P(ParentKernelCommandsFromBinaryTest, getSizeRequiredForExecutionModelFor
|
|||||||
|
|
||||||
totalSize = alignUp(totalSize, BINDING_TABLE_STATE::SURFACESTATEPOINTER_ALIGN_SIZE);
|
totalSize = alignUp(totalSize, BINDING_TABLE_STATE::SURFACESTATEPOINTER_ALIGN_SIZE);
|
||||||
|
|
||||||
EXPECT_EQ(totalSize, KernelCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*pKernel));
|
EXPECT_EQ(totalSize, HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*pKernel));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1148,9 +1148,9 @@ HWTEST_P(ParentKernelCommandsFromBinaryTest, getSizeRequiredForExecutionModelFor
|
|||||||
|
|
||||||
BuiltIns &builtIns = *pDevice->getExecutionEnvironment()->getBuiltIns();
|
BuiltIns &builtIns = *pDevice->getExecutionEnvironment()->getBuiltIns();
|
||||||
auto &scheduler = builtIns.getSchedulerKernel(*pContext);
|
auto &scheduler = builtIns.getSchedulerKernel(*pContext);
|
||||||
size_t totalSize = KernelCommandsHelper<FamilyType>::getSizeRequiredIOH(scheduler);
|
size_t totalSize = HardwareCommandsHelper<FamilyType>::getSizeRequiredIOH(scheduler);
|
||||||
|
|
||||||
EXPECT_EQ(totalSize, KernelCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::INDIRECT_OBJECT>(*pKernel));
|
EXPECT_EQ(totalSize, HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::INDIRECT_OBJECT>(*pKernel));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1162,7 +1162,7 @@ HWTEST_P(ParentKernelCommandsFromBinaryTest, getSizeRequiredForExecutionModelFor
|
|||||||
|
|
||||||
size_t totalSize = 0;
|
size_t totalSize = 0;
|
||||||
|
|
||||||
EXPECT_EQ(totalSize, KernelCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::GENERAL_STATE>(*pKernel));
|
EXPECT_EQ(totalSize, HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::GENERAL_STATE>(*pKernel));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1175,7 +1175,7 @@ INSTANTIATE_TEST_CASE_P(ParentKernelCommandsFromBinaryTest,
|
|||||||
::testing::Values(binaryFile),
|
::testing::Values(binaryFile),
|
||||||
::testing::ValuesIn(KernelNames)));
|
::testing::ValuesIn(KernelNames)));
|
||||||
|
|
||||||
HWTEST_F(KernelCommandsTest, givenEnabledPassInlineDataWhenKernelAllowsInlineThenReturnTrue) {
|
HWTEST_F(HardwareCommandsTest, givenEnabledPassInlineDataWhenKernelAllowsInlineThenReturnTrue) {
|
||||||
DebugManagerStateRestore restore;
|
DebugManagerStateRestore restore;
|
||||||
DebugManager.flags.EnablePassInlineData.set(true);
|
DebugManager.flags.EnablePassInlineData.set(true);
|
||||||
|
|
||||||
@@ -1184,10 +1184,10 @@ HWTEST_F(KernelCommandsTest, givenEnabledPassInlineDataWhenKernelAllowsInlineThe
|
|||||||
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->PassInlineData = 1;
|
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->PassInlineData = 1;
|
||||||
mockKernelWithInternal->mockKernel->setCrossThreadData(crossThreadData, sizeof(crossThreadData));
|
mockKernelWithInternal->mockKernel->setCrossThreadData(crossThreadData, sizeof(crossThreadData));
|
||||||
|
|
||||||
EXPECT_TRUE(KernelCommandsHelper<FamilyType>::inlineDataProgrammingRequired(*mockKernelWithInternal->mockKernel));
|
EXPECT_TRUE(HardwareCommandsHelper<FamilyType>::inlineDataProgrammingRequired(*mockKernelWithInternal->mockKernel));
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST_F(KernelCommandsTest, givenEnabledPassInlineDataWhenKernelDisallowsInlineThenReturnFalse) {
|
HWTEST_F(HardwareCommandsTest, givenEnabledPassInlineDataWhenKernelDisallowsInlineThenReturnFalse) {
|
||||||
DebugManagerStateRestore restore;
|
DebugManagerStateRestore restore;
|
||||||
DebugManager.flags.EnablePassInlineData.set(true);
|
DebugManager.flags.EnablePassInlineData.set(true);
|
||||||
|
|
||||||
@@ -1196,42 +1196,42 @@ HWTEST_F(KernelCommandsTest, givenEnabledPassInlineDataWhenKernelDisallowsInline
|
|||||||
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->PassInlineData = 0;
|
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->PassInlineData = 0;
|
||||||
mockKernelWithInternal->mockKernel->setCrossThreadData(crossThreadData, sizeof(crossThreadData));
|
mockKernelWithInternal->mockKernel->setCrossThreadData(crossThreadData, sizeof(crossThreadData));
|
||||||
|
|
||||||
EXPECT_FALSE(KernelCommandsHelper<FamilyType>::inlineDataProgrammingRequired(*mockKernelWithInternal->mockKernel));
|
EXPECT_FALSE(HardwareCommandsHelper<FamilyType>::inlineDataProgrammingRequired(*mockKernelWithInternal->mockKernel));
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST_F(KernelCommandsTest, whenLocalIdxInXDimPresentThenExpectLocalIdsInUseIsTrue) {
|
HWTEST_F(HardwareCommandsTest, whenLocalIdxInXDimPresentThenExpectLocalIdsInUseIsTrue) {
|
||||||
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDXPresent = 1;
|
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDXPresent = 1;
|
||||||
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDYPresent = 0;
|
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDYPresent = 0;
|
||||||
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDZPresent = 0;
|
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDZPresent = 0;
|
||||||
|
|
||||||
EXPECT_TRUE(KernelCommandsHelper<FamilyType>::kernelUsesLocalIds(*mockKernelWithInternal->mockKernel));
|
EXPECT_TRUE(HardwareCommandsHelper<FamilyType>::kernelUsesLocalIds(*mockKernelWithInternal->mockKernel));
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST_F(KernelCommandsTest, whenLocalIdxInYDimPresentThenExpectLocalIdsInUseIsTrue) {
|
HWTEST_F(HardwareCommandsTest, whenLocalIdxInYDimPresentThenExpectLocalIdsInUseIsTrue) {
|
||||||
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDXPresent = 0;
|
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDXPresent = 0;
|
||||||
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDYPresent = 1;
|
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDYPresent = 1;
|
||||||
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDZPresent = 0;
|
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDZPresent = 0;
|
||||||
|
|
||||||
EXPECT_TRUE(KernelCommandsHelper<FamilyType>::kernelUsesLocalIds(*mockKernelWithInternal->mockKernel));
|
EXPECT_TRUE(HardwareCommandsHelper<FamilyType>::kernelUsesLocalIds(*mockKernelWithInternal->mockKernel));
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST_F(KernelCommandsTest, whenLocalIdxInZDimPresentThenExpectLocalIdsInUseIsTrue) {
|
HWTEST_F(HardwareCommandsTest, whenLocalIdxInZDimPresentThenExpectLocalIdsInUseIsTrue) {
|
||||||
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDXPresent = 0;
|
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDXPresent = 0;
|
||||||
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDYPresent = 0;
|
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDYPresent = 0;
|
||||||
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDZPresent = 1;
|
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDZPresent = 1;
|
||||||
|
|
||||||
EXPECT_TRUE(KernelCommandsHelper<FamilyType>::kernelUsesLocalIds(*mockKernelWithInternal->mockKernel));
|
EXPECT_TRUE(HardwareCommandsHelper<FamilyType>::kernelUsesLocalIds(*mockKernelWithInternal->mockKernel));
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST_F(KernelCommandsTest, whenLocalIdxAreNotPresentThenExpectLocalIdsInUseIsFalse) {
|
HWTEST_F(HardwareCommandsTest, whenLocalIdxAreNotPresentThenExpectLocalIdsInUseIsFalse) {
|
||||||
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDXPresent = 0;
|
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDXPresent = 0;
|
||||||
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDYPresent = 0;
|
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDYPresent = 0;
|
||||||
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDZPresent = 0;
|
const_cast<SPatchThreadPayload *>(mockKernelWithInternal->kernelInfo.patchInfo.threadPayload)->LocalIDZPresent = 0;
|
||||||
|
|
||||||
EXPECT_FALSE(KernelCommandsHelper<FamilyType>::kernelUsesLocalIds(*mockKernelWithInternal->mockKernel));
|
EXPECT_FALSE(HardwareCommandsHelper<FamilyType>::kernelUsesLocalIds(*mockKernelWithInternal->mockKernel));
|
||||||
}
|
}
|
||||||
|
|
||||||
HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, givenCacheFlushAfterWalkerEnabledWhenProgramGlobalSurfacePresentThenExpectCacheFlushCommand) {
|
HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, givenCacheFlushAfterWalkerEnabledWhenProgramGlobalSurfacePresentThenExpectCacheFlushCommand) {
|
||||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||||
using MEDIA_STATE_FLUSH = typename FamilyType::MEDIA_STATE_FLUSH;
|
using MEDIA_STATE_FLUSH = typename FamilyType::MEDIA_STATE_FLUSH;
|
||||||
using MEDIA_INTERFACE_DESCRIPTOR_LOAD = typename FamilyType::MEDIA_INTERFACE_DESCRIPTOR_LOAD;
|
using MEDIA_INTERFACE_DESCRIPTOR_LOAD = typename FamilyType::MEDIA_INTERFACE_DESCRIPTOR_LOAD;
|
||||||
@@ -1250,10 +1250,10 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, givenCacheFlushAfterWalkerEnable
|
|||||||
EXPECT_NE(allocs.end(), std::find(allocs.begin(), allocs.end(), &globalAllocation));
|
EXPECT_NE(allocs.end(), std::find(allocs.begin(), allocs.end(), &globalAllocation));
|
||||||
|
|
||||||
size_t expectedSize = sizeof(PIPE_CONTROL);
|
size_t expectedSize = sizeof(PIPE_CONTROL);
|
||||||
size_t actualSize = KernelCommandsHelper<FamilyType>::getSizeRequiredForCacheFlush(cmdQ, mockKernelWithInternal->mockKernel, 0U, 0U);
|
size_t actualSize = HardwareCommandsHelper<FamilyType>::getSizeRequiredForCacheFlush(cmdQ, mockKernelWithInternal->mockKernel, 0U, 0U);
|
||||||
EXPECT_EQ(expectedSize, actualSize);
|
EXPECT_EQ(expectedSize, actualSize);
|
||||||
|
|
||||||
KernelCommandsHelper<FamilyType>::programCacheFlushAfterWalkerCommand(&commandStream, cmdQ, mockKernelWithInternal->mockKernel, 0U, 0U);
|
HardwareCommandsHelper<FamilyType>::programCacheFlushAfterWalkerCommand(&commandStream, cmdQ, mockKernelWithInternal->mockKernel, 0U, 0U);
|
||||||
|
|
||||||
HardwareParse hwParse;
|
HardwareParse hwParse;
|
||||||
hwParse.parseCommands<FamilyType>(commandStream);
|
hwParse.parseCommands<FamilyType>(commandStream);
|
||||||
@@ -1265,7 +1265,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, givenCacheFlushAfterWalkerEnable
|
|||||||
mockKernelWithInternal->mockProgram->setGlobalSurface(nullptr);
|
mockKernelWithInternal->mockProgram->setGlobalSurface(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, givenCacheFlushAfterWalkerEnabledWhenSvmAllocationsSetAsCacheFlushRequiringThenExpectCacheFlushCommand) {
|
HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, givenCacheFlushAfterWalkerEnabledWhenSvmAllocationsSetAsCacheFlushRequiringThenExpectCacheFlushCommand) {
|
||||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||||
using MEDIA_STATE_FLUSH = typename FamilyType::MEDIA_STATE_FLUSH;
|
using MEDIA_STATE_FLUSH = typename FamilyType::MEDIA_STATE_FLUSH;
|
||||||
using MEDIA_INTERFACE_DESCRIPTOR_LOAD = typename FamilyType::MEDIA_INTERFACE_DESCRIPTOR_LOAD;
|
using MEDIA_INTERFACE_DESCRIPTOR_LOAD = typename FamilyType::MEDIA_INTERFACE_DESCRIPTOR_LOAD;
|
||||||
@@ -1290,10 +1290,10 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, givenCacheFlushAfterWalkerEnable
|
|||||||
EXPECT_EQ(allocs.end(), std::find(allocs.begin(), allocs.end(), &svmAllocation2));
|
EXPECT_EQ(allocs.end(), std::find(allocs.begin(), allocs.end(), &svmAllocation2));
|
||||||
|
|
||||||
size_t expectedSize = sizeof(PIPE_CONTROL);
|
size_t expectedSize = sizeof(PIPE_CONTROL);
|
||||||
size_t actualSize = KernelCommandsHelper<FamilyType>::getSizeRequiredForCacheFlush(cmdQ, mockKernelWithInternal->mockKernel, 0U, 0U);
|
size_t actualSize = HardwareCommandsHelper<FamilyType>::getSizeRequiredForCacheFlush(cmdQ, mockKernelWithInternal->mockKernel, 0U, 0U);
|
||||||
EXPECT_EQ(expectedSize, actualSize);
|
EXPECT_EQ(expectedSize, actualSize);
|
||||||
|
|
||||||
KernelCommandsHelper<FamilyType>::programCacheFlushAfterWalkerCommand(&commandStream, cmdQ, mockKernelWithInternal->mockKernel, 0U, 0U);
|
HardwareCommandsHelper<FamilyType>::programCacheFlushAfterWalkerCommand(&commandStream, cmdQ, mockKernelWithInternal->mockKernel, 0U, 0U);
|
||||||
|
|
||||||
HardwareParse hwParse;
|
HardwareParse hwParse;
|
||||||
hwParse.parseCommands<FamilyType>(commandStream);
|
hwParse.parseCommands<FamilyType>(commandStream);
|
||||||
@@ -1303,7 +1303,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, givenCacheFlushAfterWalkerEnable
|
|||||||
EXPECT_TRUE(pipeControl->getDcFlushEnable());
|
EXPECT_TRUE(pipeControl->getDcFlushEnable());
|
||||||
}
|
}
|
||||||
|
|
||||||
HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, givenCacheFlushAfterWalkerEnabledWhenKernelArgIsSetAsCacheFlushRequiredThenExpectCacheFlushCommand) {
|
HWCMDTEST_F(IGFX_GEN8_CORE, HardwareCommandsTest, givenCacheFlushAfterWalkerEnabledWhenKernelArgIsSetAsCacheFlushRequiredThenExpectCacheFlushCommand) {
|
||||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||||
using MEDIA_STATE_FLUSH = typename FamilyType::MEDIA_STATE_FLUSH;
|
using MEDIA_STATE_FLUSH = typename FamilyType::MEDIA_STATE_FLUSH;
|
||||||
using MEDIA_INTERFACE_DESCRIPTOR_LOAD = typename FamilyType::MEDIA_INTERFACE_DESCRIPTOR_LOAD;
|
using MEDIA_INTERFACE_DESCRIPTOR_LOAD = typename FamilyType::MEDIA_INTERFACE_DESCRIPTOR_LOAD;
|
||||||
@@ -1324,10 +1324,10 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, givenCacheFlushAfterWalkerEnable
|
|||||||
EXPECT_NE(allocs.end(), std::find(allocs.begin(), allocs.end(), &cacheRequiringAllocation));
|
EXPECT_NE(allocs.end(), std::find(allocs.begin(), allocs.end(), &cacheRequiringAllocation));
|
||||||
|
|
||||||
size_t expectedSize = sizeof(PIPE_CONTROL);
|
size_t expectedSize = sizeof(PIPE_CONTROL);
|
||||||
size_t actualSize = KernelCommandsHelper<FamilyType>::getSizeRequiredForCacheFlush(cmdQ, mockKernelWithInternal->mockKernel, 0U, 0U);
|
size_t actualSize = HardwareCommandsHelper<FamilyType>::getSizeRequiredForCacheFlush(cmdQ, mockKernelWithInternal->mockKernel, 0U, 0U);
|
||||||
EXPECT_EQ(expectedSize, actualSize);
|
EXPECT_EQ(expectedSize, actualSize);
|
||||||
|
|
||||||
KernelCommandsHelper<FamilyType>::programCacheFlushAfterWalkerCommand(&commandStream, cmdQ, mockKernelWithInternal->mockKernel, 0U, 0U);
|
HardwareCommandsHelper<FamilyType>::programCacheFlushAfterWalkerCommand(&commandStream, cmdQ, mockKernelWithInternal->mockKernel, 0U, 0U);
|
||||||
|
|
||||||
HardwareParse hwParse;
|
HardwareParse hwParse;
|
||||||
hwParse.parseCommands<FamilyType>(commandStream);
|
hwParse.parseCommands<FamilyType>(commandStream);
|
||||||
@@ -1336,7 +1336,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, KernelCommandsTest, givenCacheFlushAfterWalkerEnable
|
|||||||
EXPECT_TRUE(pipeControl->getCommandStreamerStallEnable());
|
EXPECT_TRUE(pipeControl->getCommandStreamerStallEnable());
|
||||||
EXPECT_TRUE(pipeControl->getDcFlushEnable());
|
EXPECT_TRUE(pipeControl->getDcFlushEnable());
|
||||||
}
|
}
|
||||||
HWTEST_F(KernelCommandsTest, givenCacheFlushAfterWalkerDisabledWhenGettingRequiredCacheFlushSizeThenReturnZero) {
|
HWTEST_F(HardwareCommandsTest, givenCacheFlushAfterWalkerDisabledWhenGettingRequiredCacheFlushSizeThenReturnZero) {
|
||||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||||
|
|
||||||
DebugManagerStateRestore dbgRestore;
|
DebugManagerStateRestore dbgRestore;
|
||||||
@@ -1345,11 +1345,11 @@ HWTEST_F(KernelCommandsTest, givenCacheFlushAfterWalkerDisabledWhenGettingRequir
|
|||||||
CommandQueueHw<FamilyType> cmdQ(nullptr, pDevice, 0);
|
CommandQueueHw<FamilyType> cmdQ(nullptr, pDevice, 0);
|
||||||
|
|
||||||
size_t expectedSize = 0U;
|
size_t expectedSize = 0U;
|
||||||
size_t actualSize = KernelCommandsHelper<FamilyType>::getSizeRequiredForCacheFlush(cmdQ, mockKernelWithInternal->mockKernel, 0U, 0U);
|
size_t actualSize = HardwareCommandsHelper<FamilyType>::getSizeRequiredForCacheFlush(cmdQ, mockKernelWithInternal->mockKernel, 0U, 0U);
|
||||||
EXPECT_EQ(expectedSize, actualSize);
|
EXPECT_EQ(expectedSize, actualSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(KernelCommandsTest, givenCacheFlushAfterWalkerEnabledWhenPlatformNotSupportFlushThenExpectNoCacheAllocationForFlush) {
|
TEST_F(HardwareCommandsTest, givenCacheFlushAfterWalkerEnabledWhenPlatformNotSupportFlushThenExpectNoCacheAllocationForFlush) {
|
||||||
DebugManagerStateRestore dbgRestore;
|
DebugManagerStateRestore dbgRestore;
|
||||||
DebugManager.flags.EnableCacheFlushAfterWalker.set(-1);
|
DebugManager.flags.EnableCacheFlushAfterWalker.set(-1);
|
||||||
hardwareInfo.capabilityTable.supportCacheFlushAfterWalker = false;
|
hardwareInfo.capabilityTable.supportCacheFlushAfterWalker = false;
|
||||||
@@ -1359,7 +1359,7 @@ TEST_F(KernelCommandsTest, givenCacheFlushAfterWalkerEnabledWhenPlatformNotSuppo
|
|||||||
EXPECT_EQ(0U, allocationsForCacheFlush.size());
|
EXPECT_EQ(0U, allocationsForCacheFlush.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST_F(KernelCommandsTest, givenImmDataWriteWhenProgrammingMiFlushDwThenSetAllRequiredFields) {
|
HWTEST_F(HardwareCommandsTest, givenImmDataWriteWhenProgrammingMiFlushDwThenSetAllRequiredFields) {
|
||||||
using MI_FLUSH_DW = typename FamilyType::MI_FLUSH_DW;
|
using MI_FLUSH_DW = typename FamilyType::MI_FLUSH_DW;
|
||||||
uint8_t buffer[2 * sizeof(MI_FLUSH_DW)] = {};
|
uint8_t buffer[2 * sizeof(MI_FLUSH_DW)] = {};
|
||||||
LinearStream linearStream(buffer, sizeof(buffer));
|
LinearStream linearStream(buffer, sizeof(buffer));
|
||||||
@@ -1367,7 +1367,7 @@ HWTEST_F(KernelCommandsTest, givenImmDataWriteWhenProgrammingMiFlushDwThenSetAll
|
|||||||
uint64_t gpuAddress = 0x1230000;
|
uint64_t gpuAddress = 0x1230000;
|
||||||
uint64_t immData = 456;
|
uint64_t immData = 456;
|
||||||
|
|
||||||
KernelCommandsHelper<FamilyType>::programMiFlushDw(linearStream, gpuAddress, immData);
|
HardwareCommandsHelper<FamilyType>::programMiFlushDw(linearStream, gpuAddress, immData);
|
||||||
auto miFlushDwCmd = reinterpret_cast<MI_FLUSH_DW *>(buffer);
|
auto miFlushDwCmd = reinterpret_cast<MI_FLUSH_DW *>(buffer);
|
||||||
|
|
||||||
EXPECT_EQ(sizeof(MI_FLUSH_DW), linearStream.getUsed());
|
EXPECT_EQ(sizeof(MI_FLUSH_DW), linearStream.getUsed());
|
||||||
@@ -20,10 +20,10 @@
|
|||||||
|
|
||||||
using namespace NEO;
|
using namespace NEO;
|
||||||
|
|
||||||
struct KernelCommandsTest : DeviceFixture,
|
struct HardwareCommandsTest : DeviceFixture,
|
||||||
ContextFixture,
|
ContextFixture,
|
||||||
BuiltInFixture,
|
BuiltInFixture,
|
||||||
::testing::Test {
|
::testing::Test {
|
||||||
|
|
||||||
using BuiltInFixture::SetUp;
|
using BuiltInFixture::SetUp;
|
||||||
using ContextFixture::SetUp;
|
using ContextFixture::SetUp;
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "runtime/command_queue/command_queue_hw.h"
|
#include "runtime/command_queue/command_queue_hw.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/kernel/kernel.h"
|
#include "runtime/kernel/kernel.h"
|
||||||
#include "runtime/program/kernel_info.h"
|
#include "runtime/program/kernel_info.h"
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
@@ -85,7 +85,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, KernelSLMAndBarrierTest, test_SLMProgramming) {
|
|||||||
|
|
||||||
uint64_t interfaceDescriptorOffset = indirectHeap.getUsed();
|
uint64_t interfaceDescriptorOffset = indirectHeap.getUsed();
|
||||||
|
|
||||||
size_t offsetInterfaceDescriptorData = KernelCommandsHelper<FamilyType>::sendInterfaceDescriptorData(
|
size_t offsetInterfaceDescriptorData = HardwareCommandsHelper<FamilyType>::sendInterfaceDescriptorData(
|
||||||
indirectHeap,
|
indirectHeap,
|
||||||
interfaceDescriptorOffset,
|
interfaceDescriptorOffset,
|
||||||
0,
|
0,
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include "runtime/event/event.h"
|
#include "runtime/event/event.h"
|
||||||
#include "runtime/helpers/cache_policy.h"
|
#include "runtime/helpers/cache_policy.h"
|
||||||
#include "runtime/helpers/dispatch_info.h"
|
#include "runtime/helpers/dispatch_info.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/mem_obj/image.h"
|
#include "runtime/mem_obj/image.h"
|
||||||
#include "runtime/mem_obj/mem_obj_helper.h"
|
#include "runtime/mem_obj/mem_obj_helper.h"
|
||||||
#include "runtime/memory_manager/internal_allocation_storage.h"
|
#include "runtime/memory_manager/internal_allocation_storage.h"
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ProfilingTests, GIVENCommandQueueWithProfilingAndFor
|
|||||||
|
|
||||||
MockKernel kernel(program.get(), kernelInfo, *pDevice);
|
MockKernel kernel(program.get(), kernelInfo, *pDevice);
|
||||||
|
|
||||||
uint64_t requiredSize = 2 * sizeof(PIPE_CONTROL) + 2 * sizeof(MI_STORE_REGISTER_MEM) + sizeof(GPGPU_WALKER) + KernelCommandsHelper<FamilyType>::getSizeRequiredCS(&kernel);
|
uint64_t requiredSize = 2 * sizeof(PIPE_CONTROL) + 2 * sizeof(MI_STORE_REGISTER_MEM) + sizeof(GPGPU_WALKER) + HardwareCommandsHelper<FamilyType>::getSizeRequiredCS(&kernel);
|
||||||
|
|
||||||
auto &commandStreamNDRangeKernel = getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*pCmdQ, true, false, &kernel);
|
auto &commandStreamNDRangeKernel = getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*pCmdQ, true, false, &kernel);
|
||||||
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, true, false, *pCmdQ, &kernel);
|
auto expectedSizeCS = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, true, false, *pCmdQ, &kernel);
|
||||||
@@ -120,7 +120,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ProfilingTests, GIVENCommandQueueWithProfilingAndFor
|
|||||||
|
|
||||||
MockKernel kernel(program.get(), kernelInfo, *pDevice);
|
MockKernel kernel(program.get(), kernelInfo, *pDevice);
|
||||||
|
|
||||||
uint64_t requiredSize = 2 * sizeof(PIPE_CONTROL) + 4 * sizeof(MI_STORE_REGISTER_MEM) + KernelCommandsHelper<FamilyType>::getSizeRequiredCS(&kernel);
|
uint64_t requiredSize = 2 * sizeof(PIPE_CONTROL) + 4 * sizeof(MI_STORE_REGISTER_MEM) + HardwareCommandsHelper<FamilyType>::getSizeRequiredCS(&kernel);
|
||||||
requiredSize += 2 * sizeof(GPGPU_WALKER);
|
requiredSize += 2 * sizeof(GPGPU_WALKER);
|
||||||
|
|
||||||
DispatchInfo dispatchInfo;
|
DispatchInfo dispatchInfo;
|
||||||
@@ -550,7 +550,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ProfilingWithPerfCountersTests, GIVENCommandQueueWit
|
|||||||
|
|
||||||
MockKernel kernel(program.get(), kernelInfo, *pDevice);
|
MockKernel kernel(program.get(), kernelInfo, *pDevice);
|
||||||
|
|
||||||
uint64_t requiredSize = 2 * sizeof(PIPE_CONTROL) + 4 * sizeof(MI_STORE_REGISTER_MEM) + sizeof(GPGPU_WALKER) + KernelCommandsHelper<FamilyType>::getSizeRequiredCS(&kernel);
|
uint64_t requiredSize = 2 * sizeof(PIPE_CONTROL) + 4 * sizeof(MI_STORE_REGISTER_MEM) + sizeof(GPGPU_WALKER) + HardwareCommandsHelper<FamilyType>::getSizeRequiredCS(&kernel);
|
||||||
//begin perf cmds
|
//begin perf cmds
|
||||||
requiredSize += 2 * sizeof(PIPE_CONTROL) + 2 * sizeof(MI_STORE_REGISTER_MEM) + NEO::INSTR_GENERAL_PURPOSE_COUNTERS_COUNT * sizeof(MI_STORE_REGISTER_MEM) + sizeof(MI_REPORT_PERF_COUNT) + pCmdQ->getPerfCountersUserRegistersNumber() * sizeof(MI_STORE_REGISTER_MEM);
|
requiredSize += 2 * sizeof(PIPE_CONTROL) + 2 * sizeof(MI_STORE_REGISTER_MEM) + NEO::INSTR_GENERAL_PURPOSE_COUNTERS_COUNT * sizeof(MI_STORE_REGISTER_MEM) + sizeof(MI_REPORT_PERF_COUNT) + pCmdQ->getPerfCountersUserRegistersNumber() * sizeof(MI_STORE_REGISTER_MEM);
|
||||||
//end perf cmds
|
//end perf cmds
|
||||||
@@ -605,7 +605,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ProfilingWithPerfCountersTests, GIVENCommandQueueWit
|
|||||||
|
|
||||||
pCmdQ->setPerfCountersEnabled(true, 1);
|
pCmdQ->setPerfCountersEnabled(true, 1);
|
||||||
|
|
||||||
uint64_t requiredSize = 2 * sizeof(PIPE_CONTROL) + 4 * sizeof(MI_STORE_REGISTER_MEM) + KernelCommandsHelper<FamilyType>::getSizeRequiredCS(&kernel);
|
uint64_t requiredSize = 2 * sizeof(PIPE_CONTROL) + 4 * sizeof(MI_STORE_REGISTER_MEM) + HardwareCommandsHelper<FamilyType>::getSizeRequiredCS(&kernel);
|
||||||
requiredSize += 2 * sizeof(GPGPU_WALKER);
|
requiredSize += 2 * sizeof(GPGPU_WALKER);
|
||||||
|
|
||||||
//begin perf cmds
|
//begin perf cmds
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
#include "core/helpers/ptr_math.h"
|
#include "core/helpers/ptr_math.h"
|
||||||
#include "runtime/command_stream/command_stream_receiver_hw.h"
|
#include "runtime/command_stream/command_stream_receiver_hw.h"
|
||||||
#include "runtime/helpers/aligned_memory.h"
|
#include "runtime/helpers/aligned_memory.h"
|
||||||
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/hash.h"
|
#include "runtime/helpers/hash.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
|
||||||
#include "runtime/indirect_heap/indirect_heap.h"
|
#include "runtime/indirect_heap/indirect_heap.h"
|
||||||
#include "runtime/kernel/kernel.h"
|
#include "runtime/kernel/kernel.h"
|
||||||
#include "runtime/memory_manager/graphics_allocation.h"
|
#include "runtime/memory_manager/graphics_allocation.h"
|
||||||
|
|||||||
@@ -12,9 +12,9 @@
|
|||||||
#include "runtime/command_stream/command_stream_receiver_hw.h"
|
#include "runtime/command_stream/command_stream_receiver_hw.h"
|
||||||
#include "runtime/compiler_interface/compiler_options.h"
|
#include "runtime/compiler_interface/compiler_options.h"
|
||||||
#include "runtime/helpers/aligned_memory.h"
|
#include "runtime/helpers/aligned_memory.h"
|
||||||
|
#include "runtime/helpers/hardware_commands_helper.h"
|
||||||
#include "runtime/helpers/hash.h"
|
#include "runtime/helpers/hash.h"
|
||||||
#include "runtime/helpers/hw_helper.h"
|
#include "runtime/helpers/hw_helper.h"
|
||||||
#include "runtime/helpers/kernel_commands.h"
|
|
||||||
#include "runtime/helpers/string.h"
|
#include "runtime/helpers/string.h"
|
||||||
#include "runtime/indirect_heap/indirect_heap.h"
|
#include "runtime/indirect_heap/indirect_heap.h"
|
||||||
#include "runtime/kernel/kernel.h"
|
#include "runtime/kernel/kernel.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user