-
Notifications
You must be signed in to change notification settings - Fork 217
Fix issues related to GPUNetIO #1112
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
base: main
Are you sure you want to change the base?
Conversation
|
👋 Hi foraxe! Thank you for contributing to ai-dynamo/nixl. Your PR reviewers will review your contribution then trigger the CI to test your changes. 🚀 |
| if (env_dbg) { | ||
| std::ostringstream oss; | ||
| oss << "[dbg] MR path: " << (dmabuf_fd >= 0 ? "dmabuf" : "peermem/ibv_reg_mr") | ||
| << ", addr 0x" << std::hex << std::uppercase << (uintptr_t)addr << std::dec | ||
| << " len 0x" << std::hex << (uint64_t)tot_size << std::dec | ||
| << " lkey 0x" << std::hex << (uint32_t)lkey << std::dec | ||
| << " rkey 0x" << std::hex << (uint32_t)rkey << std::dec; | ||
| NIXL_INFO << oss.str(); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls use NIXL_DEBUG instead of this
| // lkey = htobe32(ibmr->lkey); | ||
| // rkey = htobe32(ibmr->rkey); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls remove
| ((volatile struct docaNotif *)notif_send_cpu)->msg_buf = msg_buf; | ||
| ((volatile struct docaNotif *)notif_send_cpu)->msg_lkey = notif->send_mr->get_lkey(); | ||
| ((volatile struct docaNotif *)notif_send_cpu)->msg_size = newMsg.size(); | ||
| // ((volatile struct docaNotif *)notif_send_cpu)->msg_lkey =notif->send_mr->get_lkey(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls remove
| xferReqRingCpu[treq->end_pos - 1].lbuf_notif = notif_addr; | ||
| xferReqRingCpu[treq->end_pos - 1].lkey_notif = notif->send_mr->get_lkey(); | ||
| uint32_t notif_lkey_host = notif->send_mr->get_lkey(); | ||
| // xferReqRingCpu[treq->end_pos - 1].lkey_notif = notif_lkey_host; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
| //uint32_t lkey = xferReqRingCpu[pos].lkey[idx]; | ||
| //uint32_t rkey = xferReqRingCpu[pos].rkey[idx]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
| NIXL_INFO << "GPUNETIO registerMem publish dev " << priv->devId << " addr " | ||
| << format_hex((uintptr_t)priv->mr->get_addr()) << " len " | ||
| << format_hex((uint64_t)priv->mr->get_tot_size()) << " lkey " | ||
| << format_hex(lkey) << " rkey " << format_hex(rkey); | ||
| if (debug_dump) { | ||
| std::ostringstream oss; | ||
| oss << " [dbg] publish raw: dev=" << priv->devId << " addr_dec=" | ||
| << (uintptr_t)priv->mr->get_addr() << " len_dec=" | ||
| << (uint64_t)priv->mr->get_tot_size() << " lkey_dec=" << lkey << " rkey_dec=" | ||
| << rkey; | ||
| NIXL_INFO << oss.str(); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo it should be NIXL_DEBUG
| ss << (int)ipv4_addr[0] << "." << (int)ipv4_addr[1] << "." << (int)ipv4_addr[2] << "." | ||
| << (int)ipv4_addr[3]; | ||
| str = ss.str(); | ||
| std::cout << "getConnInfo DOCA: " << str << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should not print anything by default except errors
pls use NIXL_DEBUG
| // server_addr.sin_addr.s_addr = INADDR_ANY; | ||
| /* listen on any interface */ | ||
| std::memcpy(&server_addr.sin_addr.s_addr, ipv4_addr, sizeof(ipv4_addr)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // server_addr.sin_addr.s_addr = INADDR_ANY; | |
| /* listen on any interface */ | |
| std::memcpy(&server_addr.sin_addr.s_addr, ipv4_addr, sizeof(ipv4_addr)); | |
| std::memcpy(&server_addr.sin_addr.s_addr, ipv4_addr, sizeof(ipv4_addr)); |
| notifMap[remote_agent] = notif; | ||
| ((volatile struct docaNotif *)notif_fill_cpu)->msg_buf = (uintptr_t)notif->recv_addr; | ||
| ((volatile struct docaNotif *)notif_fill_cpu)->msg_lkey = notif->recv_mr->get_lkey(); | ||
| // ((volatile struct docaNotif *)notif_fill_cpu)->msg_lkey = notif->recv_mr->get_lkey(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // ((volatile struct docaNotif *)notif_fill_cpu)->msg_lkey = notif->recv_mr->get_lkey(); |
| else | ||
| swap_keys_config = true; | ||
| } | ||
| const char *env_dbg = std::getenv("NIXL_GPUNETIO_DEBUG_DUMP"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not using NIXL_DEBUG instead?
|
@e-ago, can you pls review? |
What?
This PR fixs the GPUNetIO backend to make nixlbench run on intranode.
Why?
The DOCA couldn't start transfer data in our server envs, with following log:
prepare_write radd 7f8637fff010 rkey 130100 ladd 7f6180000000 lkey d2100100 size 4096 prepare_write radd 7f8637fff010 rkey 130100 ladd 7f6180000000 lkey d2100100 size 4096 >>>>>>> CUDA rdma write kernel pos 0 posted 512 buffers from base_wqe_idx 0 got completion with err: syndrome=0x5, vendor_err_synd=0xf9, hw_err_synd=0, hw_synd_type=0, wqe_counter=65281 wqe_qpn=ea030008 kernel_progress: block 0 error CQE! poll_status -5 wqe 511 index 0I had tried many versions of code in community, but ended up with above log.
So, i am uploading an working version which ran on our local servers.
Ref:
#952 (comment)
#788
NVIDIA-DOCA/gpunetio#2 (comment)
How to run:
NIXL_DOCASIM_IPV4_OVERRIDEuse the inet ip of mlx5_bond0. One can obtain it by running commandip acc @e-ago @ovidiusm