mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 00:24:58 +08:00
refactor: remove not needed includes from ocloc sources
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f06b12cf35
commit
02337bbbf8
@@ -21,14 +21,6 @@ set(IGDRCL_SRCS_offline_compiler_mock
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/decoder/mock/mock_zebin_decoder.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/decoder/mock/mock_zebin_encoder.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/decoder/mock/mock_iga_wrapper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock/mock_argument_helper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock/mock_multi_command.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock/mock_ocloc_concat.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock/mock_ocloc_fcl_facade.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock/mock_ocloc_igc_facade.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock/mock_offline_compiler.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock/mock_offline_linker.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock/mock_sip_ocloc_tests.cpp
|
||||
)
|
||||
|
||||
set(CLOC_LIB_SRCS_UTILITIES
|
||||
@@ -64,8 +56,6 @@ set(IGDRCL_SRCS_offline_compiler_tests
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/default_cache_config_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/environment.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock/mock_iga_dll.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock/mock_iga_dll.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ocloc_api_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ocloc_concat_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ocloc_fatbinary_tests.cpp
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "shared/offline_compiler/source/decoder/translate_platform_base.h"
|
||||
#include "shared/source/helpers/array_count.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/helpers/product_config_helper.h"
|
||||
#include "shared/test/common/helpers/gtest_helpers.h"
|
||||
#include "shared/test/common/helpers/test_files.h"
|
||||
#include "shared/test/common/helpers/variable_backup.h"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "shared/offline_compiler/source/ocloc_error_code.h"
|
||||
#include "shared/source/device_binary_format/elf/elf.h"
|
||||
#include "shared/source/device_binary_format/elf/elf_encoder.h"
|
||||
#include "shared/source/helpers/product_config_helper.h"
|
||||
#include "shared/test/common/mocks/mock_elf.h"
|
||||
#include "shared/test/common/mocks/mock_modules_zebin.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
23
opencl/test/unit_test/offline_compiler/mock/CMakeLists.txt
Normal file
23
opencl/test/unit_test/offline_compiler/mock/CMakeLists.txt
Normal file
@@ -0,0 +1,23 @@
|
||||
#
|
||||
# Copyright (C) 2023 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
target_sources(ocloc_tests PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_argument_helper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_multi_command.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_ocloc_concat.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_ocloc_fcl_facade.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_ocloc_fcl_facade.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_ocloc_igc_facade.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_ocloc_igc_facade.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_offline_compiler.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_offline_compiler.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_offline_linker.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_sip_ocloc_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_iga_dll.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_iga_dll.h
|
||||
)
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opencl/test/unit_test/offline_compiler/mock/mock_ocloc_fcl_facade.h"
|
||||
|
||||
#include "shared/source/os_interface/os_library.h"
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
namespace NEO {
|
||||
|
||||
MockOclocFclFacade::MockOclocFclFacade(OclocArgHelper *argHelper) : OclocFclFacade(argHelper){};
|
||||
MockOclocFclFacade::~MockOclocFclFacade() = default;
|
||||
|
||||
std::unique_ptr<OsLibrary> MockOclocFclFacade::loadFclLibrary() const {
|
||||
if (shouldFailLoadingOfFclLib) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocFclFacade::loadFclLibrary();
|
||||
}
|
||||
}
|
||||
|
||||
CIF::CreateCIFMainFunc_t MockOclocFclFacade::loadCreateFclMainFunction() const {
|
||||
if (shouldFailLoadingOfFclCreateMainFunction) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocFclFacade::loadCreateFclMainFunction();
|
||||
}
|
||||
}
|
||||
|
||||
CIF::RAII::UPtr_t<CIF::CIFMain> MockOclocFclFacade::createFclMain(CIF::CreateCIFMainFunc_t createMainFunction) const {
|
||||
if (shouldFailCreationOfFclMain) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocFclFacade::createFclMain(createMainFunction);
|
||||
}
|
||||
}
|
||||
|
||||
bool MockOclocFclFacade::isFclInterfaceCompatible() const {
|
||||
if (isFclInterfaceCompatibleReturnValue.has_value()) {
|
||||
return *isFclInterfaceCompatibleReturnValue;
|
||||
} else {
|
||||
return OclocFclFacade::isFclInterfaceCompatible();
|
||||
}
|
||||
}
|
||||
|
||||
std::string MockOclocFclFacade::getIncompatibleInterface() const {
|
||||
if (getIncompatibleInterfaceReturnValue.has_value()) {
|
||||
return *getIncompatibleInterfaceReturnValue;
|
||||
} else {
|
||||
return OclocFclFacade::getIncompatibleInterface();
|
||||
}
|
||||
}
|
||||
|
||||
CIF::RAII::UPtr_t<IGC::FclOclDeviceCtxTagOCL> MockOclocFclFacade::createFclDeviceContext() const {
|
||||
if (shouldFailCreationOfFclDeviceContext) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocFclFacade::createFclDeviceContext();
|
||||
}
|
||||
}
|
||||
|
||||
bool MockOclocFclFacade::shouldPopulateFclInterface() const {
|
||||
if (shouldPopulateFclInterfaceReturnValue.has_value()) {
|
||||
return *shouldPopulateFclInterfaceReturnValue;
|
||||
} else {
|
||||
return OclocFclFacade::shouldPopulateFclInterface();
|
||||
}
|
||||
}
|
||||
|
||||
CIF::RAII::UPtr_t<IGC::PlatformTagOCL> MockOclocFclFacade::getPlatformHandle() const {
|
||||
if (shouldReturnInvalidFclPlatformHandle) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocFclFacade::getPlatformHandle();
|
||||
}
|
||||
}
|
||||
|
||||
void MockOclocFclFacade::populateFclInterface(IGC::PlatformTagOCL &handle, const HardwareInfo &hwInfo) {
|
||||
++populateFclInterfaceCalledCount;
|
||||
OclocFclFacade::populateFclInterface(handle, hwInfo);
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -28,77 +28,25 @@ class MockOclocFclFacade : public OclocFclFacade {
|
||||
std::optional<bool> shouldPopulateFclInterfaceReturnValue{};
|
||||
int populateFclInterfaceCalledCount{0};
|
||||
|
||||
MockOclocFclFacade(OclocArgHelper *argHelper) : OclocFclFacade{argHelper} {}
|
||||
~MockOclocFclFacade() override = default;
|
||||
MockOclocFclFacade(OclocArgHelper *argHelper);
|
||||
~MockOclocFclFacade() override;
|
||||
|
||||
std::unique_ptr<OsLibrary> loadFclLibrary() const override {
|
||||
if (shouldFailLoadingOfFclLib) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocFclFacade::loadFclLibrary();
|
||||
}
|
||||
}
|
||||
std::unique_ptr<OsLibrary> loadFclLibrary() const override;
|
||||
CIF::CreateCIFMainFunc_t loadCreateFclMainFunction() const override;
|
||||
|
||||
CIF::CreateCIFMainFunc_t loadCreateFclMainFunction() const override {
|
||||
if (shouldFailLoadingOfFclCreateMainFunction) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocFclFacade::loadCreateFclMainFunction();
|
||||
}
|
||||
}
|
||||
CIF::RAII::UPtr_t<CIF::CIFMain> createFclMain(CIF::CreateCIFMainFunc_t createMainFunction) const override;
|
||||
|
||||
CIF::RAII::UPtr_t<CIF::CIFMain> createFclMain(CIF::CreateCIFMainFunc_t createMainFunction) const override {
|
||||
if (shouldFailCreationOfFclMain) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocFclFacade::createFclMain(createMainFunction);
|
||||
}
|
||||
}
|
||||
bool isFclInterfaceCompatible() const override;
|
||||
|
||||
bool isFclInterfaceCompatible() const override {
|
||||
if (isFclInterfaceCompatibleReturnValue.has_value()) {
|
||||
return *isFclInterfaceCompatibleReturnValue;
|
||||
} else {
|
||||
return OclocFclFacade::isFclInterfaceCompatible();
|
||||
}
|
||||
}
|
||||
std::string getIncompatibleInterface() const override;
|
||||
|
||||
std::string getIncompatibleInterface() const override {
|
||||
if (getIncompatibleInterfaceReturnValue.has_value()) {
|
||||
return *getIncompatibleInterfaceReturnValue;
|
||||
} else {
|
||||
return OclocFclFacade::getIncompatibleInterface();
|
||||
}
|
||||
}
|
||||
CIF::RAII::UPtr_t<IGC::FclOclDeviceCtxTagOCL> createFclDeviceContext() const override;
|
||||
|
||||
CIF::RAII::UPtr_t<IGC::FclOclDeviceCtxTagOCL> createFclDeviceContext() const override {
|
||||
if (shouldFailCreationOfFclDeviceContext) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocFclFacade::createFclDeviceContext();
|
||||
}
|
||||
}
|
||||
bool shouldPopulateFclInterface() const override;
|
||||
|
||||
bool shouldPopulateFclInterface() const override {
|
||||
if (shouldPopulateFclInterfaceReturnValue.has_value()) {
|
||||
return *shouldPopulateFclInterfaceReturnValue;
|
||||
} else {
|
||||
return OclocFclFacade::shouldPopulateFclInterface();
|
||||
}
|
||||
}
|
||||
CIF::RAII::UPtr_t<IGC::PlatformTagOCL> getPlatformHandle() const override;
|
||||
|
||||
CIF::RAII::UPtr_t<IGC::PlatformTagOCL> getPlatformHandle() const override {
|
||||
if (shouldReturnInvalidFclPlatformHandle) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocFclFacade::getPlatformHandle();
|
||||
}
|
||||
}
|
||||
|
||||
void populateFclInterface(IGC::PlatformTagOCL &handle, const HardwareInfo &hwInfo) override {
|
||||
++populateFclInterfaceCalledCount;
|
||||
OclocFclFacade::populateFclInterface(handle, hwInfo);
|
||||
}
|
||||
void populateFclInterface(IGC::PlatformTagOCL &handle, const HardwareInfo &hwInfo) override;
|
||||
};
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opencl/test/unit_test/offline_compiler/mock/mock_ocloc_igc_facade.h"
|
||||
|
||||
#include "shared/source/os_interface/os_library.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
MockOclocIgcFacade::MockOclocIgcFacade(OclocArgHelper *argHelper) : OclocIgcFacade(argHelper){};
|
||||
MockOclocIgcFacade::~MockOclocIgcFacade() = default;
|
||||
|
||||
std::unique_ptr<OsLibrary> MockOclocIgcFacade::loadIgcLibrary() const {
|
||||
if (shouldFailLoadingOfIgcLib) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocIgcFacade::loadIgcLibrary();
|
||||
}
|
||||
}
|
||||
|
||||
CIF::CreateCIFMainFunc_t MockOclocIgcFacade::loadCreateIgcMainFunction() const {
|
||||
if (shouldFailLoadingOfIgcCreateMainFunction) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocIgcFacade::loadCreateIgcMainFunction();
|
||||
}
|
||||
}
|
||||
|
||||
CIF::RAII::UPtr_t<CIF::CIFMain> MockOclocIgcFacade::createIgcMain(CIF::CreateCIFMainFunc_t createMainFunction) const {
|
||||
if (shouldFailCreationOfIgcMain) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocIgcFacade::createIgcMain(createMainFunction);
|
||||
}
|
||||
}
|
||||
|
||||
bool MockOclocIgcFacade::isIgcInterfaceCompatible(const std::vector<CIF::InterfaceId_t> &interfacesToIgnore) const {
|
||||
if (isIgcInterfaceCompatibleReturnValue.has_value()) {
|
||||
return *isIgcInterfaceCompatibleReturnValue;
|
||||
} else {
|
||||
return OclocIgcFacade::isIgcInterfaceCompatible(interfacesToIgnore);
|
||||
}
|
||||
}
|
||||
|
||||
std::string MockOclocIgcFacade::getIncompatibleInterface(const std::vector<CIF::InterfaceId_t> &interfacesToIgnore) const {
|
||||
if (getIncompatibleInterfaceReturnValue.has_value()) {
|
||||
return *getIncompatibleInterfaceReturnValue;
|
||||
} else {
|
||||
return OclocIgcFacade::getIncompatibleInterface(interfacesToIgnore);
|
||||
}
|
||||
}
|
||||
|
||||
bool MockOclocIgcFacade::isPatchtokenInterfaceSupported() const {
|
||||
if (isPatchtokenInterfaceSupportedReturnValue.has_value()) {
|
||||
return *isPatchtokenInterfaceSupportedReturnValue;
|
||||
} else {
|
||||
return OclocIgcFacade::isPatchtokenInterfaceSupported();
|
||||
}
|
||||
}
|
||||
|
||||
CIF::RAII::UPtr_t<IGC::IgcOclDeviceCtxTagOCL> MockOclocIgcFacade::createIgcDeviceContext() const {
|
||||
if (shouldFailCreationOfIgcDeviceContext) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocIgcFacade::createIgcDeviceContext();
|
||||
}
|
||||
}
|
||||
|
||||
CIF::RAII::UPtr_t<IGC::PlatformTagOCL> MockOclocIgcFacade::getIgcPlatformHandle() const {
|
||||
if (shouldReturnInvalidIgcPlatformHandle) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocIgcFacade::getIgcPlatformHandle();
|
||||
}
|
||||
}
|
||||
|
||||
CIF::RAII::UPtr_t<IGC::GTSystemInfoTagOCL> MockOclocIgcFacade::getGTSystemInfoHandle() const {
|
||||
if (shouldReturnInvalidGTSystemInfoHandle) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocIgcFacade::getGTSystemInfoHandle();
|
||||
}
|
||||
}
|
||||
|
||||
CIF::RAII::UPtr_t<IGC::IgcFeaturesAndWorkaroundsTagOCL> MockOclocIgcFacade::getIgcFeaturesAndWorkaroundsHandle() const {
|
||||
if (shouldReturnInvalidIgcFeaturesAndWorkaroundsHandle) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocIgcFacade::getIgcFeaturesAndWorkaroundsHandle();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -29,88 +29,28 @@ class MockOclocIgcFacade : public OclocIgcFacade {
|
||||
std::optional<std::string> getIncompatibleInterfaceReturnValue{};
|
||||
std::optional<bool> isPatchtokenInterfaceSupportedReturnValue{};
|
||||
|
||||
MockOclocIgcFacade(OclocArgHelper *argHelper) : OclocIgcFacade{argHelper} {}
|
||||
~MockOclocIgcFacade() override = default;
|
||||
MockOclocIgcFacade(OclocArgHelper *argHelper);
|
||||
~MockOclocIgcFacade() override;
|
||||
|
||||
std::unique_ptr<OsLibrary> loadIgcLibrary() const override {
|
||||
if (shouldFailLoadingOfIgcLib) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocIgcFacade::loadIgcLibrary();
|
||||
}
|
||||
}
|
||||
std::unique_ptr<OsLibrary> loadIgcLibrary() const override;
|
||||
|
||||
CIF::CreateCIFMainFunc_t loadCreateIgcMainFunction() const override {
|
||||
if (shouldFailLoadingOfIgcCreateMainFunction) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocIgcFacade::loadCreateIgcMainFunction();
|
||||
}
|
||||
}
|
||||
CIF::CreateCIFMainFunc_t loadCreateIgcMainFunction() const override;
|
||||
|
||||
CIF::RAII::UPtr_t<CIF::CIFMain> createIgcMain(CIF::CreateCIFMainFunc_t createMainFunction) const override {
|
||||
if (shouldFailCreationOfIgcMain) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocIgcFacade::createIgcMain(createMainFunction);
|
||||
}
|
||||
}
|
||||
CIF::RAII::UPtr_t<CIF::CIFMain> createIgcMain(CIF::CreateCIFMainFunc_t createMainFunction) const override;
|
||||
|
||||
bool isIgcInterfaceCompatible(const std::vector<CIF::InterfaceId_t> &interfacesToIgnore) const override {
|
||||
if (isIgcInterfaceCompatibleReturnValue.has_value()) {
|
||||
return *isIgcInterfaceCompatibleReturnValue;
|
||||
} else {
|
||||
return OclocIgcFacade::isIgcInterfaceCompatible(interfacesToIgnore);
|
||||
}
|
||||
}
|
||||
bool isIgcInterfaceCompatible(const std::vector<CIF::InterfaceId_t> &interfacesToIgnore) const override;
|
||||
|
||||
std::string getIncompatibleInterface(const std::vector<CIF::InterfaceId_t> &interfacesToIgnore) const override {
|
||||
if (getIncompatibleInterfaceReturnValue.has_value()) {
|
||||
return *getIncompatibleInterfaceReturnValue;
|
||||
} else {
|
||||
return OclocIgcFacade::getIncompatibleInterface(interfacesToIgnore);
|
||||
}
|
||||
}
|
||||
std::string getIncompatibleInterface(const std::vector<CIF::InterfaceId_t> &interfacesToIgnore) const override;
|
||||
|
||||
bool isPatchtokenInterfaceSupported() const override {
|
||||
if (isPatchtokenInterfaceSupportedReturnValue.has_value()) {
|
||||
return *isPatchtokenInterfaceSupportedReturnValue;
|
||||
} else {
|
||||
return OclocIgcFacade::isPatchtokenInterfaceSupported();
|
||||
}
|
||||
}
|
||||
bool isPatchtokenInterfaceSupported() const override;
|
||||
|
||||
CIF::RAII::UPtr_t<IGC::IgcOclDeviceCtxTagOCL> createIgcDeviceContext() const override {
|
||||
if (shouldFailCreationOfIgcDeviceContext) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocIgcFacade::createIgcDeviceContext();
|
||||
}
|
||||
}
|
||||
CIF::RAII::UPtr_t<IGC::IgcOclDeviceCtxTagOCL> createIgcDeviceContext() const override;
|
||||
|
||||
CIF::RAII::UPtr_t<IGC::PlatformTagOCL> getIgcPlatformHandle() const override {
|
||||
if (shouldReturnInvalidIgcPlatformHandle) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocIgcFacade::getIgcPlatformHandle();
|
||||
}
|
||||
}
|
||||
CIF::RAII::UPtr_t<IGC::PlatformTagOCL> getIgcPlatformHandle() const override;
|
||||
|
||||
CIF::RAII::UPtr_t<IGC::GTSystemInfoTagOCL> getGTSystemInfoHandle() const override {
|
||||
if (shouldReturnInvalidGTSystemInfoHandle) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocIgcFacade::getGTSystemInfoHandle();
|
||||
}
|
||||
}
|
||||
CIF::RAII::UPtr_t<IGC::GTSystemInfoTagOCL> getGTSystemInfoHandle() const override;
|
||||
|
||||
CIF::RAII::UPtr_t<IGC::IgcFeaturesAndWorkaroundsTagOCL> getIgcFeaturesAndWorkaroundsHandle() const override {
|
||||
if (shouldReturnInvalidIgcFeaturesAndWorkaroundsHandle) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return OclocIgcFacade::getIgcFeaturesAndWorkaroundsHandle();
|
||||
}
|
||||
}
|
||||
CIF::RAII::UPtr_t<IGC::IgcFeaturesAndWorkaroundsTagOCL> getIgcFeaturesAndWorkaroundsHandle() const override;
|
||||
};
|
||||
|
||||
} // namespace NEO
|
||||
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opencl/test/unit_test/offline_compiler/mock/mock_offline_compiler.h"
|
||||
|
||||
#include "opencl/test/unit_test/offline_compiler/mock/mock_argument_helper.h"
|
||||
#include "opencl/test/unit_test/offline_compiler/mock/mock_ocloc_fcl_facade.h"
|
||||
#include "opencl/test/unit_test/offline_compiler/mock/mock_ocloc_igc_facade.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
MockOfflineCompiler::MockOfflineCompiler() : OfflineCompiler() {
|
||||
uniqueHelper = std::make_unique<MockOclocArgHelper>(filesMap);
|
||||
uniqueHelper->setAllCallBase(true);
|
||||
argHelper = uniqueHelper.get();
|
||||
|
||||
auto uniqueFclFacadeMock = std::make_unique<MockOclocFclFacade>(argHelper);
|
||||
mockFclFacade = uniqueFclFacadeMock.get();
|
||||
fclFacade = std::move(uniqueFclFacadeMock);
|
||||
|
||||
auto uniqueIgcFacadeMock = std::make_unique<MockOclocIgcFacade>(argHelper);
|
||||
mockIgcFacade = uniqueIgcFacadeMock.get();
|
||||
igcFacade = std::move(uniqueIgcFacadeMock);
|
||||
}
|
||||
|
||||
MockOfflineCompiler::~MockOfflineCompiler() = default;
|
||||
|
||||
int MockOfflineCompiler::initialize(size_t numArgs, const std::vector<std::string> &argv) {
|
||||
return OfflineCompiler::initialize(numArgs, argv, true);
|
||||
}
|
||||
|
||||
void MockOfflineCompiler::storeGenBinary(const void *pSrc, const size_t srcSize) {
|
||||
OfflineCompiler::storeBinary(genBinary, genBinarySize, pSrc, srcSize);
|
||||
}
|
||||
|
||||
int MockOfflineCompiler::build() {
|
||||
++buildCalledCount;
|
||||
|
||||
if (buildReturnValue.has_value()) {
|
||||
return *buildReturnValue;
|
||||
}
|
||||
|
||||
return OfflineCompiler::build();
|
||||
}
|
||||
|
||||
int MockOfflineCompiler::buildIrBinary() {
|
||||
if (overrideBuildIrBinaryStatus) {
|
||||
return buildIrBinaryStatus;
|
||||
}
|
||||
return OfflineCompiler::buildIrBinary();
|
||||
}
|
||||
|
||||
int MockOfflineCompiler::buildSourceCode() {
|
||||
if (overrideBuildSourceCodeStatus) {
|
||||
return buildSourceCodeStatus;
|
||||
}
|
||||
return OfflineCompiler::buildSourceCode();
|
||||
}
|
||||
|
||||
bool MockOfflineCompiler::generateElfBinary() {
|
||||
generateElfBinaryCalled++;
|
||||
return OfflineCompiler::generateElfBinary();
|
||||
}
|
||||
|
||||
void MockOfflineCompiler::writeOutAllFiles() {
|
||||
writeOutAllFilesCalled++;
|
||||
OfflineCompiler::writeOutAllFiles();
|
||||
}
|
||||
|
||||
void MockOfflineCompiler::clearLog() {
|
||||
uniqueHelper = std::make_unique<MockOclocArgHelper>(filesMap);
|
||||
uniqueHelper->setAllCallBase(true);
|
||||
argHelper = uniqueHelper.get();
|
||||
}
|
||||
|
||||
void MockOfflineCompiler::createDir(const std::string &path) {
|
||||
if (interceptCreatedDirs) {
|
||||
createdDirs.push_back(path);
|
||||
} else {
|
||||
OfflineCompiler::createDir(path);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
@@ -8,16 +8,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "shared/offline_compiler/source/offline_compiler.h"
|
||||
#include "shared/source/compiler_interface/default_cache_config.h"
|
||||
|
||||
#include "opencl/test/unit_test/offline_compiler/mock/mock_argument_helper.h"
|
||||
#include "opencl/test/unit_test/offline_compiler/mock/mock_ocloc_fcl_facade.h"
|
||||
#include "opencl/test/unit_test/offline_compiler/mock/mock_ocloc_igc_facade.h"
|
||||
|
||||
#include <map>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
class MockOclocArgHelper;
|
||||
namespace NEO {
|
||||
class MockOclocFclFacade;
|
||||
class MockOclocIgcFacade;
|
||||
|
||||
class MockOfflineCompiler : public OfflineCompiler {
|
||||
public:
|
||||
@@ -76,77 +75,27 @@ class MockOfflineCompiler : public OfflineCompiler {
|
||||
using OfflineCompiler::useLlvmText;
|
||||
using OfflineCompiler::useOptionsSuffix;
|
||||
|
||||
MockOfflineCompiler() : OfflineCompiler() {
|
||||
uniqueHelper = std::make_unique<MockOclocArgHelper>(filesMap);
|
||||
uniqueHelper->setAllCallBase(true);
|
||||
argHelper = uniqueHelper.get();
|
||||
MockOfflineCompiler();
|
||||
|
||||
auto uniqueFclFacadeMock = std::make_unique<MockOclocFclFacade>(argHelper);
|
||||
mockFclFacade = uniqueFclFacadeMock.get();
|
||||
fclFacade = std::move(uniqueFclFacadeMock);
|
||||
~MockOfflineCompiler() override;
|
||||
|
||||
auto uniqueIgcFacadeMock = std::make_unique<MockOclocIgcFacade>(argHelper);
|
||||
mockIgcFacade = uniqueIgcFacadeMock.get();
|
||||
igcFacade = std::move(uniqueIgcFacadeMock);
|
||||
}
|
||||
int initialize(size_t numArgs, const std::vector<std::string> &argv);
|
||||
|
||||
~MockOfflineCompiler() override = default;
|
||||
void storeGenBinary(const void *pSrc, const size_t srcSize);
|
||||
|
||||
int initialize(size_t numArgs, const std::vector<std::string> &argv) {
|
||||
return OfflineCompiler::initialize(numArgs, argv, true);
|
||||
}
|
||||
int build() override;
|
||||
|
||||
void storeGenBinary(const void *pSrc, const size_t srcSize) {
|
||||
OfflineCompiler::storeBinary(genBinary, genBinarySize, pSrc, srcSize);
|
||||
}
|
||||
int buildIrBinary() override;
|
||||
|
||||
int build() override {
|
||||
++buildCalledCount;
|
||||
int buildSourceCode() override;
|
||||
|
||||
if (buildReturnValue.has_value()) {
|
||||
return *buildReturnValue;
|
||||
}
|
||||
bool generateElfBinary() override;
|
||||
|
||||
return OfflineCompiler::build();
|
||||
}
|
||||
void writeOutAllFiles() override;
|
||||
|
||||
int buildIrBinary() override {
|
||||
if (overrideBuildIrBinaryStatus) {
|
||||
return buildIrBinaryStatus;
|
||||
}
|
||||
return OfflineCompiler::buildIrBinary();
|
||||
}
|
||||
void clearLog();
|
||||
|
||||
int buildSourceCode() override {
|
||||
if (overrideBuildSourceCodeStatus) {
|
||||
return buildSourceCodeStatus;
|
||||
}
|
||||
return OfflineCompiler::buildSourceCode();
|
||||
}
|
||||
|
||||
bool generateElfBinary() override {
|
||||
generateElfBinaryCalled++;
|
||||
return OfflineCompiler::generateElfBinary();
|
||||
}
|
||||
|
||||
void writeOutAllFiles() override {
|
||||
writeOutAllFilesCalled++;
|
||||
OfflineCompiler::writeOutAllFiles();
|
||||
}
|
||||
|
||||
void clearLog() {
|
||||
uniqueHelper = std::make_unique<MockOclocArgHelper>(filesMap);
|
||||
uniqueHelper->setAllCallBase(true);
|
||||
argHelper = uniqueHelper.get();
|
||||
}
|
||||
|
||||
void createDir(const std::string &path) override {
|
||||
if (interceptCreatedDirs) {
|
||||
createdDirs.push_back(path);
|
||||
} else {
|
||||
OfflineCompiler::createDir(path);
|
||||
}
|
||||
}
|
||||
void createDir(const std::string &path) override;
|
||||
|
||||
std::map<std::string, std::string> filesMap{};
|
||||
int buildIrBinaryStatus = 0;
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "shared/source/device_binary_format/elf/elf_decoder.h"
|
||||
#include "shared/source/device_binary_format/elf/ocl_elf.h"
|
||||
#include "shared/source/helpers/file_io.h"
|
||||
#include "shared/source/helpers/product_config_helper.h"
|
||||
#include "shared/test/common/helpers/variable_backup.h"
|
||||
|
||||
#include "environment.h"
|
||||
|
||||
@@ -12,11 +12,13 @@
|
||||
#include "shared/source/compiler_interface/compiler_options.h"
|
||||
#include "shared/source/device_binary_format/ar/ar.h"
|
||||
#include "shared/source/device_binary_format/ar/ar_decoder.h"
|
||||
#include "shared/source/device_binary_format/ar/ar_encoder.h"
|
||||
#include "shared/source/device_binary_format/elf/elf_decoder.h"
|
||||
#include "shared/source/device_binary_format/elf/ocl_elf.h"
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/helpers/product_config_helper.h"
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
#include "shared/test/common/helpers/gtest_helpers.h"
|
||||
|
||||
#include "environment.h"
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "shared/offline_compiler/source/ocloc_arg_helper.h"
|
||||
#include "shared/offline_compiler/source/ocloc_fatbinary.h"
|
||||
#include "shared/source/helpers/product_config_helper.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "mock/mock_argument_helper.h"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "opencl/test/unit_test/offline_compiler/ocloc_product_config_tests.h"
|
||||
|
||||
#include "shared/offline_compiler/source/ocloc_arg_helper.h"
|
||||
#include "shared/offline_compiler/source/ocloc_error_code.h"
|
||||
#include "shared/source/helpers/product_config_helper.h"
|
||||
#include "shared/source/os_interface/os_library.h"
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shared/source/helpers/product_config_helper.h"
|
||||
|
||||
#include "opencl/test/unit_test/offline_compiler/mock/mock_offline_compiler.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
#include "shared/test/common/mocks/mock_modules_zebin.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include "opencl/test/unit_test/offline_compiler/mock/mock_ocloc_fcl_facade.h"
|
||||
#include "opencl/test/unit_test/offline_compiler/mock/mock_ocloc_igc_facade.h"
|
||||
|
||||
#include "environment.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "mock/mock_argument_helper.h"
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/constants.h"
|
||||
#include "shared/source/os_interface/os_library.h"
|
||||
#include "shared/source/xe_hpc_core/hw_cmds_pvc.h"
|
||||
#include "shared/source/xe_hpc_core/pvc/device_ids_configs_pvc.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/constants.h"
|
||||
#include "shared/source/os_interface/os_library.h"
|
||||
#include "shared/source/xe_hpg_core/hw_cmds_dg2.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/xe_hpg_core/dg2/product_configs_dg2.h"
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/os_library.h"
|
||||
|
||||
#include "opencl/test/unit_test/offline_compiler/ocloc_fatbinary_tests.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
#include "shared/source/device_binary_format/elf/elf_decoder.h"
|
||||
#include "shared/source/device_binary_format/elf/ocl_elf.h"
|
||||
#include "shared/source/helpers/file_io.h"
|
||||
#include "shared/source/helpers/product_config_helper.h"
|
||||
#include "shared/source/helpers/ptr_math.h"
|
||||
#include "shared/source/os_interface/os_library.h"
|
||||
#include "shared/source/utilities/directory.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "shared/source/helpers/aligned_memory.h"
|
||||
#include "shared/source/helpers/file_io.h"
|
||||
#include "shared/source/helpers/hash.h"
|
||||
#include "shared/source/os_interface/os_library.h"
|
||||
#include "shared/source/helpers/product_config_helper.h"
|
||||
|
||||
#include "CL/cl.h"
|
||||
#include "helper.h"
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
#include "shared/offline_compiler/source/decoder/iga_wrapper.h"
|
||||
#include "shared/offline_compiler/source/ocloc_arg_helper.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/helpers/product_config_helper.h"
|
||||
#include "shared/source/os_interface/os_inc_base.h"
|
||||
#include "shared/source/os_interface/os_library.h"
|
||||
|
||||
#include "igfxfmid.h"
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
#include "shared/offline_compiler/source/ocloc_dll_options.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/os_interface/os_library.h"
|
||||
|
||||
#include "helper.h"
|
||||
#include "igfxfmid.h"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "shared/source/device_binary_format/elf/elf_encoder.h"
|
||||
#include "shared/source/device_binary_format/zebin/zebin_decoder.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/helpers/product_config_helper.h"
|
||||
#include "shared/source/utilities/directory.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@@ -7,8 +7,12 @@
|
||||
|
||||
#include "shared/offline_compiler/source/multi_command.h"
|
||||
|
||||
#include "shared/offline_compiler/source/ocloc_arg_helper.h"
|
||||
#include "shared/offline_compiler/source/ocloc_error_code.h"
|
||||
#include "shared/offline_compiler/source/ocloc_fatbinary.h"
|
||||
#include "shared/offline_compiler/source/offline_compiler.h"
|
||||
#include "shared/offline_compiler/source/utilities/get_current_dir.h"
|
||||
#include "shared/offline_compiler/source/utilities/safety_caller.h"
|
||||
#include "shared/source/utilities/const_stringref.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,17 +7,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shared/offline_compiler/source/decoder/binary_decoder.h"
|
||||
#include "shared/offline_compiler/source/decoder/binary_encoder.h"
|
||||
#include "shared/offline_compiler/source/offline_compiler.h"
|
||||
#include "shared/offline_compiler/source/utilities/get_current_dir.h"
|
||||
#include "shared/offline_compiler/source/utilities/safety_caller.h"
|
||||
#include "shared/source/os_interface/os_library.h"
|
||||
|
||||
#include <CL/cl.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class OclocArgHelper;
|
||||
|
||||
namespace NEO {
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "shared/offline_compiler/source/decoder/helper.h"
|
||||
#include "shared/source/helpers/product_config_helper.h"
|
||||
#include "shared/source/utilities/const_stringref.h"
|
||||
|
||||
#include <algorithm>
|
||||
@@ -20,9 +19,11 @@
|
||||
|
||||
constexpr auto *oclocStdoutLogName = "stdout.log";
|
||||
|
||||
struct ProductConfigHelper;
|
||||
namespace NEO {
|
||||
class CompilerProductHelper;
|
||||
class ReleaseHelper;
|
||||
struct HardwareInfo;
|
||||
} // namespace NEO
|
||||
|
||||
struct Source {
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "shared/source/device_binary_format/ar/ar_encoder.h"
|
||||
#include "shared/source/device_binary_format/elf/elf_decoder.h"
|
||||
#include "shared/source/device_binary_format/zebin/zebin_decoder.h"
|
||||
#include "shared/source/helpers/product_config_helper.h"
|
||||
|
||||
namespace NEO {
|
||||
OclocConcat::ErrorCode OclocConcat::initialize(const std::vector<std::string> &args) {
|
||||
|
||||
@@ -7,17 +7,19 @@
|
||||
|
||||
#include "shared/offline_compiler/source/ocloc_fatbinary.h"
|
||||
|
||||
#include "shared/offline_compiler/source/ocloc_arg_helper.h"
|
||||
#include "shared/offline_compiler/source/ocloc_error_code.h"
|
||||
#include "shared/offline_compiler/source/offline_compiler.h"
|
||||
#include "shared/offline_compiler/source/utilities/safety_caller.h"
|
||||
#include "shared/source/compiler_interface/compiler_options.h"
|
||||
#include "shared/source/compiler_interface/intermediate_representations.h"
|
||||
#include "shared/source/compiler_interface/tokenized_string.h"
|
||||
#include "shared/source/device_binary_format/ar/ar_encoder.h"
|
||||
#include "shared/source/device_binary_format/elf/elf_encoder.h"
|
||||
#include "shared/source/device_binary_format/elf/ocl_elf.h"
|
||||
#include "shared/source/helpers/file_io.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/helpers/product_config_helper.h"
|
||||
#include "shared/source/os_interface/os_library.h"
|
||||
|
||||
#include "igfxfmid.h"
|
||||
#include "platforms.h"
|
||||
|
||||
@@ -7,15 +7,20 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shared/offline_compiler/source/offline_compiler.h"
|
||||
#include "shared/source/device_binary_format/ar/ar_encoder.h"
|
||||
#include "shared/source/utilities/arrayref.h"
|
||||
#include "shared/source/utilities/const_stringref.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class OclocArgHelper;
|
||||
|
||||
namespace NEO {
|
||||
namespace Ar {
|
||||
struct ArEncoder;
|
||||
}
|
||||
class OfflineCompiler;
|
||||
|
||||
bool requestedFatBinary(const std::vector<std::string> &args, OclocArgHelper *helper);
|
||||
inline bool requestedFatBinary(int argc, const char *argv[], OclocArgHelper *helper) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -53,9 +53,9 @@ class OclocFclFacade {
|
||||
MOCKABLE_VIRTUAL void populateFclInterface(IGC::PlatformTagOCL &handle, const HardwareInfo &hwInfo);
|
||||
|
||||
OclocArgHelper *argHelper{};
|
||||
std::unique_ptr<OsLibrary> fclLib{};
|
||||
CIF::RAII::UPtr_t<CIF::CIFMain> fclMain{};
|
||||
CIF::RAII::UPtr_t<IGC::FclOclDeviceCtxTagOCL> fclDeviceCtx{};
|
||||
std::unique_ptr<OsLibrary> fclLib;
|
||||
CIF::RAII::UPtr_t<CIF::CIFMain> fclMain;
|
||||
CIF::RAII::UPtr_t<IGC::FclOclDeviceCtxTagOCL> fclDeviceCtx;
|
||||
bool initialized{false};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -53,9 +53,9 @@ class OclocIgcFacade {
|
||||
void populateWithFeatures(IGC::IgcFeaturesAndWorkaroundsTagOCL *handle, const HardwareInfo &hwInfo, const CompilerProductHelper *compilerProductHelper) const;
|
||||
|
||||
OclocArgHelper *argHelper{};
|
||||
std::unique_ptr<OsLibrary> igcLib{};
|
||||
CIF::RAII::UPtr_t<CIF::CIFMain> igcMain{};
|
||||
CIF::RAII::UPtr_t<IGC::IgcOclDeviceCtxTagOCL> igcDeviceCtx{};
|
||||
std::unique_ptr<OsLibrary> igcLib;
|
||||
CIF::RAII::UPtr_t<CIF::CIFMain> igcMain;
|
||||
CIF::RAII::UPtr_t<IGC::IgcOclDeviceCtxTagOCL> igcDeviceCtx;
|
||||
bool initialized{false};
|
||||
};
|
||||
|
||||
|
||||
@@ -7,7 +7,10 @@
|
||||
|
||||
#include "offline_compiler.h"
|
||||
|
||||
#include "shared/offline_compiler/source/ocloc_arg_helper.h"
|
||||
#include "shared/offline_compiler/source/ocloc_error_code.h"
|
||||
#include "shared/offline_compiler/source/ocloc_fcl_facade.h"
|
||||
#include "shared/offline_compiler/source/ocloc_igc_facade.h"
|
||||
#include "shared/offline_compiler/source/queries.h"
|
||||
#include "shared/offline_compiler/source/utilities/get_git_version_info.h"
|
||||
#include "shared/source/compiler_interface/compiler_options.h"
|
||||
@@ -23,7 +26,6 @@
|
||||
#include "shared/source/helpers/debug_helpers.h"
|
||||
#include "shared/source/helpers/string.h"
|
||||
#include "shared/source/helpers/validators.h"
|
||||
#include "shared/source/os_interface/os_library.h"
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
|
||||
#include "platforms.h"
|
||||
|
||||
@@ -7,11 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shared/offline_compiler/source/ocloc_arg_helper.h"
|
||||
#include "shared/offline_compiler/source/ocloc_fcl_facade.h"
|
||||
#include "shared/offline_compiler/source/ocloc_igc_facade.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
#include "shared/source/utilities/arrayref.h"
|
||||
#include "shared/source/utilities/const_stringref.h"
|
||||
|
||||
@@ -22,11 +18,14 @@
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
class OclocArgHelper;
|
||||
|
||||
namespace NEO {
|
||||
|
||||
struct HardwareInfo;
|
||||
class OsLibrary;
|
||||
class CompilerCache;
|
||||
class ReleaseHelper;
|
||||
class OclocFclFacade;
|
||||
class OclocIgcFacade;
|
||||
|
||||
std::string convertToPascalCase(const std::string &inString);
|
||||
|
||||
@@ -135,7 +134,7 @@ All supported acronyms: %s.
|
||||
MOCKABLE_VIRTUAL void createDir(const std::string &path);
|
||||
void unifyExcludeIrFlags();
|
||||
void enforceFormat(std::string &format);
|
||||
HardwareInfo hwInfo;
|
||||
HardwareInfo hwInfo{};
|
||||
|
||||
uint32_t deviceConfig = {};
|
||||
std::string deviceName;
|
||||
@@ -185,8 +184,8 @@ All supported acronyms: %s.
|
||||
int revisionId = -1;
|
||||
uint64_t hwInfoConfig = 0u;
|
||||
|
||||
std::unique_ptr<OclocIgcFacade> igcFacade{nullptr};
|
||||
std::unique_ptr<OclocFclFacade> fclFacade{nullptr};
|
||||
std::unique_ptr<OclocIgcFacade> igcFacade;
|
||||
std::unique_ptr<OclocFclFacade> fclFacade;
|
||||
std::unique_ptr<CompilerCache> cache;
|
||||
std::unique_ptr<CompilerProductHelper> compilerProductHelper;
|
||||
std::unique_ptr<ReleaseHelper> releaseHelper;
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
|
||||
#include "shared/offline_compiler/source/ocloc_arg_helper.h"
|
||||
#include "shared/offline_compiler/source/ocloc_error_code.h"
|
||||
#include "shared/offline_compiler/source/ocloc_igc_facade.h"
|
||||
#include "shared/source/compiler_interface/intermediate_representations.h"
|
||||
#include "shared/source/device_binary_format/elf/elf_encoder.h"
|
||||
#include "shared/source/device_binary_format/elf/ocl_elf.h"
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
#include "shared/source/helpers/string.h"
|
||||
#include "shared/source/os_interface/os_library.h"
|
||||
|
||||
#include "cif/common/cif_main.h"
|
||||
#include "cif/import/library_api.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shared/offline_compiler/source/ocloc_igc_facade.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/utilities/arrayref.h"
|
||||
|
||||
@@ -24,6 +23,7 @@ class OclocArgHelper;
|
||||
namespace NEO {
|
||||
|
||||
class OsLibrary;
|
||||
class OclocIgcFacade;
|
||||
|
||||
class OfflineLinker {
|
||||
protected:
|
||||
@@ -76,7 +76,7 @@ class OfflineLinker {
|
||||
std::string options{};
|
||||
std::string internalOptions{};
|
||||
|
||||
std::unique_ptr<OclocIgcFacade> igcFacade{};
|
||||
std::unique_ptr<OclocIgcFacade> igcFacade;
|
||||
HardwareInfo hwInfo{};
|
||||
std::string buildLog{};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user