CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
119 lines
3.5 KiB
Bash
Executable File
119 lines
3.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# ########################################################################
|
|
# Copyright (C) 2019-2025 Advanced Micro Devices, Inc. All rights Reserved.
|
|
#
|
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
# of this software and associated documentation files (the "Software"), to deal
|
|
# in the Software without restriction, including without limitation the rights
|
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
# copies of the Software, and to permit persons to whom the Software is
|
|
# furnished to do so, subject to the following conditions:
|
|
#
|
|
# The above copyright notice and this permission notice shall be included in
|
|
# all copies or substantial portions of the Software.
|
|
#
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
# THE SOFTWARE.
|
|
#
|
|
# ########################################################################
|
|
|
|
|
|
# Helper function
|
|
function display_help()
|
|
{
|
|
echo "rocSPARSE benchmark helper script"
|
|
echo " [-h|--help] prints this help message"
|
|
echo " [-d|--device] select device"
|
|
echo " [-p|--path] path to rocsparse-bench"
|
|
echo " [-m|--matrices-dir] directory of matrix files, this option discards the environment variable MATRICES_DIR. "
|
|
}
|
|
|
|
# Check if getopt command is installed
|
|
type getopt > /dev/null
|
|
if [[ $? -ne 0 ]]; then
|
|
echo "This script uses getopt to parse arguments; try installing the util-linux package";
|
|
exit 1;
|
|
fi
|
|
|
|
dev=0
|
|
path=../../build/release/clients/staging
|
|
|
|
# Parse command line parameters
|
|
getopt -T
|
|
if [[ $? -eq 4 ]]; then
|
|
GETOPT_PARSE=$(getopt --name "${0}" --longoptions help,device:,path:,matrices-dir:,samples-dir: --options hd:p:m:s: -- "$@")
|
|
else
|
|
echo "Need a new version of getopt"
|
|
exit 1
|
|
fi
|
|
|
|
if [[ $? -ne 0 ]]; then
|
|
echo "getopt invocation failed; could not parse the command line";
|
|
exit 1
|
|
fi
|
|
|
|
if [[ ( ${MATRICES_DIR} == "" ) ]];then
|
|
matrices_dir=./matrices
|
|
else
|
|
matrices_dir=${MATRICES_DIR}
|
|
fi
|
|
|
|
samples_dir=../samples
|
|
|
|
eval set -- "${GETOPT_PARSE}"
|
|
|
|
while true; do
|
|
case "${1}" in
|
|
-m|--matrices-dir)
|
|
matrices_dir=${2}
|
|
shift 2 ;;
|
|
-s|--samples-dir)
|
|
samples_dir=${2}
|
|
shift 2 ;;
|
|
-h|--help)
|
|
display_help
|
|
exit 0
|
|
;;
|
|
-d|--device)
|
|
dev=${2}
|
|
shift 2 ;;
|
|
-p|--path)
|
|
path=${2}
|
|
shift 2 ;;
|
|
--) shift ; break ;;
|
|
*) echo "Unexpected command line parameter received; aborting";
|
|
exit 1
|
|
;;
|
|
esac
|
|
done
|
|
|
|
bench=$path/rocsparse-bench
|
|
|
|
# Check if binary is available
|
|
if [ ! -f $bench ]; then
|
|
echo $bench not found, exit...
|
|
exit 1
|
|
else
|
|
echo ">>" $(realpath $(ldd $bench | grep rocsparse | awk '{print $3;}'))
|
|
fi
|
|
|
|
# Generate logfile name
|
|
logname=dellmv_$(date +'%Y%m%d%H%M%S').log
|
|
truncate -s 0 $logname
|
|
|
|
which=`ls $matrices_dir/*.csr`
|
|
filenames=`for i in $which;do basename $i;done`
|
|
|
|
arguments=`python3 ${samples_dir}/readConfig.py ${samples_dir}/qa/ellmv/double.json`
|
|
|
|
# Run ellmv for all matrices available
|
|
for filename in $filenames; do
|
|
$bench --matrices-dir $matrices_dir $(eval echo ${arguments}) 2>&1 | tee -a $logname
|
|
done
|