-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into cb-by-default
- Loading branch information
Showing
32 changed files
with
334 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (C) 2023-2025 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#include "openvino/genai/version.hpp" | ||
|
||
namespace ov { | ||
namespace genai { | ||
|
||
const Version get_version() { | ||
const static Version version = { | ||
"@OpenVINOGenAI_FULL_VERSION@", | ||
"OpenVINO GenAI version", | ||
}; | ||
|
||
return version; | ||
} | ||
|
||
} // namespace genai | ||
} // namespace ov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright (C) 2023-2025 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#pragma once | ||
|
||
#include "openvino/core/version.hpp" | ||
#include "openvino/genai/visibility.hpp" | ||
|
||
/** | ||
* OpenVINO GenAI major version | ||
*/ | ||
#define OPENVINO_GENAI_VERSION_MAJOR @OpenVINOGenAI_VERSION_MAJOR@ | ||
|
||
/** | ||
* OpenVINO GenAI minor version | ||
*/ | ||
#define OPENVINO_GENAI_VERSION_MINOR @OpenVINOGenAI_VERSION_MINOR@ | ||
|
||
/** | ||
* OpenVINO GenAI patch version | ||
*/ | ||
#define OPENVINO_GENAI_VERSION_PATCH @OpenVINOGenAI_VERSION_PATCH@ | ||
|
||
namespace ov { | ||
namespace genai { | ||
|
||
/** | ||
* Returns OpenVINO GenAI full version including git commit and hash information in form of: | ||
* <MAJOR>.<MINOR>.<PATCH>.<REVISION>-<COMMIT NUMBER>-<COMMIT HASH>[-<BRANCH SUFFIX>] | ||
*/ | ||
OPENVINO_EXTERN_C OPENVINO_GENAI_EXPORTS const ov::Version OPENVINO_CDECL get_version(); | ||
|
||
} // namespace genai | ||
} // namespace ov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Copyright (C) 2018-2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
find_package(Git QUIET) | ||
|
||
function(ov_genai_branch_name VAR) | ||
if(GIT_FOUND) | ||
execute_process( | ||
COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD | ||
WORKING_DIRECTORY ${OpenVINOGenAI_SOURCE_DIR} | ||
OUTPUT_VARIABLE GIT_BRANCH | ||
RESULT_VARIABLE EXIT_CODE | ||
OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
if(EXIT_CODE EQUAL 0) | ||
set(${VAR} ${GIT_BRANCH} PARENT_SCOPE) | ||
endif() | ||
endif() | ||
endfunction() | ||
|
||
function(ov_genai_commit_hash VAR) | ||
if(GIT_FOUND) | ||
execute_process( | ||
COMMAND ${GIT_EXECUTABLE} rev-parse --short=11 HEAD | ||
WORKING_DIRECTORY ${OpenVINOGenAI_SOURCE_DIR} | ||
OUTPUT_VARIABLE GIT_COMMIT_HASH | ||
RESULT_VARIABLE EXIT_CODE | ||
OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
if(EXIT_CODE EQUAL 0) | ||
set(${VAR} ${GIT_COMMIT_HASH} PARENT_SCOPE) | ||
endif() | ||
endif() | ||
endfunction() | ||
|
||
function(ov_genai_commit_number VAR) | ||
set(GIT_COMMIT_NUMBER_FOUND OFF) | ||
if(GIT_FOUND) | ||
execute_process( | ||
COMMAND ${GIT_EXECUTABLE} rev-list --count HEAD | ||
WORKING_DIRECTORY ${OpenVINOGenAI_SOURCE_DIR} | ||
OUTPUT_VARIABLE GIT_COMMIT_NUMBER | ||
RESULT_VARIABLE EXIT_CODE | ||
OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
if(EXIT_CODE EQUAL 0) | ||
set(GIT_COMMIT_NUMBER_FOUND ON) | ||
set(${VAR} ${GIT_COMMIT_NUMBER} PARENT_SCOPE) | ||
endif() | ||
endif() | ||
if(NOT GIT_COMMIT_NUMBER_FOUND) | ||
# set zeros since git is not available | ||
set(${VAR} "000" PARENT_SCOPE) | ||
endif() | ||
endfunction() | ||
|
||
function(ov_genai_full_version full_version) | ||
if(GIT_FOUND) | ||
ov_genai_branch_name(GIT_BRANCH) | ||
ov_genai_commit_hash(GIT_COMMIT_HASH) | ||
ov_genai_commit_number(GIT_COMMIT_NUMBER) | ||
|
||
if(NOT GIT_BRANCH MATCHES "^(master|HEAD)$") | ||
set(GIT_BRANCH_POSTFIX "-${GIT_BRANCH}") | ||
endif() | ||
|
||
set(${full_version} "${OpenVINOGenAI_VERSION}-${GIT_COMMIT_NUMBER}-${GIT_COMMIT_HASH}${GIT_BRANCH_POSTFIX}" PARENT_SCOPE) | ||
else() | ||
set(${full_version} "${OpenVINOGenAI_VERSION}" PARENT_SCOPE) | ||
endif() | ||
endfunction() | ||
|
||
ov_genai_full_version(OpenVINOGenAI_FULL_VERSION) | ||
message(STATUS "OpenVINO GenAI full version: ${OpenVINOGenAI_FULL_VERSION}") |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.