feat: check distributed HIR against explicit references - #178
UranusSeven wants to merge 2 commits into
Conversation
|
@UranusSeven Thanks for this — the RFC and the rank-local evaluator are good work, and the evaluator is close to what issue #138 has been asking for. I noticed the PR was closed shortly after opening, so I don't know whether you're reworking it. Either way I'd like to discuss a few points before either of us builds further on top: unifying the distributed value types with Opened a discussion for it: #181 |
Thanks for your reply! This PR was a demo for a quick en2end experiment, not ready for reviewing & merge yet. That's why I closed it. Totally agree with dropping Let's move on with #181 |
TileFoundry's logical evaluator runs sharded contractions on full tensors, which cannot expose a missing cross-device reduction. This change adds
check --reference SOURCE --distributed: the candidate executes on simulated rank-local tensors with explicit collectives, then its reconstructed outputs are compared with the selected reference HIR using the existing numerical predicates.AllReduce,AllGather, andReduceScatterover existing device-mesh axes, with ownership and participation contracts.Reshard, and unsupported distributed operations.tilefoundry tutorial distributed-check.This is the correctness foundation for engine-scope optimization. Supported layouts use equal contiguous partitions on a single device topology level. Distributed memory/communication costing, ragged expert exchange, physical collective lowering, and strategy search remain follow-up work. All existing
analyzeselectors explicitly reject uncosted collectives.Validation
CPU suite: 475 passed, 1 skipped, 1 deselected.
python -m pytest tests/evaluator tests/ops/ir \ tests/parser/test_mesh_visibility.py tests/ir/types/test_mesh.py \ tests/ir/types/test_shard_layout.py tests/ir/test_shard_layout_local_shape.py \ tests/ir/test_function_call_typeinfer.py tests/cli tests/analysis \ -q -k 'not test_a_pinned_extent_on_a_root_that_reaches_a_child'One existing cross-device test is skipped on CPU, and the existing CLI test named above is excluded because it selects CUDA by default. Physical GPU execution was not tested.
Ruff, specification/reference checks, comment/annotation checks, language/path checks, finalized-plan checks, and
git diff --checkpass. The tutorial notebook was executed and rendered with passing comparison results; all four analysis selectors were checked for explicit rejection of missing collective costs.