Skip to content

Implement a version getter for the graph compiler #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 10, 2024

Conversation

dchigarev
Copy link
Contributor

@dchigarev dchigarev commented May 6, 2024

Align with the GC API changes made in kurapov-peter/oneDNN#1 (implemented a getter function for GC version dnnl_graph_compiler_get_version)

@AndreyPavlenko
Copy link
Contributor

Just a proposal - what about using a single number versioning, without major, minor... etc? It much more easy to use the single number versions in the code, especially in macros. I don't see any benefits from the 3num versioning and also I don't think there will be a lot of versions here.

@dchigarev
Copy link
Contributor Author

Just a proposal - what about using a single number versioning, without major, minor... etc? It much more easy to use the single number versions in the code, especially in macros. I don't see any benefits from the 3num versioning and also I don't think there will be a lot of versions here.

oneDNN itself uses a struct to describe its version, so I thought it would be logical to follow the same pattern. A structure allows you to include additional fields like commit hash and probably other meta information regarding supported features (cpu/gpu build, etc). We can theoretically store the same info in an integer (except for commit hash) and provide a bunch of macroses to work with it (like level-zero for example), I don't have a strong preference here

@@ -1,6 +1,5 @@
cmake_minimum_required(VERSION 3.20)
project(GraphCompiler LANGUAGES C CXX)

project(GraphCompiler VERSION "0.1.0" LANGUAGES C CXX)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the ${PROJECT_VERSION}, this one should be bumped on new releases

@@ -0,0 +1,25 @@
include_guard()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the logic was mostly copied from oneDNN/cmake/version.cmake

@dchigarev dchigarev marked this pull request as ready for review May 8, 2024 15:01
@dchigarev dchigarev changed the title Add API version getter to the graph compiler Implement a version getter for the graph compiler May 8, 2024
@kurapov-peter kurapov-peter merged commit 7c97db0 into intel:main May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants