Skip to content

Conversation

@GirasoleY
Copy link
Contributor

Summary:
Decouple getDeviceCq()/getDeviceQp() from host CQ/QP structs.

  • Separates host IB abstractions from GPU device mapping logic
  • All GPU memory mapping stays in ibgda module
  • Eliminates architectural concern about GPU code in generic IB layer

Changes:

  • Move IbvCq::getDeviceCq() -> ctran::ibgda::getDeviceCq()
  • Move IbvQp::getDeviceQp() -> ctran::ibgda::getDeviceQp()
  • Move sanityCheckCqInitialization helper to ibgda
  • Update call sites in init.cc to use new free functions
  • Move tests from IbverbxTest to InitTest

Differential Revision: D91729246

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 30, 2026
@meta-codesync
Copy link

meta-codesync bot commented Jan 30, 2026

@GirasoleY has exported this pull request. If you are a Meta employee, you can view the originating Diff in D91729246.

Summary:

Move CtranIbQpUtils.{h,cc} from comms/ctran/backends/ib to
comms/ctran/ibverbx as IbvQpUtils.{h,cc}. This refactor:

- Moves the QP utility functions to the ibverbx library where they belong
- Changes namespace from ctran::ib to ibverbx
- Renames types and functions to remove "CtranIb" prefix:
  - CtranIbRemoteQpInfo → RemoteQpInfo
  - ctranIbQpCreate → createRcQp
  - ctranIbQpInit → initQp
  - ctranIbQpRTR → rtrQp
  - ctranIbQpRTS → rtsQp

This allows ibgda and other components to depend on ibverbx without
creating circular dependencies through backends/ib.

Reviewed By: minsii

Differential Revision: D91712642
Summary:

Extract MLX5 hardware-specific structs from Ibvcore.h into a dedicated
Mlx5core.h header. This separates low-level C structs that map directly
to MLX5 NIC hardware structures (CQEs, WQEs, doorbells) from the
higher-level ibverbs abstractions.

These structs are used for:
- GPU-direct RDMA (IBGDA) where kernels directly manipulate NIC structures
- Host-side mlx5dv (direct verbs) operations
- Parsing completion queue entries and work queue elements

Reviewed By: minsii, cenzhaometa

Differential Revision: D91715121
Summary:

Decouple `getDeviceCq()`/`getDeviceQp()` from host CQ/QP structs.
- Separates host IB abstractions from GPU device mapping logic
- All GPU memory mapping stays in ibgda module
- Eliminates architectural concern about GPU code in generic IB layer

Changes:
- Move IbvCq::getDeviceCq() -> ctran::ibgda::getDeviceCq()
- Move IbvQp::getDeviceQp() -> ctran::ibgda::getDeviceQp()
- Move sanityCheckCqInitialization helper to ibgda
- Update call sites in init.cc to use new free functions
- Move tests from IbverbxTest to InitTest

Differential Revision: D91729246
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant