Skip to content

[Docs] A bilingual guide to tuning memory-bound kernels - #36

Open
lcy-seso wants to merge 2 commits into
tile-ai:mainfrom
lcy-seso:docs/memory-bound-guides
Open

[Docs] A bilingual guide to tuning memory-bound kernels#36
lcy-seso wants to merge 2 commits into
tile-ai:mainfrom
lcy-seso:docs/memory-bound-guides

Conversation

@lcy-seso

Copy link
Copy Markdown
Contributor

Problems

  • No guidance anywhere on the site for tuning a memory-bound kernel, which is what Elementwise and Reduction ops are.
  • The Performance Guides landing page lists measurements and tools, with no section for tuning practice.

Changes

  • Three new pages under performance-guides/memory-bound/, each in English and Chinese:
    • index — what memory-bound means on the H200 roofline, with the measured 57.27 TFLOP/s / 4.07 TB/s calibration and the 14.07 flop/byte ridge.
    • Optimizing Global Memory Access — the three requirements for a coalesced access, the four access patterns (blocked, striped, vectorized blocked, staged) measured on two workloads, and four trade-offs for choosing among them.
    • Optimizing Shared Memory Access — where the bank conflict degree comes from, the $\gcd(S, 32)/w$ bound, why padding has to be computed from chunk rather than fixed in bytes, and a 20-configuration sweep.
  • performance-guides/index.md and .zh.md: a third section for tuning practice, with the descriptions kept in both languages.
  • mkdocs.yml: three nav entries plus nav_translations labels.
  • extra.css: styles for the three figures (roofline, access pattern, bank conflict).
  • CLAUDE.md: these pages are edit-Chinese-first; the translation fallback runs zh to en only; figures need one SVG per language.

Measurement conditions

Every number is measured on an H200 with the SM clock locked at 1830 MHz, an input larger than the 60 MiB L2, and enough blocks to fill the card. Each page states those conditions and names the regimes where its conclusions reverse.

Figures

Each figure is inline SVG with one copy per language — the <text> nodes and aria-label are translated and the geometry is untouched. English runs longer than Chinese, so the access-pattern and bank-conflict viewBox grow by one line and the label column was checked against measured text widths.

Verified

  • mkdocs build adds no warning over main; all six pages build under both locales.
  • The English sidebar links resolve, each language renders its own figure, and the math reaches MathJax as arithmatex blocks.

Three pages under Performance Guides, in English and Chinese: what
memory-bound means on the H200 roofline, how to choose a global memory
access pattern among blocked, striped, vectorized blocked and staged,
and how to size shared memory padding so a warp's accesses do not
collide on a bank.

Every number is measured on an H200 with the SM clock locked at
1830 MHz, an input larger than the 60 MiB L2, and enough blocks to fill
the card. Each page states those conditions and the regimes where its
conclusions reverse.

Each figure ships one SVG per language, translated in the text nodes and
the aria-label with the geometry untouched; the English viewBox grows
where the longer text needs a second line.

The pages were authored in Chinese, so CLAUDE.md lists them alongside
backends.md and torch-compile.md as edit-Chinese-first, records that the
translation fallback runs zh to en only, and adds the per-language rule
for figures.

The Performance Guides landing page gains a third section for tuning
practice, in both languages.
Copilot AI lite review requested due to automatic review settings August 29, 2026 05:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Reword the three English pages so they read as English rather than as a
translation of the Chinese originals: direct subject-verb-object main
clauses in place of long pre-modifiers, and no literal glosses of Chinese
sentence shapes.

Headings and anchors, tables, code blocks, SVG blocks, links, math spans
and every measured number are unchanged; the paragraph and list-item
boundaries are the same, so the two languages still track each other
line for line.
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