Realm
A distributed, event-based tasking library
Loading...
Searching...
No Matches
bootstrap.h
Go to the documentation of this file.
1/*
2 * Copyright 2026 NVIDIA Corporation
3 * SPDX-License-Identifier: Apache-2.0
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18// UCP bootstrap
19
20#ifndef UCP_BOOTSTRAP_H
21#define UCP_BOOTSTRAP_H
22
23#define BOOTSTRAP_ERROR_INTERNAL -1
24
31
32typedef struct bootstrap_handle {
37 // TODO: Do we really need all these?!? As far as I can tell this interface
38 // only requires the allgather function and nothing else
40 int (*bcast)(void *buf, int bytes, int root, struct bootstrap_handle *handle);
41 int (*gather)(const void *sendbuf, void *recvbuf, int bytes, int root,
42 struct bootstrap_handle *handle);
43 int (*allgather)(const void *sendbuf, void *recvbuf, int bytes,
44 struct bootstrap_handle *handle);
45 int (*alltoall)(const void *sendbuf, void *recvbuf, int bytes,
46 struct bootstrap_handle *handle);
47 int (*allreduce_ull)(const void *sendbuf, void *recvbuf, int count,
48 enum reduction_op op, struct bootstrap_handle *handle);
49 int (*allgatherv)(const void *sendbuf, void *recvbuf, int *sizes, int *offsets,
50 struct bootstrap_handle *handle);
53
54#ifdef __cplusplus
55extern "C" {
56extern int realm_ucp_bootstrap_plugin_init(void *arg, bootstrap_handle_t *handle)
57 __attribute__((visibility("default")));
58}
59#else
60__attribute__((visibility("default"))) int
61realm_ucp_bootstrap_plugin_init(void *arg, bootstrap_handle_t *handle);
62#endif
63
64#endif
bootstrap_handle_t * handle
Definition bootstrap.h:61
__attribute__((visibility("default"))) int realm_ucp_bootstrap_plugin_init(void *arg
reduction_op
Definition bootstrap.h:26
@ REDUCTION_MAX
Definition bootstrap.h:29
@ REDUCTION_LAST
Definition bootstrap.h:28
@ REDUCTION_SUM
Definition bootstrap.h:27
struct bootstrap_handle bootstrap_handle_t
Definition bootstrap.h:32
int * shared_ranks
Definition bootstrap.h:35
int(* finalize)(struct bootstrap_handle *handle)
Definition bootstrap.h:51
int(* alltoall)(const void *sendbuf, void *recvbuf, int bytes, struct bootstrap_handle *handle)
Definition bootstrap.h:45
int(* allgather)(const void *sendbuf, void *recvbuf, int bytes, struct bootstrap_handle *handle)
Definition bootstrap.h:43
int(* barrier)(struct bootstrap_handle *handle)
Definition bootstrap.h:39
int pg_size
Definition bootstrap.h:34
int pg_rank
Definition bootstrap.h:33
int(* bcast)(void *buf, int bytes, int root, struct bootstrap_handle *handle)
Definition bootstrap.h:40
int(* allgatherv)(const void *sendbuf, void *recvbuf, int *sizes, int *offsets, struct bootstrap_handle *handle)
Definition bootstrap.h:49
int(* allreduce_ull)(const void *sendbuf, void *recvbuf, int count, enum reduction_op op, struct bootstrap_handle *handle)
Definition bootstrap.h:47
int num_shared_ranks
Definition bootstrap.h:36
int(* gather)(const void *sendbuf, void *recvbuf, int bytes, int root, struct bootstrap_handle *handle)
Definition bootstrap.h:41