Skip to content

Add offset top x-axis to runtime layout plot - #5

Merged
mt5555 merged 5 commits into
masterfrom
copilot/create-plot-with-matplotlib
Jun 14, 2026
Merged

Add offset top x-axis to runtime layout plot#5
mt5555 merged 5 commits into
masterfrom
copilot/create-plot-with-matplotlib

Conversation

Copilot AI commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

The runtime layout figure needed to match the provided reference while adding a second x-axis. The new top axis now uses the same core-count units as the bottom axis, offset to start at 4096.

  • Scope

    • Updated pace/runtime_layout.py to support a secondary top x-axis aligned with the existing processor-core axis.
    • Kept the bottom axis as the canonical processor range (0..4096) and corrected primary tick spacing.
  • Top-axis behavior

    • Replaced the GPU-conversion mapping with an offset mapping:
      • top = bottom + 4096
      • bottom = top - 4096
    • Configured top ticks to display 4096, 5120, 6144, 7168, 8192.
  • Labeling

    • Clarified axis labels for readability:
      • Bottom: Processor Cores
      • Top: Processor Cores (+4096 offset)
ax_top = ax.secondary_xaxis(
    "top",
    functions=(
        lambda cores: cores + TOTAL_PROCS,
        lambda top_units: top_units - TOTAL_PROCS,
    ),
)
top_ticks = [4096, 5120, 6144, 7168, 8192]
ax_top.set_xticks(top_ticks)

@mt5555
mt5555 marked this pull request as ready for review June 14, 2026 20:18
@mt5555
mt5555 merged commit 33fb1ef into master Jun 14, 2026
@mt5555
mt5555 deleted the copilot/create-plot-with-matplotlib branch June 16, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants