Updated BLIS version string format

- Updated version string to match the recommended format
  “AOCL-BLIS 3.2.1 Build 20220727”.
- Fixed issues with include paths which was preventing compile time
  version sting definition passing via build commands.
- Removed version string determination based on git tag
  using ‘git describe’, version string will always be taken from
  the version file.

AMD-Internal: [CPUPL-2324]
Change-Id: Idc7edf1211f66d348ec3b5b43f2507c2b810f088
This commit is contained in:
Dipal M. Zambare
2022-08-12 05:33:05 +00:00
parent 4bca7f6f4a
commit c85bbfdb50
4 changed files with 8 additions and 60 deletions

View File

@@ -565,7 +565,8 @@ message( STATUS "Generating monolithic cblas header file :" ${CMD_OUTPUT})
# setting the blis version string
file (STRINGS "version" BLIS_VERSION)
set(BLIS_VERSION_STRING ${BLIS_VERSION})
add_definitions(-DBLIS_VERSION_STRING="AOCL BLIS ${BLIS_VERSION_STRING}")
string(TIMESTAMP BUILD_DATE "%Y%m%d")
add_definitions(-DBLIS_VERSION_STRING="AOCL-BLIS ${BLIS_VERSION_STRING} Build ${BUILD_DATE}")
if(BUILD_SHARED_LIBS)
add_library("${PROJECT_NAME}" SHARED ${CMAKE_SOURCE_DIR}/bli_config.h

View File

@@ -5,7 +5,7 @@
# libraries.
#
# Copyright (C) 2014, The University of Texas at Austin
# Copyright (C) 2020-2021, Advanced Micro Devices, Inc. All rights reserved.
# Copyright (C) 2020-2022, Advanced Micro Devices, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
@@ -1084,6 +1084,7 @@ BLIS_H_FLAT := $(BASE_INC_PATH)/$(BLIS_H)
# header files.
CBLAS_H := cblas.h
CBLAS_H_SRC_PATH := $(filter %/$(CBLAS_H), $(FRAME_H99_FILES))
CBLAS_H_DIRPATH := $(dir $(CBLAS_H_SRC_PATH))
# Construct the path to what will be the intermediate flattened/monolithic
# cblas.h file.

58
configure vendored
View File

@@ -1819,67 +1819,13 @@ try_assemble()
set_default_version()
{
local gitdir version_file gd_stderr git_describe_str git_error new_version_str
gitdir='.git'
# The path to the version file.
version_file=$1
echo "${script_name}: determining default version string."
# Check if the .git dir exists; if it does not, we do nothing.
if [ -d "${dist_path}/${gitdir}" ]; then
echo "${script_name}: found '${gitdir}' directory; assuming git clone."
echo "${script_name}: executing: git describe --tags."
gd_stderr="git_describe_stderr.txt"
# Query git for the version string, which is simply the current tag,
# followed by a number signifying how many commits have transpired
# since the tag, followed by a 'g' and a shortened hash tab. Capture
# stderr to a file.
git_describe_str=$(git -C ${dist_path} describe --tags 2> ${gd_stderr})
# Pull in whatever error message was generated, if any, and delete
# the file.
git_error=$(cat ${gd_stderr})
# Remove the stderr file.
rm -f ${gd_stderr}
# If git returned an error, don't do anything.
if [ -n "${git_error}" ]; then
echo "${script_name}: git returned an error: '${git_error}'."
echo "${script_name}: using string from unmodified version file."
# Use what's in the version file as-is.
version="AOCL BLIS $(cat "${version_file}")"
else
echo "${script_name}: got back ${git_describe_str}."
# Strip off the commit hash label.
new_version_str=$(echo ${git_describe_str} | cut -d- -f2)
echo "${script_name}: truncating to ${new_version_str}."
# Write the new version string to the version file.
#echo "${new_version_str}" > ${version_file}
# Set the version variable.
version="AOCL BLIS ${new_version_str}"
fi
else
echo "${script_name}: could not find '${gitdir}' directory; using unmodified version file."
# Use what's in the version file as-is.
version="AOCL BLIS $(cat "${version_file}")"
fi
# Use what's in the version file as-is.
version="AOCL-BLIS $(cat "${version_file}") Build $(date +%Y%m%d)"
}

View File

@@ -5,7 +5,7 @@
libraries.
Copyright (C) 2014, The University of Texas at Austin
Copyright (C) 2018 - 2019, Advanced Micro Devices, Inc.
Copyright (C) 2018 - 2022, Advanced Micro Devices, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -40,7 +40,7 @@
// This string gets defined via -D on the command line when BLIS is compiled.
// This string is (or rather, should be) only used here.
static char* bli_version_str = "3.2.1"; //BLIS_VERSION_STRING;
static char* bli_version_str = BLIS_VERSION_STRING;
static char* bli_int_type_size_str = STRINGIFY_INT( BLIS_INT_TYPE_SIZE );
char* bli_info_get_version_str( void ) { return bli_version_str; }