Realm
A distributed, event-based tasking library
Loading...
Searching...
No Matches
oob_group_comm.h
Go to the documentation of this file.
1/*
2 * Copyright 2025 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#ifndef __OOB_GROUPCOMM_H__
19#define __OOB_GROUPCOMM_H__
20
21#include <memory>
22#include <vector>
23
24#include <ucc/api/ucc.h>
25
26#include "bootstrap/bootstrap.h"
27
28namespace Realm {
29 namespace ucc {
30 // @class OOBGroupComm
31 // @brief Class responsible for out-of-band group communication duing UCC
32 // initialization
34 int rank_;
35 int world_sz_;
36 static bootstrap_handle_t boot_handle_;
37 // boot_handle for allgather
38 public:
39 // @brief Constructor
40 // @param r Rank of the process
41 // @param ws World size
42 // @param bh Ptr to p2p boot handle where custom all-gather present.
43 OOBGroupComm(int r, int ws, bootstrap_handle_t *bh);
44
45 // @brief Out-of-band AllGather collectives
46 // @param sbuf Starting address of the send buffer
47 // @param rbuf Starting address of the receive buffer
48 // @param msglen Length of data received from any process
49 // @param coll_info Ptr to group communicator used for the out-of-band
50 // communication.
51 // @return UCC_OK if success, UCC_ERR_LAST otherwise.
52 static ucc_status_t oob_allgather(void *sbuf, void *rbuf, size_t msglen,
53 void *coll_info, void **req);
54
55 // @brief Out-of-band allGather test.
56 // This is currently noops(or always succeed). Since the custom
57 // p2p all-gather operation is synchronous, there is no need to
58 // check the check/test the status of the operation. In case of
59 // non-blocking all-gather() collecitve, ucc context/team
60 // creation api relies on this function to test the status of oob
61 // allgather
62 // @param req pointer to the ucc collective request handle
63 // @return UCC_OK - always succeed.
64 static ucc_status_t oob_allgather_test(void *req);
65
66 // @brief Out-of-band allGather test.
67 // This is currently noops(or always succeed).
68 // @param req pointer to the ucc collective request handle
69 // @return UCC_OK - always succeed.
70 static ucc_status_t oob_allgather_free(void *req);
71
72 int get_rank();
75 };
76 } // namespace ucc
77} // namespace Realm
78
79#endif
Definition oob_group_comm.h:33
static ucc_status_t oob_allgather_free(void *req)
OOBGroupComm(int r, int ws, bootstrap_handle_t *bh)
static ucc_status_t oob_allgather(void *sbuf, void *rbuf, size_t msglen, void *coll_info, void **req)
static ucc_status_t oob_allgather_test(void *req)
Definition activemsg.h:38
Definition bootstrap.h:32