From b53a8a63771d61171ba37ea34967ea4a09b0da53 Mon Sep 17 00:00:00 2001 From: Srinivasan Subramanian Date: Wed, 18 Sep 2019 18:26:09 -0700 Subject: [PATCH] Avoid shared library conflicts across multiple ROCM version Adding patch number based on ROCM build/release to have unique file name for libraries across multiple versions of ROCM. Signed-off-by: Pruthvi Madugundu Change-Id: I58d665b0e7d577b5bd7a6000d1202a0242672727 [ROCm/ROCR-Runtime commit: 54d94d02bd650de56039a9e6756693936baf0b2d] --- projects/rocr-runtime/runtime/hsa-ext-image/CMakeLists.txt | 7 ++++++- .../rocr-runtime/runtime/hsa-runtime-tools/CMakeLists.txt | 7 ++++++- projects/rocr-runtime/runtime/hsa-runtime/CMakeLists.txt | 7 ++++++- .../runtime/packages/hsa-ext-rocr-dev/CMakeLists.txt | 3 +++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/projects/rocr-runtime/runtime/hsa-ext-image/CMakeLists.txt b/projects/rocr-runtime/runtime/hsa-ext-image/CMakeLists.txt index 31686837d3..5e312bcf32 100755 --- a/projects/rocr-runtime/runtime/hsa-ext-image/CMakeLists.txt +++ b/projects/rocr-runtime/runtime/hsa-ext-image/CMakeLists.txt @@ -36,7 +36,12 @@ add_definitions ( -D BRAHMA_BUILD=1 ) get_version( "1.1.9") set(SO_MAJOR 1) set(SO_MINOR 1) -set(SO_PATCH 9) +if ( ${ROCM_PATCH_VERSION} ) + set ( SO_PATCH ${ROCM_PATCH_VERSION}) + set ( VERSION_PATCH ${ROCM_PATCH_VERSION}) +else () + set(SO_PATCH 9) +endif () set( SO_VERSION_STRING "${SO_MAJOR}.${SO_MINOR}.${SO_PATCH}" ) set( PACKAGE_VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_COMMIT_COUNT}-${VERSION_JOB}-${VERSION_HASH}" ) diff --git a/projects/rocr-runtime/runtime/hsa-runtime-tools/CMakeLists.txt b/projects/rocr-runtime/runtime/hsa-runtime-tools/CMakeLists.txt index e4830a744d..33fd390af4 100755 --- a/projects/rocr-runtime/runtime/hsa-runtime-tools/CMakeLists.txt +++ b/projects/rocr-runtime/runtime/hsa-runtime-tools/CMakeLists.txt @@ -35,7 +35,12 @@ add_definitions ( -D HSA_DEPRECATED= ) get_version( "1.1.9") set(SO_MAJOR 1) set(SO_MINOR 1) -set(SO_PATCH 9) +if ( ${ROCM_PATCH_VERSION} ) + set ( SO_PATCH ${ROCM_PATCH_VERSION}) + set ( VERSION_PATCH ${ROCM_PATCH_VERSION}) +else () + set(SO_PATCH 9) +endif () set( SO_VERSION_STRING "${SO_MAJOR}.${SO_MINOR}.${SO_PATCH}" ) set( PACKAGE_VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_COMMIT_COUNT}-${VERSION_JOB}-${VERSION_HASH}" ) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/CMakeLists.txt b/projects/rocr-runtime/runtime/hsa-runtime/CMakeLists.txt index f292182295..7ca7e8bf22 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/CMakeLists.txt +++ b/projects/rocr-runtime/runtime/hsa-runtime/CMakeLists.txt @@ -84,7 +84,12 @@ endif() get_version ( "1.1.9" ) set (SO_MAJOR 1) set (SO_MINOR 1) -set (SO_PATCH 9) +if ( ${ROCM_PATCH_VERSION} ) + set ( SO_PATCH ${ROCM_PATCH_VERSION}) + set ( VERSION_PATCH ${ROCM_PATCH_VERSION}) +else () + set(SO_PATCH 9) +endif () set ( SO_VERSION_STRING "${SO_MAJOR}.${SO_MINOR}.${SO_PATCH}" ) set ( PACKAGE_VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_COMMIT_COUNT}-${VERSION_JOB}-${VERSION_HASH}" ) diff --git a/projects/rocr-runtime/runtime/packages/hsa-ext-rocr-dev/CMakeLists.txt b/projects/rocr-runtime/runtime/packages/hsa-ext-rocr-dev/CMakeLists.txt index ae87a68521..532a4f1caf 100644 --- a/projects/rocr-runtime/runtime/packages/hsa-ext-rocr-dev/CMakeLists.txt +++ b/projects/rocr-runtime/runtime/packages/hsa-ext-rocr-dev/CMakeLists.txt @@ -55,6 +55,9 @@ include ( utils ) ## Get the package version. get_version ( "1.1.9" ) +if ( ${ROCM_PATCH_VERSION} ) + set ( VERSION_PATCH ${ROCM_PATCH_VERSION}) +endif () set( PACKAGE_VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_COMMIT_COUNT}-${VERSION_JOB}-${VERSION_HASH}" )