Skip to content

Instantly share code, notes, and snippets.

@yifuwang
Created February 25, 2025 01:35
Show Gist options
  • Save yifuwang/55dc12a9aa73a8a55705687e95c9a121 to your computer and use it in GitHub Desktop.
Save yifuwang/55dc12a9aa73a8a55705687e95c9a121 to your computer and use it in GitHub Desktop.
diff --git a/src/modules/transport/ibgda/ibgda.cpp b/src/modules/transport/ibgda/ibgda.cpp
index ef325cd..ba3056a 100644
--- a/src/modules/transport/ibgda/ibgda.cpp
+++ b/src/modules/transport/ibgda/ibgda.cpp
@@ -426,9 +426,13 @@ int nvshmemt_ibgda_progress(nvshmem_transport_t t) {
prod_idx_snapshot = device->qp_shared_object.prod_idx_snapshot;
prod_idx_array = (uint64_t *)device->qp_shared_object.prod_idx_mobject->aligned.cpu_ptr;
+#ifdef NVSHMEM_USE_GDRCOPY
gdrcopy_ftable.copy_from_mapping(device->qp_shared_object.prod_idx_mobject->mh,
prod_idx_snapshot, prod_idx_array,
sizeof(uint64_t) * num_prod_idx_slots);
+#else
+ NVSHMEMI_ERROR_PRINT("nvshmemt_ibgda_progress requires gdrcopy");
+#endif
for (int i = 0; i < num_prod_idx_slots; ++i) {
uint64_t prod_idx = prod_idx_snapshot[i];
@@ -3899,8 +3903,11 @@ int nvshmemt_init(nvshmem_transport_t *t, struct nvshmemi_cuda_fn_table *table,
transport->host_ops.get_mem_handle = nvshmemt_ibgda_get_mem_handle;
transport->host_ops.release_mem_handle = nvshmemt_ibgda_release_mem_handle;
transport->host_ops.show_info = nvshmemt_ibgda_show_info;
- transport->host_ops.progress =
- ((nic_handler == IBGDA_NIC_HANDLER_GPU) ? NULL : nvshmemt_ibgda_progress);
+ // transport->host_ops.progress =
+ // ((nic_handler == IBGDA_NIC_HANDLER_GPU) ? NULL : nvshmemt_ibgda_progress);
+ assert(nic_handler == IBGDA_NIC_HANDLER_GPU);
+ transport->host_ops.progress = NULL;
+
transport->host_ops.finalize = nvshmemt_ibgda_finalize;
transport->host_ops.rma = NULL;
transport->host_ops.amo = NULL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment