Files
compute-runtime/runtime/command_queue/hardware_interface.h
Pawel Wilma cc1f4bed60 Revert "Use GPU instead of CPU address in programming commands for HwTim(...)"
This reverts commit 6202b2222b.
"Use GPU instead of CPU address in programming commands for HwTimeStamps"

Change-Id: I085382d95538ae41068a21c628d606039bf9cdf0
2018-12-21 01:16:46 +01:00

88 lines
2.4 KiB
C++

/*
* Copyright (C) 2018 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "CL/cl.h"
#include <cstdint>
namespace OCLRT {
class CommandQueue;
class DispatchInfo;
class IndirectHeap;
class Kernel;
class LinearStream;
class TimestampPacket;
enum class PreemptionMode : uint32_t;
struct HwPerfCounter;
struct HwTimeStamps;
struct KernelOperation;
struct MultiDispatchInfo;
template <class T>
struct TagNode;
template <typename GfxFamily>
using WALKER_TYPE = typename GfxFamily::WALKER_TYPE;
template <typename GfxFamily>
class HardwareInterface {
public:
using INTERFACE_DESCRIPTOR_DATA = typename GfxFamily::INTERFACE_DESCRIPTOR_DATA;
static void dispatchWalker(
CommandQueue &commandQueue,
const MultiDispatchInfo &multiDispatchInfo,
cl_uint numEventsInWaitList,
const cl_event *eventWaitList,
KernelOperation **blockedCommandsData,
HwTimeStamps *hwTimeStamps,
HwPerfCounter *hwPerfCounter,
TimestampPacketContainer *previousTimestampPacketNodes,
TimestampPacketContainer *currentTimestampPacketNodes,
PreemptionMode preemptionMode,
bool blockQueue,
uint32_t commandType = 0);
static void getDefaultDshSpace(
const size_t &offsetInterfaceDescriptorTable,
CommandQueue &commandQueue,
const MultiDispatchInfo &multiDispatchInfo,
size_t &totalInterfaceDescriptorTableSize,
Kernel *parentKernel,
IndirectHeap *dsh,
LinearStream *commandStream);
static INTERFACE_DESCRIPTOR_DATA *obtainInterfaceDescriptorData(
WALKER_TYPE<GfxFamily> *walkerCmd);
static void dispatchWorkarounds(
LinearStream *commandStream,
CommandQueue &commandQueue,
Kernel &kernel,
const bool &enable);
static void dispatchProfilingPerfStartCommands(
const DispatchInfo &dispatchInfo,
const MultiDispatchInfo &multiDispatchInfo,
HwTimeStamps *hwTimeStamps,
HwPerfCounter *hwPerfCounter,
LinearStream *commandStream,
CommandQueue &commandQueue);
static void dispatchProfilingPerfEndCommands(
HwTimeStamps *hwTimeStamps,
HwPerfCounter *hwPerfCounter,
LinearStream *commandStream,
CommandQueue &commandQueue);
static WALKER_TYPE<GfxFamily> *allocateWalkerSpace(LinearStream &commandStream,
const Kernel &kernel);
};
} // namespace OCLRT