Skip to content

Forward skip_tiling across the controller boundary - #857

Open
lokic233 wants to merge 1 commit into
google:mainfrom
lokic233:fix/forward-skip-tiling-controller
Open

Forward skip_tiling across the controller boundary#857
lokic233 wants to merge 1 commit into
google:mainfrom
lokic233:fix/forward-skip-tiling-controller

Conversation

@lokic233

@lokic233 lokic233 commented Sep 4, 2026

Copy link
Copy Markdown

What

Forwards the missing skip_tiling kwarg across the controller boundary, plus a
regression test.

Why

The remote-coordination branch of _execute_slice_broadcast
(tpu_sync/rpc/raiden_controller.py:1569) forwards skip_d2h=plan.skip_d2h to
register_transfer_schedule but does not forward plan.skip_tiling.

Both flags configure how the host staging buffer is interpreted, and they are set
together. The sender's D2h does see the map — it reaches the local source worker
through the start_transfer(s_node, plan) call just below — so after the boundary the
sender detiles according to a populated skip_tiling while the receiver's H2d re-tiles
according to an empty one.

Nothing catches the disagreement: no bounds check fires, the chunk counts still match,
the transfer reports success, and the landed weights are silently wrong.

Testing

New regression test records the kwargs handed to a faked
RaidenControllerClientFacade and asserts skip_tiling arrives intact alongside
skip_d2h. Measured on an unmodified tree:

result
without the fix new test fails — AssertionError: None != {7: True, 9: False}; rest of raiden_controller_test.py 35/35 pass
with the fix new test passes; raiden_controller_test.py 36/36 pass

The test discriminates the one changed line rather than the setup: its
assertTrue(kwargs.get("skip_d2h")) assertion passes on both arms, and only the
skip_tiling assertion moves.

Scope note — deliberately narrow

This is a forwarding omission found while investigating a separate replicated-leaf drop.
It is not claimed to be the cause of that drop. That root cause is still unknown, and
the earlier hypotheses (collision, rank-1 tiling, C++ (slice, dst_device) keying) were
each tested and refuted. This change stands on its own merits.

The remote-coordination branch of `_execute_slice_broadcast`
(`tpu_sync/rpc/raiden_controller.py:1569`) forwards `skip_d2h=plan.skip_d2h`
to `register_transfer_schedule` but does not forward `plan.skip_tiling`.

Both flags configure how the host staging buffer is interpreted, and they are
set together. The sender's D2h does see the map -- it reaches the local source
worker through the `start_transfer(s_node, plan)` call just below -- so after
the boundary the sender detiles according to a populated `skip_tiling` while
the receiver's H2d re-tiles according to an empty one. Nothing catches the
disagreement: no bounds check fires, the chunk counts still match, the
transfer reports success, and the landed weights are silently wrong.

Adds the missing kwarg plus a regression test that records the kwargs handed
to a faked `RaidenControllerClientFacade` and asserts `skip_tiling` arrives
intact alongside `skip_d2h`.

Measured, on an unmodified tree:

  without the fix   the new test fails, AssertionError: None != {7: True, 9: False}
                    rest of raiden_controller_test.py: 35/35 pass
  with the fix      the new test passes
                    raiden_controller_test.py: 36/36 pass

The test discriminates the one changed line rather than the setup: its
`assertTrue(kwargs.get("skip_d2h"))` assertion passes on both arms, and only
the `skip_tiling` assertion moves.

Scope note, deliberately narrow: this is a forwarding omission found while
investigating a separate replicated-leaf drop. It is **not** claimed to be the
cause of that drop -- that root cause is still unknown, and the earlier
hypotheses (collision, rank-1 tiling, C++ `(slice, dst_device)` keying) were
each tested and refuted. This change stands on its own.

Signed-off-by: Loki Chen <dengcchi@meta.com>
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.

1 participant