feat(rocshmem): [scripts] add --variant-dir option to run_perf_compare.sh#8579
feat(rocshmem): [scripts] add --variant-dir option to run_perf_compare.sh#8579omor1 wants to merge 7 commits into
Conversation
…e.sh Allow using pre-built variants in the run_perf_compare.sh script. Signed-off-by: Omri Mor <Omri.Mor@amd.com>
… run_perf_compare.sh Signed-off-by: Omri Mor <Omri.Mor@amd.com>
…pare.sh Signed-off-by: Omri Mor <Omri.Mor@amd.com>
run_perf_compare.sh -h|--help would print out the entire script, instead of only the help text embedded as a comment. Signed-off-by: Omri Mor <Omri.Mor@amd.com>
…mpare.sh Signed-off-by: Omri Mor <Omri.Mor@amd.com>
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
There was a problem hiding this comment.
Pull request overview
This PR enhances the rocshmem performance comparison workflow by allowing additional comparison variants to be provided as pre-built build directories (similar to existing baseline/branch directory options), and it refines --help output behavior.
Changes:
- Added
--variant-dir SPECto allow specifying additional named variants as pre-built build directories. - Updated variant parsing to consistently capture
NAME:ENV:ARG/PATHcomponents. - Reworked
-h|--helphandling to print only the script’s help header.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Copilot noted that '\+' (and '\?') in basic regex is a GNU sed extension. Use extended regex expressions (sed -E) instead; it's clearer in any case. Signed-off-by: Omri Mor <Omri.Mor@amd.com>
…pare.sh --help Signed-off-by: Omri Mor <Omri.Mor@amd.com>
| for dir_spec in "${VARIANT_DIR_SPECS[@]}"; do | ||
| IFS=':' read -r vname venv vdir <<< "$dir_spec" | ||
| env_prefix="" | ||
| IFS=',' read -ra pairs <<< "$venv" | ||
| for pair in "${pairs[@]}"; do | ||
| [[ -n "$pair" ]] && env_prefix+="export $pair; " | ||
| done | ||
| run_iterations "$vdir" "logs-${SUITE}" "$vname" "$env_prefix" | ||
| done |
There was a problem hiding this comment.
@abouteiller is this a concern, I don't think path existence is checked for --baseline-dir or --branch-dir either?
| # --variant-dir SPEC Additional named variant: NAME:ENV1=V1,...:PATH | ||
| # NAME - Label used in plots | ||
| # ENV1=V1,… - Comma-separated environment variables to set at runtime | ||
| # PATH - Use PATH as pre-built variant build (skips variant build) | ||
| # May be repeated for multiple variants. |
There was a problem hiding this comment.
This is the same as existing practice for --variant-args, @abouteiller is this a concern?
Motivation
The baseline and comparison branches could be input as pre-built directories to the
run_perf_compare.shscript, but additional variants could not. Adding a--variant-diroption adds consistency and simplifies some workflows.Technical Details
--variant-dir SPECoption torun_perf_compare.sh.Each
SPECis in the formNAME:ENV1=V1,...:PATH, whereNAMEis the label used in plotsENV1=V1,...is a list of comma-separate environment variables to set at runtime-h|--helpoption to only print out the script's help text.Test Result
Testing using #7217 with a pre-built variant that builds only a single GDA provider.
Submission Checklist