Skip to content

Tests: allow the zoo's padded logits row stride in the fused linear adapter check - #15803

Merged
danielhanchen merged 1 commit into
mainfrom
tests-follow-zoo-padded-logits-buffer
Oct 28, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
tests-follow-zoo-padded-logits-buffer

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Repo tests (CPU, studio) fails against unsloth-zoo main (seen on #15795; 4 failed, 9862 passed) since unslothai/unsloth-zoo#2190 landed:

tests/python/test_fused_linear_trl_routes.py::test_adapter_bounds_its_logits_buffer_by_chunk_size[*]
E   assert (None is None and 258048 == ((64 * 1000) * 4))

unslothai/unsloth-zoo#2190 pads the fused linear forward statistics buffer's row stride to a multiple of 16 (_FWD_PAD = 16), so Triton keeps its divisibility-by-16 specialisation and the no-grad and trainable-head statistics agree bitwise for vocab sizes not divisible by 16. With the test's V = 1000 the one uncapped [N, V] buffer is now 64 x 1008 x 4 = 258048 bytes instead of 256000. The zoo change is intentional; the test pinned the unpadded size.

Change

The "TRL's default tile is bigger, so no row cap" check still requires max_rows_per_chunk is None and a single [N, V] buffer, but sizes V with the zoo's own pad: getattr(fused_linear, "_FWD_PAD", 1), rounded up. Against a zoo without #2190 the pad is 1 and the check is exactly the old one.

Testing

tests/python/test_fused_linear_trl_routes.py with unsloth_zoo on the path:

…dapter check

unslothai/unsloth-zoo#2190 pads the forward statistics buffer's row stride
to a multiple of 16 so the no-grad and trainable-head paths agree bitwise.
test_adapter_bounds_its_logits_buffer_by_chunk_size pinned the buffer to
exactly n * v * 4 and fails in Repo tests (CPU, studio) against zoo main.
It now reads the pad from the zoo (_FWD_PAD, 1 when absent).
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T15:31:08.253064Z 2e04332 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 2e04332c7f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 2d4ac1c into main Oct 28, 2026
0 of 15 checks passed
@danielhanchen
danielhanchen deleted the tests-follow-zoo-padded-logits-buffer branch October 28, 2026 15:36
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