Files
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

100 lines
3.5 KiB
Bash
Executable File

#!/usr/bin/env bash
# Copyright (C) 2022-2025 Advanced Micro Devices, Inc. All rights reserved.
set -eux
# Check if three arguments are provided
if [ $# -ne 3 ]; then
echo "Usage: $0 <binary_dir> <config_dir> <output_dir>"
exit 1
fi
binary_dir="${1%/}/"
config_dir="${2%/}/"
# Both directories must exist; fail early (and loudly) otherwise. The config
# directory is passed in, so this works whether the benchmark yamls come from
# the source tree (test/01_contraction/configs/bench) or the install tree
# (bin/hiptensor/configs/bench/01_contraction).
if [ ! -d "$binary_dir" ]; then
echo "ERROR: binary directory does not exist: $binary_dir" >&2
exit 1
fi
if [ ! -d "$config_dir" ]; then
echo "ERROR: config directory does not exist: $config_dir" >&2
exit 1
fi
output_dir="${3%/}/"
cold_runs=1
hot_runs=5
validate=OFF
if [ -d "$binary_dir" ]; then
# setup output directory for benchmarks
mkdir -p "$output_dir"
tests=("bilinear_contraction_test_m1n1k1"
"bilinear_contraction_test_m2n2k2"
"bilinear_contraction_test_m3n3k3"
"bilinear_contraction_test_m4n4k4"
"bilinear_contraction_test_m5n5k5"
"bilinear_contraction_test_m6n6k6"
"complex_bilinear_contraction_test_m1n1k1"
"complex_bilinear_contraction_test_m2n2k2"
"complex_bilinear_contraction_test_m3n3k3"
"complex_bilinear_contraction_test_m4n4k4"
"complex_bilinear_contraction_test_m5n5k5"
"complex_bilinear_contraction_test_m6n6k6"
"scale_contraction_test_m1n1k1"
"scale_contraction_test_m2n2k2"
"scale_contraction_test_m3n3k3"
"scale_contraction_test_m4n4k4"
"scale_contraction_test_m5n5k5"
"scale_contraction_test_m6n6k6"
"complex_scale_contraction_test_m1n1k1"
"complex_scale_contraction_test_m2n2k2"
"complex_scale_contraction_test_m3n3k3"
"complex_scale_contraction_test_m4n4k4"
"complex_scale_contraction_test_m5n5k5"
"complex_scale_contraction_test_m6n6k6")
configs=("bilinear_test_params_rank1.yaml"
"bilinear_test_params_rank2.yaml"
"bilinear_test_params_rank3.yaml"
"bilinear_test_params_rank4.yaml"
"bilinear_test_params_rank5.yaml"
"bilinear_test_params_rank6.yaml"
"complex_bilinear_test_params_rank1.yaml"
"complex_bilinear_test_params_rank2.yaml"
"complex_bilinear_test_params_rank3.yaml"
"complex_bilinear_test_params_rank4.yaml"
"complex_bilinear_test_params_rank5.yaml"
"complex_bilinear_test_params_rank6.yaml"
"scale_test_params_rank1.yaml"
"scale_test_params_rank2.yaml"
"scale_test_params_rank3.yaml"
"scale_test_params_rank4.yaml"
"scale_test_params_rank5.yaml"
"scale_test_params_rank6.yaml"
"complex_scale_test_params_rank1.yaml"
"complex_scale_test_params_rank2.yaml"
"complex_scale_test_params_rank3.yaml"
"complex_scale_test_params_rank4.yaml"
"complex_scale_test_params_rank5.yaml"
"complex_scale_test_params_rank6.yaml")
arrayLength=${#tests[@]}
# run benchmarks
for (( i=0; i<${arrayLength}; i++ )); do
if [[ -e $binary_dir && ! -L $binary_dir/${tests[$i]} ]]; then
$binary_dir${tests[$i]} -y $config_dir/${configs[$i]} \
-o $output_dir${tests[$i]}".csv" --cold_runs $cold_runs --hot_runs $hot_runs -v $validate
fi
done
fi