---
# System prepended metadata

title: 8/25 UCX
tags: [筆記]

---

---
tags: 筆記
---

# 8/25 UCX

## UCX
- RDMA Verbs 的 API
- 支援 VM, docker
- [example](https://github.com/wfaderhold21/apac-ucx-example)
## UCX API
### UCP object
![](https://i.imgur.com/4L2nMwd.png)
- ucp_context_h
    - Application
- ucp_worker_h
- ucp_listener_h
    - listen 在某 address/port
- ucp_ep_h
    - endpoint, 處理 connect
- ucp_mem_h
    - 處理 memory
- ucp_rkey_h
    - remote key, 處理 remote memory

### Remote memory access API
執行 read/write/atomic
- write(put)
    - ucp_put_nbx(...)
- read(get)
    - ucp_get_nbx(...)
- atomic
    - ucp_atomic_op_nbx(...)

### stream-based send/recv API
像 TCP 的 stream-oriented send/recv
- send bytes
    - ucp_stream_send_nbx(...)
- recv bytes
    - ucp_stream_recv_nbx(...)
- fetch next data fragment
    - ucp_stream_recv_data(...)

### Init
- ucp_worker_create(...)
- init_context(...)
- init_worker(...)
- ucp_listener_create(...)
- ucp_ep_create(...)