Skip to content

feat(analysis): add memory footprints and reuse windows - #179

Merged
zhen8838 merged 28 commits into
tile-ai:mainfrom
zhen8838:feat/read-footprint-l2
Sep 23, 2026
Merged

zhen8838 merged 28 commits into
tile-ai:mainfrom
zhen8838:feat/read-footprint-l2

Conversation

@zhen8838

@zhen8838 zhen8838 commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Why

What

  • Compute Call and Function footprints by unioning final-source addresses over one target wave, preserving view resolution, packed widths, boundary movement, and completeness.
  • Derive time and space reuse axes from access relations, then report each buffer's residency window, all-buffer holds, reused bytes, and the cache-capacity fits conclusion.
  • Report the program-dependent wave in the header and format every text byte count through one shared unit ladder.
  • Make MeshRegion an IterationScope owner, so a Call under a mesh finds its own mesh without a second IR walk, and route reuse through one memoized boundary record per access instead of replaying each relation five times.
  • At realistic size, Gemm_MNK_NN128x128x64_w12x11_k16384 reports b holds=176.00MB fits=no against a 47.68MB L2, a concrete capacity finding rather than a toy-only result.

Contract

  • Reorganize analysis spec 1.2.2 by record object, and specify the footprint and reuse-window conclusions together with which relation view answers each one: device-wave versus unit view for the space axis, raw narrow for the time axis, wave-limited narrow for holds.
  • Add reuse windows and the report-header wave fact as new public report surfaces; cache facts remain target facts and appear only in capacity findings.
  • Merge ParallelCapacityFacts into TopologyLevelFacts, which states max_logical_units and max_physical_units for each topology level under TopologyFacts.
  • Format text-report byte counts through one binary unit ladder while JSON keeps raw integer byte values.

Risk

  • Capacity compares one wave with one cache instance; deployments that spread a wave across cache instances are not modeled.
  • Residency windows are loop-granular upper bounds on reuse distance, not Falcon-style per-access reuse sources.
  • A truncated wave requires a statically stateable mesh order; a scope without one states no space axis, and a window containing such a boundary reports no row.
  • Under nested mesh regions a reuse row states its space axis against the innermost mesh; outer execution meshes are not composed into that label.

Comment thread src/tilefoundry/analysis/footprint.py Outdated
Comment thread src/tilefoundry/analysis/footprint.py Outdated
Comment thread src/tilefoundry/target/cuda/target.py Outdated
Comment thread tests/fixtures/placed/gemm_mnk_nn128x128x64_w12x11_k4096.analyzed.txt Outdated
Comment thread tests/analysis/test_analyze_cross_module.py Outdated
@zhen8838
zhen8838 merged commit 047105e into tile-ai:main Sep 23, 2026
1 check passed
@zhen8838
zhen8838 deleted the feat/read-footprint-l2 branch September 23, 2026 16:10
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.

fix(analysis): count an invariant operand's re-reads in traffic total

1 participant