13 struct system_topology_info;
104 cucascade::memory::system_topology_info
const& topology,
int gpu_id
155 std::optional<unsigned int> gpu_id = std::nullopt,
bind_options const& options = {}
184 cucascade::memory::system_topology_info
const& topology,
185 std::optional<unsigned int> gpu_id = std::nullopt,
std::optional< expected_binding > get_expected_binding(cucascade::memory::system_topology_info const &topology, int gpu_id)
Obtain the expected binding for a GPU from pre-discovered topology.
resource_binding check_binding(int gpu_id_hint=-1)
Collect the live resource binding of the calling process.
binding_validation validate_binding(resource_binding const &actual, expected_binding const &expected)
Validate an actual resource binding against an expected one.
void bind(std::optional< unsigned int > gpu_id=std::nullopt, bind_options const &options={})
Bind the calling process to resources topologically close to a GPU.
Options controlling which topology-based resource bindings to apply.
bool network
Set UCX_NET_DEVICES to NICs near the GPU.
bool memory
Set NUMA memory policy to nodes near the GPU.
bool verify
Read back and verify bindings after applying them.
bool cpu
Set CPU affinity to cores near the GPU.
Results of validating actual vs. expected resource bindings.
std::string expected_ucx_devices
Expected UCX devices (comma-separated).
bool cpu_ok
CPU affinity check passed.
bool all_passed() const
Check if all validations passed.
bool numa_ok
NUMA binding check passed.
bool ucx_ok
UCX network devices check passed.
Expected resource binding derived from topology information.
std::vector< std::string > network_devices
Expected network devices.
std::vector< int > memory_binding
Expected NUMA node IDs.
std::string cpu_affinity
Expected CPU affinity list.
Live resource binding configuration collected from the running process.
std::string ucx_net_devices
Value of the UCX_NET_DEVICES env var.
int rank
Process rank (-1 if not available).
std::vector< int > numa_nodes
NUMA node IDs bound to this process.
std::string cpu_affinity
CPU affinity string (e.g., "0-19,40-59").
std::string gpu_pci_bus_id
GPU PCI bus ID (empty if unavailable).
int gpu_id
GPU device ID (-1 if not available).