Skip to content

Set default padding_multiple to 32 in DPTrainer#291

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_937404130
Open

Set default padding_multiple to 32 in DPTrainer#291
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_937404130

Conversation

@copybara-service

Copy link
Copy Markdown
Contributor

Set default padding_multiple to 32 in DPTrainer

Poisson batch selection yields variable-length batches. On GPU/TPU, each
unique batch size triggers a separate XLA compilation, and each compiled
program (CUBIN) can be ~1 GB. With padding_multiple=1 (previous default),
compiled programs accumulate and eventually OOM.

Setting padding_multiple=32 means at most ceil(max_batch_size/32) unique
compiled programs, providing a good balance between wasted padding
examples and recompilation. This is purely a performance change — padding
examples are masked via is_padding_example and do not affect correctness
or privacy.

Poisson batch selection yields variable-length batches. On GPU/TPU, each
unique batch size triggers a separate XLA compilation, and each compiled
program (CUBIN) can be ~1 GB. With padding_multiple=1 (previous default),
compiled programs accumulate and eventually OOM.

Setting padding_multiple=32 means at most ceil(max_batch_size/32) unique
compiled programs, providing a good balance between wasted padding
examples and recompilation. This is purely a performance change — padding
examples are masked via is_padding_example and do not affect correctness
or privacy.

PiperOrigin-RevId: 937404130
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.

0 participants