Repository navigation
[FIX](DynamicEmb) Fix int32 overflow in get_dst_ptr - #555
Merged
Merged
Conversation
Signed-off-by: lizongwu <[email protected]> Co-authored-by: TRAE CLI <[email protected]>
Contributor
[Low impact] This change appears safe to merge. SummaryFixes pooled embedding output addresses when the output contains more than
No actionable issues found. Reviews (1) · Last reviewed commit: "Fix int32 overflow in get_dst_ptr" · Reviewed by Greptile |
shijieliu
approved these changes
Nov 13, 2026
This was referenced Nov 14, 2026
shijieliu
added a commit
to shijieliu/recsys-examples
that referenced
this pull request
Nov 16, 2026
Brings in main 4466f9d: NVIDIA#528 (hierarchical dist), NVIDIA#550, NVIDIA#553, NVIDIA#555, NVIDIA#478 (exportable embedding collections with NVE layers), NVIDIA#554 and NVIDIA#556. Conflicts: - corelib/dynamicemb/CMakeLists.txt: main (NVIDIA#478) adds the RPATH, NVE_ROOT and DYNAMICEMB_PYTHON_MODULE_DIR lines above the C++ standard; kept them, with this branch's C++20 (PyTorch 2.14's headers need it). - corelib/dynamicemb/setup.py: main's file. It already has this branch's CUDA_HOME import and sm_103-aware default archs (from NVIDIA#528); the conflict was only main's new `import torch` and `Extension` imports. - corelib/dynamicemb/README.md: main's new inference build section, after this branch's FBGEMM 1.9.0 / TorchRec 1.9.2 lines. docker/Dockerfile merged cleanly: NVIDIA#478's build stage rebuilds the default NVE from the submodule with the same pip command and settings as the devel stage, and builds torch_binding_build through the CMakeLists above. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: aleliu <[email protected]>
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.
The output address calculation used by gather_embedding_pooled computes b * layout.total_D in int32. When the output element count exceeds INT32_MAX, this multiplication can overflow even though the sample index and row width each fit in int32, causing a CUDA illegal memory access. For example, B=10,520,878 and total_D=256 produce 2,693,344,768 output elements.
Cast b to int64_t before multiplication so the output address offset is computed in 64 bits. This change is limited to address arithmetic and does not extend the supported range of batch indices, bag indices, or dimensions.