-
Notifications
You must be signed in to change notification settings - Fork 476
Ubnext #2038
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nv-akorzh
wants to merge
10
commits into
NVIDIA:main
Choose a base branch
from
nv-akorzh:ubnext
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Ubnext #2038
Conversation
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
Signed-off-by: Anton Korzh <[email protected]>
Signed-off-by: Anton Korzh <[email protected]>
Signed-off-by: Anton Korzh <[email protected]>
…ding zeros (NVIDIA#2019) * for loop Signed-off-by: Xin Yao <[email protected]> * bulk alloc Signed-off-by: Xin Yao <[email protected]> * multi-tensor swizzle Signed-off-by: Xin Yao <[email protected]> * pad zeros in swizzle kernels Signed-off-by: Xin Yao <[email protected]> * unify single- and multi-tensor swizzle Signed-off-by: Xin Yao <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix empty tensor list Signed-off-by: Xin Yao <[email protected]> * fix bug for col swizzle Signed-off-by: Xin Yao <[email protected]> * check context & fix signifiers Signed-off-by: Xin Yao <[email protected]> --------- Signed-off-by: Xin Yao <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: Anton Korzh <[email protected]>
…kwise FP8 convert_and_update_tensor (NVIDIA#1978) * fix input_quantizer in save_original_input bwd Signed-off-by: Hongxiao Bai <[email protected]> * fix get shape of blockwise tensor with only compact colwise data Signed-off-by: Hongxiao Bai <[email protected]> * fix blockwise FP8 convert_and_update_tensor Signed-off-by: Hongxiao Bai <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Hongxiao Bai <[email protected]> Co-authored-by: Tim Moon <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Kirthi Shankar Sivamani <[email protected]> Signed-off-by: Anton Korzh <[email protected]>
Revert "[JAX] Disable TE Norm Custom Calls (NVIDIA#1993)" This reverts commit 6c97061. --------- Signed-off-by: Phuong Nguyen <[email protected]> Signed-off-by: Anton Korzh <[email protected]>
for more information, see https://pre-commit.ci Signed-off-by: Anton Korzh <[email protected]>
Signed-off-by: Anton Korzh <[email protected]>
Signed-off-by: Anton Korzh <[email protected]>
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.
Description
Added UBnext fast Allreduce kernels into linear and layernorm_linear layer.
Falls under symmetric_ar_type with new type being 'ub_custom'
Details
Added UC MC and fast sync - low latency (lamport) allreduce kernel.
Added symmetric allocator which uses pytorch symmetric to allocate pool and suballocate from it.
As pytorch symmetric doesnt support MNNVL yet there is a fallback to use legacy UB code by creating a 11th CommOverlap object. Enabled with env NVTE_USE_UB_FOR_UBNEXT ( requires user to initialize ub by calling initialize_ub)
NVTE_UB_MAXBATCH (default 128) can increase batch size which would have enough memory for fastest kernel. If memory cant be allocated there is gradual fallback: first to UBmain in-place kernel if input could be allocated and output couldnt, and to pytorch symmetric if input couldnt be allocated.
NVTE_UB_SYMM_POOL_SIZE env overrides pool size to given number of megabytes.