Add CPU nbit-forward tests for empty/pruned-bag zero-fill (#6064) - #6064
Open
knoebelja wants to merge 1 commit into
Open
Add CPU nbit-forward tests for empty/pruned-bag zero-fill (#6064)#6064knoebelja wants to merge 1 commit into
knoebelja wants to merge 1 commit into
Conversation
Contributor
|
@knoebelja has exported this pull request. If you are a Meta employee, you can view the originating Diff in D113243672. |
knoebelja
force-pushed
the
export-D113243672
branch
2 times, most recently
from
July 27, 2026 13:03
57e0a4c to
d62f3e0
Compare
knoebelja
force-pushed
the
export-D113243672
branch
from
July 27, 2026 17:58
d62f3e0 to
77e011e
Compare
Summary: X-link: facebookresearch/FBGEMM#2964 Add CPU coverage for the pooled quantized TBE forward `int_nbit_split_embedding_codegen_forward_{unweighted,weighted}_cpu`: - `test_nbit_forward_cpu_empty_and_pruned_bags_zero_fill`: single-table SUM pooling with every embedding row set to 1.0 and ragged bag lengths that include empty bags (`L == 0`) and a fully-pruned bag, with ~1/3 of indices pruned to -1. Each output dim must equal the non-pruned count (or weighted sum), and empty/pruned bags must be exactly 0 -- verifying the kernel writes every output row itself. - `test_nbit_forward_cpu_out_of_bounds_index_stays_defined`: an out-of-bounds index is sanitized by the CPU bounds check (clamped to row 0), so the op returns a fully-written, finite output. These pass on current code and pin the behavior that the stacked follow-up relies on when it drops the redundant `output.fill_(0)` pre-zero from the pooled path. Differential Revision: D113243672
knoebelja
force-pushed
the
export-D113243672
branch
from
July 28, 2026 18:39
77e011e to
8de761f
Compare
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.
Summary:
X-link: https://github.com/facebookresearch/FBGEMM/pull/2964
Add CPU coverage for the pooled quantized TBE forward
int_nbit_split_embedding_codegen_forward_{unweighted,weighted}_cpu:test_nbit_forward_cpu_empty_and_pruned_bags_zero_fill: single-table SUMpooling with every embedding row set to 1.0 and ragged bag lengths that
include empty bags (
L == 0) and a fully-pruned bag, with ~1/3 of indicespruned to -1. Each output dim must equal the non-pruned count (or weighted
sum), and empty/pruned bags must be exactly 0 -- verifying the kernel writes
every output row itself.
test_nbit_forward_cpu_out_of_bounds_index_stays_defined: an out-of-boundsindex is sanitized by the CPU bounds check (clamped to row 0), so the op
returns a fully-written, finite output.
These pass on current code and pin the behavior that the stacked follow-up relies
on when it drops the redundant
output.fill_(0)pre-zero from the pooled path.Differential Revision: D113243672