Files
compute-runtime/shared/source/built_ins/sip.h
Warchulski, Jaroslaw 7ae44268cb Cleanup includes 17
Cleaned up files:
shared/source/built_ins/sip.h
shared/source/compiler_interface/compiler_cache.h
shared/source/compiler_interface/compiler_interface.h
shared/source/device_binary_format/device_binary_formats.h
shared/source/helpers/timestamp_packet.h
shared/source/kernel/debug_data.h
shared/source/utilities/tag_allocator.h
shared/test/common/mocks/mock_device.h

Related-To: NEO-5548
Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
2023-01-02 10:59:08 +01:00

75 lines
2.3 KiB
C++

/*
* Copyright (C) 2018-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/built_ins/sip_kernel_type.h"
#include <string>
#include <vector>
namespace NEO {
class Device;
class GraphicsAllocation;
class MemoryManager;
class GfxCoreHelper;
struct RootDeviceEnvironment;
class SipKernel {
public:
SipKernel(SipKernelType type, GraphicsAllocation *sipAlloc, std::vector<char> ssah);
SipKernel(const SipKernel &) = delete;
SipKernel &operator=(const SipKernel &) = delete;
SipKernel(SipKernel &&) = delete;
SipKernel &operator=(SipKernel &&) = delete;
virtual ~SipKernel();
SipKernelType getType() const {
return type;
}
MOCKABLE_VIRTUAL GraphicsAllocation *getSipAllocation() const;
MOCKABLE_VIRTUAL const std::vector<char> &getStateSaveAreaHeader() const;
MOCKABLE_VIRTUAL size_t getStateSaveAreaSize(Device *device) const;
static bool initSipKernel(SipKernelType type, Device &device);
static void freeSipKernels(RootDeviceEnvironment *rootDeviceEnvironment, MemoryManager *memoryManager);
static const SipKernel &getSipKernel(Device &device);
static const SipKernel &getBindlessDebugSipKernel(Device &device);
static SipKernelType getSipKernelType(Device &device);
static SipKernelType getSipKernelType(Device &device, bool debuggingEnable);
static SipClassType classType;
enum class COMMAND : uint32_t {
RESUME,
READY,
SLM_READ,
SLM_WRITE
};
protected:
static bool initSipKernelImpl(SipKernelType type, Device &device);
static const SipKernel &getSipKernelImpl(Device &device);
static bool initBuiltinsSipKernel(SipKernelType type, Device &device);
static bool initRawBinaryFromFileKernel(SipKernelType type, Device &device, std::string &fileName);
static std::vector<char> readStateSaveAreaHeaderFromFile(const std::string &fileName);
static std::string createHeaderFilename(const std::string &filename);
static bool initHexadecimalArraySipKernel(SipKernelType type, Device &device);
static void selectSipClassType(std::string &fileName, const GfxCoreHelper &gfxCoreHelper);
const std::vector<char> stateSaveAreaHeader;
GraphicsAllocation *sipAllocation = nullptr;
SipKernelType type = SipKernelType::COUNT;
};
} // namespace NEO