Conversation
mofeing
force-pushed
the
ss/comm-lower-to-jit
branch
3 times, most recently
from
September 11, 2026 12:56
526c53f to
81fefc9
Compare
romanlee
reviewed
Sep 18, 2026
Comment on lines
+2527
to
+2539
| Value count = | ||
| LLVM::LoadOp::create(rewriter, op.getLoc(), type_i32, host_count_ptr) | ||
| .getResult(); | ||
| Value datatype = | ||
| LLVM::LoadOp::create(rewriter, op.getLoc(), type_nccl_datatype, | ||
| host_datatype_ptr) | ||
| .getResult(); | ||
| Value redop = LLVM::LoadOp::create(rewriter, op.getLoc(), type_nccl_redop, | ||
| host_redop_ptr) | ||
| .getResult(); | ||
| Value comm = | ||
| LLVM::LoadOp::create(rewriter, op.getLoc(), type_ptr, host_comm_ptr) | ||
| .getResult(); |
Collaborator
There was a problem hiding this comment.
This seems pretty unfortunate: allocate a buffer on the device, only to immediately copy it back to the host in the jit wrapper? But maybe this is the best we can do given xla constraints?
Collaborator
Author
There was a problem hiding this comment.
we should be able to avoid this memcpys by using attributes, but i don't know yet how to do it with jit_call. i think it's fine for now and can be improved once we learn how to pass attributes with jit_call.
mofeing
force-pushed
the
ss/comm-lower-to-jit
branch
from
September 18, 2026 09:36
517f40b to
71fca7e
Compare
You need this for proper jit lowering
the device pointer TODO: the same change needs to be made for ncclSend/Recv/etc
mofeing
force-pushed
the
ss/comm-nccl-lower-to-jit
branch
from
September 18, 2026 15:07
35b45d8 to
3029b0c
Compare
This branch has not been deployed
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.
i've skipped the implementation of some ops that we may not need right now (
ncclCommSplit,ncclCommDestroy, ...).waiting for #3100 to be merged first (or fuse both PRs into one)
to do