Skip to content

Add nsys profile plotter and improve documentation#643

Merged
SeverinDiederichs merged 6 commits into
apt-sim:masterfrom
SeverinDiederichs:add_nsys_profile_plot
May 21, 2026
Merged

Add nsys profile plotter and improve documentation#643
SeverinDiederichs merged 6 commits into
apt-sim:masterfrom
SeverinDiederichs:add_nsys_profile_plot

Conversation

@SeverinDiederichs
Copy link
Copy Markdown
Collaborator

@SeverinDiederichs SeverinDiederichs commented May 20, 2026

This PR adds a plotting script to get useful performance profiling plots out of nsys. It documents how to use and interpret the data.

Current plots from runs in Athena:
atlas_wdt_t64_e512_transportOnly3_kernel_profile
atlas_wdt_t64_e512_transportOnly3_species_pies

Current plots from runs with CMSSW
cms_split_nev32_nw32_kernel_profile
cms_split_nev32_nw32_species_pies

Current plots from runs with LHCb
lhcb_split_none_t128_e512_kernel_profile
lhcb_split_none_t128_e512_species_pies

@SeverinDiederichs SeverinDiederichs added the documentation Category: Improvements or additions to documentation label May 20, 2026
@SeverinDiederichs
Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@phsft-bot
Copy link
Copy Markdown

Can one of the admins verify this patch?

@SeverinDiederichs
Copy link
Copy Markdown
Collaborator Author

@codex review

@SeverinDiederichs
Copy link
Copy Markdown
Collaborator Author

/run-test

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 18eb8ce11d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/plot_adept_nsys_profile.py Outdated
Comment on lines +397 to +398
ax.pie(values, labels=[f"{label}\n{pct(transport_by_particle[label], transport_ns):.1f}%" for label in labels],
startangle=90, textprops={"fontsize": 9})
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Guard transport pie chart against zero transport totals

If the captured range has no matching transport kernels (e.g., short or mis-scoped nsys capture), values becomes all zeros and transport_ns is zero, but this block still calls ax.pie(...). Axes.pie normalizes by sum(x), so a zero-sum pie can fail at runtime and abort the script before writing plots/summaries. Add the same kind of empty-data guard used in draw_pie (render a placeholder text instead of calling pie when the total is zero).

Useful? React with 👍 / 👎.

@SeverinDiederichs
Copy link
Copy Markdown
Collaborator Author

/run-test

@SeverinDiederichs SeverinDiederichs requested a review from agheata May 20, 2026 16:56
@SeverinDiederichs
Copy link
Copy Markdown
Collaborator Author

/run-test

Copy link
Copy Markdown
Contributor

@agheata agheata left a comment

Choose a reason for hiding this comment

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

Thanks for the nice addition!

@SeverinDiederichs SeverinDiederichs merged commit d389b93 into apt-sim:master May 21, 2026
6 checks passed
@SeverinDiederichs SeverinDiederichs deleted the add_nsys_profile_plot branch May 21, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Category: Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants