Fix TBE v2 forward kernel for embedding dim > 1024 (#5326)#5569
Closed
cyyever wants to merge 1 commit intopytorch:mainfrom
Closed
Fix TBE v2 forward kernel for embedding dim > 1024 (#5326)#5569cyyever wants to merge 1 commit intopytorch:mainfrom
cyyever wants to merge 1 commit intopytorch:mainfrom
Conversation
Contributor
f496f4f to
7736d40
Compare
q10
pushed a commit
to q10/FBGEMM
that referenced
this pull request
Apr 15, 2026
…torch#5569) Summary: Pull Request resolved: pytorch#5569 Test Plan: ## Test Commands buck2 test fbcode//deeplearning/fbgemm/fbgemm_gpu/test/tbe:forward -- ForwardTest.test_forward_gpu_no_cache_fp16 buck2 test fbcode//deeplearning/fbgemm/fbgemm_gpu/test/tbe:forward -- ForwardTest.test_forward_gpu_no_cache_fp32 ## What Is Tested 1. **test_forward_gpu_no_cache_fp16** - Exercises the v2 forward kernel (when use_experimental_tbe=True, generated by Hypothesis) with D in {2..256 step 16, 1024, 1280, 1536, 2048}. Validates FP16 forward correctness for both the small-L and large-L paths with the dynamic early exit fix. T, B, L are capped (T<=2, B<=16, L<=4) for D > 256 to prevent OOM. 2. **test_forward_gpu_no_cache_fp32** - Same D range as above with FP32 weights. Uses proportional max_TBL = max(1, 2048/D) scaling for large D to prevent OOM while still exercising the v2 kernel max_num_warps_per_row computation. Both tests use Hypothesis-generated use_experimental_tbe in {True, False}, covering both the v1 (legacy) and v2 (experimental) kernel paths. BUCK target: fbcode//deeplearning/fbgemm/fbgemm_gpu/test/tbe:forward Reviewed By: henrylhtsang Differential Revision: D99746894 Pulled By: q10
Contributor
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.
No description provided.