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
84 lines
2.6 KiB
Bash
Executable File
84 lines
2.6 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/02_elementwise/configs/bench) or the install tree
|
|
# (bin/hiptensor/configs/bench/02_elementwise).
|
|
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=("rank2_elementwise_permute_test"
|
|
"rank3_elementwise_permute_test"
|
|
"rank4_elementwise_permute_test"
|
|
"rank5_elementwise_permute_test"
|
|
"rank6_elementwise_permute_test"
|
|
"rank2_elementwise_binary_op_test"
|
|
"rank3_elementwise_binary_op_test"
|
|
"rank4_elementwise_binary_op_test"
|
|
"rank5_elementwise_binary_op_test"
|
|
"rank6_elementwise_binary_op_test"
|
|
"rank2_elementwise_trinary_op_test"
|
|
"rank3_elementwise_trinary_op_test"
|
|
"rank4_elementwise_trinary_op_test"
|
|
"rank5_elementwise_trinary_op_test"
|
|
"rank6_elementwise_trinary_op_test"
|
|
)
|
|
|
|
configs=("rank2_test_params.yaml"
|
|
"rank3_test_params.yaml"
|
|
"rank4_test_params.yaml"
|
|
"rank5_test_params.yaml"
|
|
"rank6_test_params.yaml"
|
|
"rank2_binary_op_test_params.yaml"
|
|
"rank3_binary_op_test_params.yaml"
|
|
"rank4_binary_op_test_params.yaml"
|
|
"rank5_binary_op_test_params.yaml"
|
|
"rank6_binary_op_test_params.yaml"
|
|
"rank2_trinary_op_test_params.yaml"
|
|
"rank3_trinary_op_test_params.yaml"
|
|
"rank4_trinary_op_test_params.yaml"
|
|
"rank5_trinary_op_test_params.yaml"
|
|
"rank6_trinary_op_test_params.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
|
|
|