Skip to content

feat(rocshmem): [scripts] add --variant-dir option to run_perf_compare.sh#8579

Open
omor1 wants to merge 7 commits into
developfrom
users/omor1/rocshmem/feature/run_perf_compare_variant_dir
Open

feat(rocshmem): [scripts] add --variant-dir option to run_perf_compare.sh#8579
omor1 wants to merge 7 commits into
developfrom
users/omor1/rocshmem/feature/run_perf_compare_variant_dir

Conversation

@omor1

@omor1 omor1 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Motivation

The baseline and comparison branches could be input as pre-built directories to the run_perf_compare.sh script, but additional variants could not. Adding a --variant-dir option adds consistency and simplifies some workflows.

Technical Details

  • Add --variant-dir SPEC option to run_perf_compare.sh.
    Each SPEC is in the form NAME:ENV1=V1,...:PATH, where
    • NAME is the label used in plots
    • ENV1=V1,... is a list of comma-separate environment variables to set at runtime
    • PATH is the directory path containing the pre-built variant
  • Fix handling of the -h|--help option 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

omor1 added 5 commits July 14, 2026 21:19
…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>
@omor1
omor1 requested a review from a team as a code owner July 14, 2026 21:34
Copilot AI review requested due to automatic review settings July 14, 2026 21:34
@therock-pr-bot

Copy link
Copy Markdown

✅ All Policy Checks Passed

Check Status Details
🌿 Branch Name ✅ Pass
📝 PR Title/Description ✅ Pass
Forbidden Files ✅ Pass
🧪 Unit Test ✅ Pass PR does not contain code files — Unit Test auto-passed
🚫 Draft PR 🔜 To Be Enabled
🚩 Feature Flag 🔜 To Be Enabled
📊 Code Coverage 🔜 To Be Enabled

🎉 All policy checks passed!

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 SPEC to allow specifying additional named variants as pre-built build directories.
  • Updated variant parsing to consistently capture NAME:ENV:ARG/PATH components.
  • Reworked -h|--help handling to print only the script’s help header.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread projects/rocshmem/scripts/functional_tests/run_perf_compare.sh Outdated
Comment thread projects/rocshmem/scripts/functional_tests/run_perf_compare.sh Outdated
Comment thread projects/rocshmem/scripts/functional_tests/run_perf_compare.sh Outdated
omor1 added 2 commits July 15, 2026 22:14
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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment on lines +374 to +382
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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abouteiller is this a concern, I don't think path existence is checked for --baseline-dir or --branch-dir either?

Comment on lines +31 to +35
# --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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same as existing practice for --variant-args, @abouteiller is this a concern?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants