Skip to content

Replace nvshmem#187

Merged
chengcli merged 3 commits into
mainfrom
cli/replace_nvshmem
Jul 16, 2026
Merged

Replace nvshmem#187
chengcli merged 3 commits into
mainfrom
cli/replace_nvshmem

Conversation

@chengcli

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings July 16, 2026 04:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the NVSHMEM-based symmetric-memory pathway and replaces the fused cubed-sphere CUDA exchange mechanism with a UCX-backed process-group exchange of a packed edge-state buffer, updating build/test gating and documentation accordingly.

Changes:

  • Reworked fused cubed-sphere exchange to use a per-process packed buffer plus UCX send/recv instead of PyTorch symmetric memory rendezvous/signal pads.
  • Updated the CUDA smoke test and CMake test registration to require UCX and validate the UCX process group.
  • Removed NVSHMEM build plumbing and documented UCX usage for the fused cubed-sphere CUDA path.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_fused_cs_ucx_smoke.cu Replaces symmetric-memory smoke coverage with UCX-based exchange checks and verification kernels.
tests/CMakeLists.txt Renames/retargets the fused cubed-sphere smoke test and gates it on UCX_FOUND.
src/hydro/hydro_options.cpp Updates comments to reflect the new packed-buffer exchange approach.
src/hydro/hydro_forward_fused.cpp Implements UCX exchange logic, pool/buffer pointer management, and updates fused forward path accordingly.
src/hydro/fused_recon_riemann_dispatch.hpp Updates public dispatch signatures to remove symmetric-memory sync/release phases and rename pointer fields.
src/hydro/fused_cubed_sphere_dispatch.cu Removes symmetric-memory sync/release kernels and adapts pack/flux entrypoints to use the exchange buffer.
src/CMakeLists.txt Drops NVSHMEM include/link directives from the CUDA library target.
docs/user_guide/distributed.rst Documents that fused cubed-sphere CUDA exchange now uses the UCX backend and no longer needs symmetric-memory runtime.
CMakeLists.txt Removes inclusion of the NVSHMEM CMake module.
cmake/nvshmem.cmake Deletes the NVSHMEM discovery/validation module.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/hydro/hydro_forward_fused.cpp Outdated
Comment on lines +267 to +271
if (peer_process != layout.options->process_rank()) {
remote_peers->push_back(peer_process);
}
bool dim_enabled = side <= SIDE_R ? exchange_dim2 : exchange_dim3;
if (!dim_enabled) continue;
Comment thread src/hydro/hydro_forward_fused.cpp Outdated
Comment on lines +139 to +153
std::vector<CommWorkPtr> works;
works.reserve(2 * peers.size());
for (int peer : peers) {
std::vector<torch::Tensor> send_tensors{pool.buffer};
std::vector<torch::Tensor> recv_tensors{pool.peer_buffers[peer]};
if (auto work =
comm->send(send_tensors, peer, kFusedCubedSphereExchangeTag)) {
works.push_back(std::move(work));
}
if (auto work =
comm->recv(recv_tensors, peer, kFusedCubedSphereExchangeTag)) {
works.push_back(std::move(work));
}
}
for (auto const& work : works) work->wait();

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 31 out of 31 changed files in this pull request and generated no new comments.

@chengcli chengcli merged commit ed8bc09 into main Jul 16, 2026
3 checks passed
@chengcli chengcli deleted the cli/replace_nvshmem branch July 16, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants