mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 22:43:00 +08:00
refactor: cleanup around options files
This patchset improves handling of library names for NEO's dynamic dependencies. Related-To: NEO-12747 Signed-off-by: Chodor, Jaroslaw <jaroslaw.chodor@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
8b7aa340ad
commit
d1ab846a5a
@@ -144,7 +144,7 @@ if(WIN32)
|
||||
${NEO_SHARED_DIRECTORY}/ail/windows/ail_configuration_windows.cpp
|
||||
${NEO_SHARED_DIRECTORY}/compiler_interface/windows/compiler_cache_windows.cpp
|
||||
${NEO_SHARED_DIRECTORY}/compiler_interface/windows/os_compiler_cache_helper.cpp
|
||||
${NEO_SHARED_DIRECTORY}/dll/windows/options_windows.cpp
|
||||
${NEO_SHARED_DIRECTORY}/dll/windows${BRANCH_DIR_SUFFIX}/options_windows.cpp
|
||||
${NEO_SHARED_DIRECTORY}/os_interface/windows/os_inc.h
|
||||
${NEO_SHARED_DIRECTORY}/os_interface/windows/os_library_win.cpp
|
||||
${NEO_SHARED_DIRECTORY}/os_interface/windows/os_library_win.h
|
||||
@@ -158,7 +158,7 @@ else()
|
||||
${NEO_SHARED_DIRECTORY}/ail/linux/ail_configuration_linux.cpp
|
||||
${NEO_SHARED_DIRECTORY}/compiler_interface/linux/compiler_cache_linux.cpp
|
||||
${NEO_SHARED_DIRECTORY}/compiler_interface/linux/os_compiler_cache_helper.cpp
|
||||
${NEO_SHARED_DIRECTORY}/dll/linux/options_linux.cpp
|
||||
${NEO_SHARED_DIRECTORY}/dll/linux${BRANCH_DIR_SUFFIX}/options_linux.cpp
|
||||
${NEO_SHARED_DIRECTORY}/os_interface/linux/os_inc.h
|
||||
${NEO_SHARED_DIRECTORY}/os_interface/linux/os_library_linux.cpp
|
||||
${NEO_SHARED_DIRECTORY}/os_interface/linux/os_library_linux.h
|
||||
|
||||
@@ -1,26 +1,8 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2021 Intel Corporation
|
||||
* Copyright (C) 2019-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/os_library.h"
|
||||
|
||||
#include "igc.opencl.h"
|
||||
|
||||
namespace Os {
|
||||
// Compiler library names
|
||||
const char *frontEndDllName = FCL_LIBRARY_NAME;
|
||||
const char *igcDllName = IGC_LIBRARY_NAME;
|
||||
const char *libvaDllName = "libva.so.2";
|
||||
const char *gdiDllName = "/usr/lib/wsl/lib/libdxcore.so";
|
||||
const char *dxcoreDllName = "/usr/lib/wsl/lib/libdxcore.so";
|
||||
|
||||
const char *sysFsPciPathPrefix = "/sys/bus/pci/devices/";
|
||||
const char *pciDevicesDirectory = "/dev/dri/by-path";
|
||||
const char *sysFsProcPathPrefix = "/proc";
|
||||
|
||||
// Metrics Library name
|
||||
const char *metricsLibraryDllName = "libigdml.so.1";
|
||||
} // namespace Os
|
||||
#include "options_linux.inl"
|
||||
|
||||
26
shared/source/dll/linux/options_linux.inl
Normal file
26
shared/source/dll/linux/options_linux.inl
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/os_library.h"
|
||||
|
||||
#include "igc.opencl.h"
|
||||
|
||||
namespace Os {
|
||||
// Compiler library names
|
||||
const char *frontEndDllName = FCL_LIBRARY_NAME;
|
||||
const char *igcDllName = IGC_LIBRARY_NAME;
|
||||
const char *libvaDllName = "libva.so.2";
|
||||
const char *gdiDllName = "/usr/lib/wsl/lib/libdxcore.so";
|
||||
const char *dxcoreDllName = "/usr/lib/wsl/lib/libdxcore.so";
|
||||
|
||||
const char *sysFsPciPathPrefix = "/sys/bus/pci/devices/";
|
||||
const char *pciDevicesDirectory = "/dev/dri/by-path";
|
||||
const char *sysFsProcPathPrefix = "/proc";
|
||||
|
||||
// Metrics Library name
|
||||
const char *metricsLibraryDllName = "libigdml.so.1";
|
||||
} // namespace Os
|
||||
@@ -1,23 +1,8 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Intel Corporation
|
||||
* Copyright (C) 2019-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "igc.opencl.h"
|
||||
|
||||
namespace Os {
|
||||
|
||||
const char *frontEndDllName = FCL_LIBRARY_NAME;
|
||||
const char *igcDllName = IGC_LIBRARY_NAME;
|
||||
const char *gdiDllName = "gdi32.dll";
|
||||
const char *dxcoreDllName = "dxcore.dll";
|
||||
|
||||
// Os specific Metrics Library name
|
||||
#if _WIN64
|
||||
const char *metricsLibraryDllName = "igdml64.dll";
|
||||
#else
|
||||
const char *metricsLibraryDllName = "igdml32.dll";
|
||||
#endif
|
||||
} // namespace Os
|
||||
#include "options_windows.inl"
|
||||
|
||||
23
shared/source/dll/windows/options_windows.inl
Normal file
23
shared/source/dll/windows/options_windows.inl
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "igc.opencl.h"
|
||||
|
||||
namespace Os {
|
||||
|
||||
const char *frontEndDllName = FCL_LIBRARY_NAME;
|
||||
const char *igcDllName = IGC_LIBRARY_NAME;
|
||||
const char *gdiDllName = "gdi32.dll";
|
||||
const char *dxcoreDllName = "dxcore.dll";
|
||||
|
||||
// Os specific Metrics Library name
|
||||
#if _WIN64
|
||||
const char *metricsLibraryDllName = "igdml64.dll";
|
||||
#else
|
||||
const char *metricsLibraryDllName = "igdml32.dll";
|
||||
#endif
|
||||
} // namespace Os
|
||||
@@ -205,7 +205,7 @@ set(neo_libult_SRCS_LINUX
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/linux/create_drm_memory_manager.cpp
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/linux/drm_memory_manager_fixture.cpp
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/linux/drm_neo_create.cpp
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/linux/options.cpp
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/linux${BRANCH_DIR_SUFFIX}/options.cpp
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/setup_external_dependencies_${DRIVER_MODEL}.cpp
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/linux/sys_calls_linux_ult.cpp
|
||||
)
|
||||
@@ -216,7 +216,7 @@ set(neo_libult_SRCS_WINDOWS
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/device_ult.cpp
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/mock_direct_submission_controller_enabled.cpp
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/windows/create_wddm_memory_manager.cpp
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/windows/options.cpp
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/windows${BRANCH_DIR_SUFFIX}/options.cpp
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/setup_external_dependencies_drm_or_wddm.cpp
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/windows/sys_calls.cpp
|
||||
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/windows/sys_calls_winmm.cpp
|
||||
|
||||
@@ -1,29 +1,8 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "common/gtsysinfo.h"
|
||||
#include "igfxfmid.h"
|
||||
#include "test_files_setup.h"
|
||||
|
||||
namespace Os {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// These options determine the Linux specific behavior for
|
||||
// the runtime unit tests
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#if defined(__linux__)
|
||||
const char *frontEndDllName = "_invalidFCL";
|
||||
const char *igcDllName = "_invalidIGC";
|
||||
const char *libvaDllName = nullptr;
|
||||
const char *testDllName = "libtest_dynamic_lib.so";
|
||||
const char *metricsLibraryDllName = "";
|
||||
const char *gdiDllName = "";
|
||||
const char *dxcoreDllName = "";
|
||||
#endif
|
||||
const char *sysFsPciPathPrefix = NEO_SHARED_TEST_FILES_DIR "/linux/devices/";
|
||||
const char *pciDevicesDirectory = NEO_SHARED_TEST_FILES_DIR "/linux/by-path";
|
||||
const char *sysFsProcPathPrefix = NEO_SHARED_TEST_FILES_DIR "/linux/proc/";
|
||||
} // namespace Os
|
||||
#include "options.inl"
|
||||
|
||||
29
shared/test/common/os_interface/linux/options.inl
Normal file
29
shared/test/common/os_interface/linux/options.inl
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "common/gtsysinfo.h"
|
||||
#include "igfxfmid.h"
|
||||
#include "test_files_setup.h"
|
||||
|
||||
namespace Os {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// These options determine the Linux specific behavior for
|
||||
// the runtime unit tests
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#if defined(__linux__)
|
||||
const char *frontEndDllName = "_invalidFCL";
|
||||
const char *igcDllName = "_invalidIGC";
|
||||
const char *libvaDllName = nullptr;
|
||||
const char *testDllName = "libtest_dynamic_lib.so";
|
||||
const char *metricsLibraryDllName = "";
|
||||
const char *gdiDllName = "";
|
||||
const char *dxcoreDllName = "";
|
||||
#endif
|
||||
const char *sysFsPciPathPrefix = NEO_SHARED_TEST_FILES_DIR "/linux/devices/";
|
||||
const char *pciDevicesDirectory = NEO_SHARED_TEST_FILES_DIR "/linux/by-path";
|
||||
const char *sysFsProcPathPrefix = NEO_SHARED_TEST_FILES_DIR "/linux/proc/";
|
||||
} // namespace Os
|
||||
@@ -1,22 +1,8 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "common/gtsysinfo.h"
|
||||
#include "igfxfmid.h"
|
||||
|
||||
namespace Os {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// These options determine the Windows specific behavior for
|
||||
// the runtime unit tests
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
const char *frontEndDllName = "";
|
||||
const char *igcDllName = "";
|
||||
const char *gdiDllName = "";
|
||||
const char *dxcoreDllName = "";
|
||||
const char *testDllName = "test_dynamic_lib.dll";
|
||||
const char *metricsLibraryDllName = "";
|
||||
} // namespace Os
|
||||
#include "options.inl"
|
||||
|
||||
22
shared/test/common/os_interface/windows/options.inl
Normal file
22
shared/test/common/os_interface/windows/options.inl
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "common/gtsysinfo.h"
|
||||
#include "igfxfmid.h"
|
||||
|
||||
namespace Os {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// These options determine the Windows specific behavior for
|
||||
// the runtime unit tests
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
const char *frontEndDllName = "";
|
||||
const char *igcDllName = "";
|
||||
const char *gdiDllName = "";
|
||||
const char *dxcoreDllName = "";
|
||||
const char *testDllName = "test_dynamic_lib.dll";
|
||||
const char *metricsLibraryDllName = "";
|
||||
} // namespace Os
|
||||
Reference in New Issue
Block a user