Skip to content
Merged
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
16 changes: 15 additions & 1 deletion projects/hipsparselt/install-host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ function display_help()
echo " [-g|--debug] -DCMAKE_BUILD_TYPE=Debug (default is =Release)"
echo " [-k|--relwithdebinfo] -DCMAKE_BUILD_TYPE=RelWithDebInfo"
echo " [--static] build static library"
echo " [--therock] build against a staged hipBLASLt package (find_package) instead of add_subdirectory"
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"
Expand Down Expand Up @@ -320,6 +321,7 @@ install_prefix=hipsparselt-install
rocm_path=/opt/rocm
build_relocatable=false
build_address_sanitizer=false
build_therock=false
gpu_architecture=all
cpu_ref_lib=blis
script_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
Expand Down Expand Up @@ -349,7 +351,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:,disable-hipsparselt-marker,enable-tensile-marker,keep-build-tmp --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,therock,architecture:,cpu_ref_lib:,logic:,cov:,fork:,branch:,test_local_path:,use-custom-version:,build_dir:,disable-hipsparselt-marker,enable-tensile-marker,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 @@ -390,6 +392,9 @@ while true; do
--static)
build_static=true
shift ;;
--therock)
build_therock=true
shift ;;
--address-sanitizer)
build_address_sanitizer=true
compiler=amdclang++
Expand Down Expand Up @@ -619,6 +624,15 @@ pushd .
printf "Forcing compiler to amdclang++ for static library.\n"
fi

# Consume a staged hipBLASLt package (find_package) instead of forking its
# build tree via add_subdirectory. This is the path that links the shared
# libtensilelite-host.so rather than recompiling TensileLite into
# libhipsparselt.so. Requires hipBLASLt to be installed under ${rocm_path}.
if [[ "${build_therock}" == true ]]; then
cmake_common_options="${cmake_common_options} -DHIPSPARSELT_ENABLE_THEROCK=ON"
printf "Building against the staged hipBLASLt package (HIPSPARSELT_ENABLE_THEROCK=ON).\n"
fi

# clients
if [[ "${build_clients}" == true ]]; then
pushd .
Expand Down
6 changes: 6 additions & 0 deletions projects/hipsparselt/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def _legacy_argv(
debug: bool,
cuda: bool,
static: bool,
therock: bool,
address_sanitizer: bool,
relwithdebinfo: bool,
codecoverage: bool,
Expand Down Expand Up @@ -70,6 +71,8 @@ def _legacy_argv(
argv.append("--cuda")
if static:
argv.append("--static")
if therock:
argv.append("--therock")
if address_sanitizer:
argv.append("--address-sanitizer")
if relwithdebinfo:
Expand Down Expand Up @@ -125,6 +128,7 @@ def _legacy_argv(
"debug": "Debug CMake build (-g).",
"cuda": "CUDA backend (--cuda).",
"static": "Static library (--static).",
"therock": "Build against a staged hipBLASLt package instead of add_subdirectory (--therock).",
"address_sanitizer": "AddressSanitizer (--address-sanitizer).",
"relwithdebinfo": "RelWithDebInfo (-k).",
"codecoverage": "Code coverage (--codecoverage).",
Expand Down Expand Up @@ -156,6 +160,7 @@ def build(
debug=False,
cuda=False,
static=False,
therock=False,
address_sanitizer=False,
relwithdebinfo=False,
codecoverage=False,
Expand Down Expand Up @@ -192,6 +197,7 @@ def build(
debug=debug,
cuda=cuda,
static=static,
therock=therock,
address_sanitizer=address_sanitizer,
relwithdebinfo=relwithdebinfo,
codecoverage=codecoverage,
Expand Down
Loading