PR #23619: Fix the EmitSort checking after enabling NVLS and user buffer #23935
+55
−3
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.
PR #23619: Fix the EmitSort checking after enabling NVLS and user buffer
Imported from GitHub PR #23619
There is a reported bug from NVIDIA that running Midjourney model triggers XLA error after enabling NVLS and user buffer by setting NCCL_NVLS_ENABLE=1 and --xla_gpu_enable_nccl_user_buffers=true:
This is because after enabling NVLS and user buffer, one of the operand of
sort
operation is from a different memory space (user buffer), and the previousLayoutsInShapesEqual
check is too strong to pass as it also checks if operands are from the same memory space.This MR makes the sort layout check weaker as operands do not have to be in the same memory space as long as they all on the device.
Copybara import of the project:
--
8265352 by Chenhao Jiang [email protected]:
Making the sort layout check weaker as operands do not have to be in the same memory space as long as they all on the device.
Merging this change closes #23619
FUTURE_COPYBARA_INTEGRATE_REVIEW=#23619 from serach24:chenhao/fix_nvsl_check_failed 8265352