refactor: cleanup unused code
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
parent
93ddf34c11
commit
a925afa1ab
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
@ -11,4 +11,6 @@
|
|||
#cmakedefine NEO_OCL_DRIVER_VERSION ${NEO_OCL_DRIVER_VERSION}
|
||||
#cmakedefine NEO_REVISION "${NEO_REVISION}"
|
||||
|
||||
#define NEO_VERSION_BUILD ${NEO_VERSION_BUILD}
|
||||
|
||||
#endif /* DRIVER_VERSION_H */
|
||||
|
|
|
@ -45,11 +45,6 @@ if(BUILD_WITH_L0)
|
|||
return()
|
||||
endif()
|
||||
|
||||
add_definitions(-DL0_PROJECT_VERSION_MAJOR="${PROJECT_VERSION_MAJOR}")
|
||||
add_definitions(-DL0_PROJECT_VERSION_MINOR="${PROJECT_VERSION_MINOR}")
|
||||
add_definitions(-DL0_PROJECT_VERSION_PATCH="${PROJECT_VERSION_PATCH}")
|
||||
add_definitions(-DNEO_VERSION_BUILD="${NEO_VERSION_BUILD}")
|
||||
|
||||
add_definitions(-DZE_ENABLE_OCL_INTEROP=1)
|
||||
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/VERSION" "${PROJECT_VERSION}")
|
||||
|
@ -209,7 +204,6 @@ if(BUILD_WITH_L0)
|
|||
include_directories(ddi)
|
||||
|
||||
# Create our shared library/DLL
|
||||
configure_file(ze_intel_gpu_version.h.in ${NEO_BUILD_DIR}/ze_intel_gpu_version.h)
|
||||
add_library(${TARGET_NAME_L0}
|
||||
SHARED
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
|
|
|
@ -19,11 +19,4 @@ target_sources(${L0_STATIC_LIB_NAME}
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/extension_function_address.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/host_pointer_manager.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/host_pointer_manager.h
|
||||
|
||||
)
|
||||
|
||||
if(NOT DEFINED L0_DRIVER_VERSION)
|
||||
set(L0_DRIVER_VERSION 1)
|
||||
endif()
|
||||
|
||||
configure_file(driver_version.h.in ${CMAKE_BINARY_DIR}/driver_version_l0.h) # Put Driver version into define
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper.h"
|
||||
#include "level_zero/core/source/image/image.h"
|
||||
|
||||
#include "driver_version_l0.h"
|
||||
#include "driver_version.h"
|
||||
|
||||
#include <cstdarg>
|
||||
#include <cstdlib>
|
||||
|
@ -112,7 +112,8 @@ ze_result_t DriverHandleImp::getApiVersion(ze_api_version_t *version) {
|
|||
}
|
||||
|
||||
ze_result_t DriverHandleImp::getProperties(ze_driver_properties_t *properties) {
|
||||
uint32_t versionBuild = static_cast<uint32_t>(strtoul(NEO_VERSION_BUILD, NULL, 10));
|
||||
uint32_t versionBuild = static_cast<uint32_t>(NEO_VERSION_BUILD);
|
||||
|
||||
properties->driverVersion = DriverHandleImp::initialDriverVersionValue + versionBuild;
|
||||
if (NEO::debugManager.flags.OverrideDriverVersion.get() > -1) {
|
||||
properties->driverVersion = static_cast<uint32_t>(NEO::debugManager.flags.OverrideDriverVersion.get());
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef L0_DRIVER_VERSION_H
|
||||
#define L0_DRIVER_VERSION_H
|
||||
|
||||
#define L0_DRIVER_VERSION @L0_DRIVER_VERSION@
|
||||
|
||||
#endif /* L0_DRIVER_VERSION_H */
|
|
@ -39,6 +39,8 @@
|
|||
#include "level_zero/core/test/unit_tests/mocks/mock_driver.h"
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_driver_handle.h"
|
||||
|
||||
#include "driver_version.h"
|
||||
|
||||
#include <bitset>
|
||||
|
||||
namespace L0 {
|
||||
|
@ -197,7 +199,8 @@ TEST_F(DriverVersionTest, WhenGettingDriverVersionThenExpectedDriverVersionIsRet
|
|||
ze_result_t res = driverHandle->getProperties(&properties);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
|
||||
|
||||
auto expectedDriverVersion = static_cast<uint32_t>(DriverHandleImp::initialDriverVersionValue + strtoul(NEO_VERSION_BUILD, NULL, 10));
|
||||
auto expectedDriverVersion = static_cast<uint32_t>(DriverHandleImp::initialDriverVersionValue);
|
||||
expectedDriverVersion += static_cast<uint32_t>(NEO_VERSION_BUILD);
|
||||
EXPECT_EQ(expectedDriverVersion, properties.driverVersion);
|
||||
}
|
||||
|
||||
|
@ -242,7 +245,8 @@ TEST_F(DriverVersionTest, givenCallToGetDriverPropertiesThenUuidIsSet) {
|
|||
EXPECT_NE(0u, uniqueId);
|
||||
|
||||
auto driverVersion = static_cast<uint32_t>(uuid & 0xFFFFFFFF);
|
||||
auto expectedDriverVersion = static_cast<uint32_t>(DriverHandleImp::initialDriverVersionValue + strtoul(NEO_VERSION_BUILD, NULL, 10));
|
||||
auto expectedDriverVersion = static_cast<uint32_t>(DriverHandleImp::initialDriverVersionValue);
|
||||
expectedDriverVersion += static_cast<uint32_t>(NEO_VERSION_BUILD);
|
||||
EXPECT_EQ(expectedDriverVersion, driverVersion);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (C) 2018-2022 Intel Corporation
|
||||
# Copyright (C) 2018-2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
@ -80,3 +80,6 @@ set(NEO_OCL_DRIVER_VERSION "${NEO_OCL_VERSION_MAJOR}.${NEO_OCL_VERSION_MINOR}.${
|
|||
# Level-Zero package version
|
||||
set(NEO_L0_VERSION_MAJOR 1)
|
||||
set(NEO_L0_VERSION_MINOR 3)
|
||||
|
||||
# Remove leading zeros
|
||||
string(REGEX REPLACE "^0+([0-9]+)" "\\1" NEO_VERSION_BUILD "${NEO_VERSION_BUILD}")
|
||||
|
|
Loading…
Reference in New Issue