Repository navigation
fix(analysis): make access relations state what their Ops read - #210
Merged
zhen8838 merged 25 commits intoOct 5, 2026
Merged
Conversation
zhen8838
commented
Oct 5, 2026
…sRelation tuple One AccessRelation (relation + values) replaces AffineAccess, BoundaryRelation and AccessRelations. A handler returns one relation per argument, then one per result field; readers split by len(call.args). relation_of, restricted_access, boundary_maps and _affine_boundaries are gone, and callers read .relation or pick a transformed map's bindings where they compose it.
_fresh_name no longer reads a DimVar, Var or mesh axis name or cleans it with a regex; _by_identity gives a value that cannot keep its name the first free p<number> instead of <name>_<suffix>. The isl utility test now covers unspellable names, taken p names, identity across accesses, alias merging, swaps and reuse of one relation by two Ops.
Delete _unsharded_layout and choose the result layout where MatMul infers it. Move the isl_interop contract out of the dim section into its own types section and point its readers there, define the allocation seed, drop the persistent_gemm_tiled module alias, and state the 64 KiB smem expectation as the sum of its three bf16 tiles.
…missing seed drops
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
full_likeread its template,ShapeOf/Rank/Localhad wrong boundary ranks, RoPE accepted q/k of different ranks until isl failed, the Reduce workspace was addressed by source coordinates, and Copy rejected shard shapes its verifier accepts.positions_ofdropped merged axes and folded out-of-range coordinates onto legal positions).What
AccessRelation(relation, values). A handler returns a flat tuple, one per argument then one per result field;AffineAccess/BoundaryRelation/AccessRelationsand therelation_of/restricted_access/boundary_mapsunpacking helpers are removed.ir/isl_interop.py: oneIslParamValuesdictionary;dim_to_isl_pw_aff,shape_to_isl_set,isl_to_dim, andlayout_to_isl_map(flattened layout positions, nested shards per layer, mesh coordinates as parameters). Parameters are matched by value identity and namedp<number>, never off a value's name;iteratingrenames each Op's parameters by identity into new relations before combining them.projectedplaces shard boundaries withlayout_to_isl_map, clips logical coordinates first, and fixes a requested unit (device, default 0).readnone_relations/unread_accessfor metadata Ops;full_likereads nothing and writes everything (cost evaluator synced).Contract
docs/spec/types.md§11 (new ISL interoperability section),visitor-registry.md,semantic-analysis.md:AccessRelationtuple order, fixedp<number>names, identity within one conversion context, layout placement, readnone relations.docs/spec/hir.md,tir.md: RoPE same-rank q/k; Reduce workspace size; Copy between shard shapes; FullLike reads only its template's type.docs/spec/analysis.md: a seed is an internal candidate placement (addresses and peak); one that bounds the allocator must meet every address constraint.KNOWN_OVER_BOUNDis now empty.Risk
FullLikeno longer aliases its template in allocation (its old proof relied on the removed read); peaks still meet the live bound.test_wgmma_performance...[n=16]agrees with the model at ceil(10.93 ns) vs ceil(10.09 ns) because of different clock references.