-
Notifications
You must be signed in to change notification settings - Fork 6
Complex-number Support for NCCL & Fredholm NCCL #148
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
Changes from 6 commits
ad7205d
501e581
3609220
0c7136f
95e32bf
3eceb29
a2a23b0
4ca10e4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -14,7 +14,7 @@ | |||||
| nccl_message = deps.nccl_import("the DistributedArray module") | ||||||
|
|
||||||
| if nccl_message is None and cupy_message is None: | ||||||
| from pylops_mpi.utils._nccl import nccl_allgather, nccl_allreduce, nccl_asarray, nccl_bcast, nccl_split, nccl_send, nccl_recv | ||||||
| from pylops_mpi.utils._nccl import nccl_allgather, nccl_allreduce, nccl_asarray, nccl_bcast, nccl_split, nccl_send, nccl_recv, _prepare_nccl_allgather_inputs, _unroll_nccl_allgather_recv | ||||||
| from cupy.cuda.nccl import NcclCommunicator | ||||||
| else: | ||||||
| NcclCommunicator = Any | ||||||
|
|
@@ -500,7 +500,15 @@ def _allgather(self, send_buf, recv_buf=None): | |||||
| """Allgather operation | ||||||
| """ | ||||||
| if deps.nccl_enabled and self.base_comm_nccl: | ||||||
| return nccl_allgather(self.base_comm_nccl, send_buf, recv_buf) | ||||||
| if hasattr(send_buf, "shape"): | ||||||
| send_shapes = self.base_comm.allgather(send_buf.shape) | ||||||
| (padded_send, padded_recv) = _prepare_nccl_allgather_inputs(send_buf, send_shapes) | ||||||
| # TODO: Should we ignore recv_buf completely in this case ? | ||||||
tharittk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| raw_recv = nccl_allgather(self.base_comm_nccl, padded_send, recv_buf if recv_buf else padded_recv) | ||||||
| return _unroll_nccl_allgather_recv(raw_recv, padded_send.shape, send_shapes) | ||||||
| else: | ||||||
| # still works for a send_buf whose type is a tuple for _nccl_local_shapes | ||||||
| return nccl_allgather(self.base_comm_nccl, send_buf, recv_buf) | ||||||
| else: | ||||||
| if recv_buf is None: | ||||||
| return self.base_comm.allgather(send_buf) | ||||||
|
|
@@ -511,7 +519,13 @@ def _allgather_subcomm(self, send_buf, recv_buf=None): | |||||
| """Allgather operation with subcommunicator | ||||||
| """ | ||||||
| if deps.nccl_enabled and getattr(self, "base_comm_nccl"): | ||||||
| return nccl_allgather(self.sub_comm, send_buf, recv_buf) | ||||||
| if hasattr(send_buf, "shape"): | ||||||
| send_shapes = self.base_comm.allgather(send_buf.shape) | ||||||
|
||||||
| xmaskedloc = arr.asarray(masked=True) |
main branch) looks correct but your previous commit should have called this pylops-mpi/pylops_mpi/DistributedArray.py
Line 378 in 1fdf083
| return nccl_asarray(self.sub_comm if masked else self.base_comm_nccl, |
.asarray call... anyways, now it is correct 😄
tharittk marked this conversation as resolved.
Show resolved
Hide resolved
|
Uh oh!
There was an error while loading. Please reload this page.