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

Add --keep-build-tmp for hipSPARSELt #146

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
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
12 changes: 10 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function display_help()
echo " [--address-sanitizer] build with address sanitizer"
echo " [--codecoverage] build with code coverage profiling enabled"
echo " [--build_dir] Specify the name of the build folder"

echo " [--keep-build-tmp] do not remove the temporary build artifacts or build_tmp"
}

# This function is helpful for dockerfiles that do not have sudo installed, but the default user is root
Expand Down Expand Up @@ -320,6 +320,7 @@ tensile_version=
build_tensile=true
tensile_msgpack_backend=true
build_dir_user=build
keep_build_tmp=false

if ! [ -z ${ROCM_PATH+x} ]; then
rocm_path=${ROCM_PATH}
Expand All @@ -332,7 +333,7 @@ fi
# check if we have a modern version of getopt that can handle whitespace and long parameters
getopt -T
if [[ $? -eq 4 ]]; then
GETOPT_PARSE=$(getopt --name "${0}" --longoptions help,install,clients,dependencies,debug,cuda,use-cuda,static,relocatable,codecoverage,relwithdebinfo,address-sanitizer,architecture:,cpu_ref_lib:,logic:,cov:,fork:,branch:,test_local_path:,use-custom-version:,build_dir:, --options hicdgrkl:o:f:b:t:nu::a: -- "$@")
GETOPT_PARSE=$(getopt --name "${0}" --longoptions help,install,clients,dependencies,debug,cuda,use-cuda,static,relocatable,codecoverage,relwithdebinfo,address-sanitizer,architecture:,cpu_ref_lib:,logic:,cov:,fork:,branch:,test_local_path:,use-custom-version:,build_dir:,keep-build-tmp --options hicdgrkl:o:f:b:t:nu::a: -- "$@")
else
echo "Need a new version of getopt"
exit 1
Expand Down Expand Up @@ -429,6 +430,9 @@ while true; do
--build_dir)
build_dir_user=${2}
shift 2;;
--keep-build-tmp)
keep_build_tmp=true
shift ;;
--) shift ; break ;;
*) echo "Unexpected command line parameter received: '${1}'; aborting";
exit 1
Expand Down Expand Up @@ -642,6 +646,10 @@ pushd .
tensile_opt="${tensile_opt} -DTensile_LIBRARY_FORMAT=yaml"
fi

if [[ "${keep_build_tmp}" == true ]]; then
tensile_opt="${tensile_opt} -DTensile_KEEP_BUILD_TMP=ON"
fi

echo $cmake_common_options
cmake_common_options="${cmake_common_options} ${tensile_opt}"

Expand Down
3 changes: 3 additions & 0 deletions library/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ if(NOT BUILD_CUDA)
if(PACKAGE_TENSILE_LIBRARY)
set(Tensile_Options ${Tensile_Options} GENERATE_PACKAGE)
endif()
if(Tensile_KEEP_BUILD_TMP)
set(Tensile_Options ${Tensile_Options} KEEP_BUILD_TMP)
endif()

if(Tensile_BUILD_ID)
set(Options ${Options} "--build-id=${Tensile_BUILD_ID}")
Expand Down
Loading