Skip to content
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

Set the SO version correctly #2355

Merged
merged 3 commits into from
Oct 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ include(ROCMSetupVersion)
option(BUILD_DEV "Build for development purpose only" OFF)

rocm_setup_version(VERSION 2.8.0)
set(MIGRAPHX_SO_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
math(EXPR MIGRAPHX_SO_MAJOR_VERSION "(${PROJECT_VERSION_MAJOR} * 1000 * 1000) + (${PROJECT_VERSION_MINOR} * 1000) + ${PROJECT_VERSION_PATCH}")
set(MIGRAPHX_SO_VERSION ${MIGRAPHX_SO_MAJOR_VERSION}.0)
Copy link
Member

Choose a reason for hiding this comment

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

#2267 (comment)

Isn't the rocm_set_soversion already doing this ?

Copy link
Collaborator Author

@pfultz2 pfultz2 Oct 20, 2023

Choose a reason for hiding this comment

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

No its not. For 2.7 it will set the SO version to 2.7.{rocm_version}, which the minor version should be part of the major version(and no minor version), so it should be 2007000.0.{rocm_version}.

Thats because between 2.6 and 2.7 we want different major versions for the SO. So we want the versions to be 2007000.0.{rocm_version1} and 2006000.0.{rocm_version2}, not 2.7.{rocm_version1} and 2.6.{rocm_version2}(which incorrectly implies they are compatible).

Copy link
Member

Choose a reason for hiding this comment

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

@frepaul can you approve this? Would it result in any incompatibilities?


option( BUILD_SHARED_LIBS "Build as a shared library" ON )

Expand Down
Loading