2020-01-11 18:25:26 +01:00
|
|
|
/*
|
2023-01-02 16:19:30 +00:00
|
|
|
* Copyright (C) 2020-2023 Intel Corporation
|
2020-01-11 18:25:26 +01:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/compiler_interface/linker.h"
|
2020-01-11 18:25:26 +01:00
|
|
|
|
2020-01-25 19:18:48 +01:00
|
|
|
#include <cstddef>
|
2020-01-11 18:25:26 +01:00
|
|
|
#include <memory>
|
2022-02-23 11:48:31 +00:00
|
|
|
#include <unordered_map>
|
2020-01-11 18:25:26 +01:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
|
struct KernelInfo;
|
|
|
|
|
|
|
|
|
|
struct ProgramInfo {
|
|
|
|
|
ProgramInfo() = default;
|
|
|
|
|
ProgramInfo(ProgramInfo &&) = default;
|
|
|
|
|
ProgramInfo &operator=(ProgramInfo &&) = default;
|
2020-01-27 10:10:54 +01:00
|
|
|
ProgramInfo(const ProgramInfo &) = delete;
|
|
|
|
|
ProgramInfo &operator=(const ProgramInfo &) = delete;
|
2020-01-11 18:25:26 +01:00
|
|
|
~ProgramInfo();
|
|
|
|
|
|
|
|
|
|
struct GlobalSurfaceInfo {
|
|
|
|
|
const void *initData = nullptr;
|
|
|
|
|
size_t size = 0U;
|
|
|
|
|
};
|
|
|
|
|
|
2023-01-02 16:19:30 +00:00
|
|
|
void prepareLinkerInputStorage();
|
2020-01-11 18:25:26 +01:00
|
|
|
|
|
|
|
|
GlobalSurfaceInfo globalConstants;
|
|
|
|
|
GlobalSurfaceInfo globalVariables;
|
2021-11-02 15:29:09 +00:00
|
|
|
GlobalSurfaceInfo globalStrings;
|
2020-01-11 18:25:26 +01:00
|
|
|
std::unique_ptr<LinkerInput> linkerInput;
|
2022-02-23 11:48:31 +00:00
|
|
|
std::unordered_map<std::string, std::string> globalsDeviceToHostNameMap;
|
2020-01-11 18:25:26 +01:00
|
|
|
|
2022-02-28 17:44:06 +00:00
|
|
|
std::vector<ExternalFunctionInfo> externalFunctions;
|
2020-01-11 18:25:26 +01:00
|
|
|
std::vector<KernelInfo *> kernelInfos;
|
2021-07-13 15:29:58 +00:00
|
|
|
uint32_t grfSize = 32U;
|
2022-09-08 11:12:08 +00:00
|
|
|
uint32_t minScratchSpaceSize = 0U;
|
2022-10-11 17:06:26 +00:00
|
|
|
size_t kernelMiscInfoPos = std::string::npos;
|
2020-01-11 18:25:26 +01:00
|
|
|
};
|
|
|
|
|
|
2020-01-25 19:18:48 +01:00
|
|
|
size_t getMaxInlineSlmNeeded(const ProgramInfo &programInfo);
|
|
|
|
|
bool requiresLocalMemoryWindowVA(const ProgramInfo &programInfo);
|
2022-12-21 14:09:51 +00:00
|
|
|
bool isRebuiltToPatchtokensRequired(Device *neoDevice, ArrayRef<const uint8_t> archive, std::string &optionsString, bool isBuiltin, bool isVmeUsed);
|
2020-01-25 19:18:48 +01:00
|
|
|
|
2022-10-27 15:09:41 +00:00
|
|
|
} // namespace NEO
|