rocprofiler-sdk/rccl/api_args.h Source File

rocprofiler-sdk/rccl/api_args.h Source File#

Rocprofiler SDK Developer API: rocprofiler-sdk/rccl/api_args.h Source File
Rocprofiler SDK Developer API 0.6.0
ROCm Profiling API and tools
api_args.h
Go to the documentation of this file.
1// MIT License
2//
3// Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved.
4//
5// Permission is hereby granted, free of charge, to any person obtaining a copy
6// of this software and associated documentation files (the "Software"), to deal
7// in the Software without restriction, including without limitation the rights
8// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9// copies of the Software, and to permit persons to whom the Software is
10// furnished to do so, subject to the following conditions:
11//
12// The above copyright notice and this permission notice shall be included in
13// all copies or substantial portions of the Software.
14//
15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21// THE SOFTWARE.
22
23#pragma once
24
27
28#if !defined(ROCPROFILER_SDK_USE_SYSTEM_RCCL)
29# if defined __has_include
30# if __has_include(<rccl/rccl.h>)
31# define ROCPROFILER_SDK_USE_SYSTEM_RCCL 1
32# else
33# define ROCPROFILER_SDK_USE_SYSTEM_RCCL 0
34# endif
35# else
36# define ROCPROFILER_SDK_USE_SYSTEM_RCCL 0
37# endif
38#endif
39
40#if ROCPROFILER_SDK_USE_SYSTEM_RCCL > 0
41# include <rccl/rccl.h>
42#else
44#endif
45
46#include <stdint.h>
47
48ROCPROFILER_EXTERN_C_INIT
49
50// Empty struct has a size of 0 in C but size of 1 in C++.
51// This struct is added to the union members which represent
52// functions with no arguments to ensure ABI compatibility
57
63
65{
66 struct
67 {
68 const void* sendbuff;
69 void* recvbuff;
70 size_t sendcount;
71 ncclDataType_t datatype;
72 ncclComm_t comm;
73 hipStream_t stream;
75 struct
76 {
77 const void* sendbuff;
78 void* recvbuff;
79 size_t count;
80 ncclDataType_t datatype;
81 ncclRedOp_t op;
82 struct ncclComm* comm;
83 hipStream_t stream;
85 struct
86 {
87 const void* sendbuff;
88 void* recvbuff;
89 size_t count;
90 ncclDataType_t datatype;
91 ncclComm_t comm;
92 hipStream_t stream;
94 struct
95 {
96 const void* sendbuff;
97 const size_t* sendcounts;
98 const size_t* sdispls;
99 void* recvbuff;
100 const size_t* recvcounts;
101 const size_t* rdispls;
102 ncclDataType_t datatype;
103 ncclComm_t comm;
104 hipStream_t stream;
106 struct
107 {
108 const void* sendbuff;
109 void* recvbuff;
110 size_t count;
111 ncclDataType_t datatype;
112 int root;
113 ncclComm_t comm;
114 hipStream_t stream;
116 struct
117 {
118 const void* sendbuff;
119 void* recvbuff;
120 size_t sendcount;
121 ncclDataType_t datatype;
122 int root;
123 ncclComm_t comm;
124 hipStream_t stream;
126 struct
127 {
128 const void* sendbuff;
129 void* recvbuff;
130 size_t count;
131 ncclDataType_t datatype;
132 ncclRedOp_t op;
133 int root;
134 ncclComm_t comm;
135 hipStream_t stream;
137 struct
138 {
139 const void* sendbuff;
140 void* recvbuff;
141 size_t recvcount;
142 ncclDataType_t datatype;
143 ncclRedOp_t op;
144 struct ncclComm* comm;
145 hipStream_t stream;
147 struct
148 {
149 const void* sendbuff;
150 void* recvbuff;
151 size_t recvcount;
152 ncclDataType_t datatype;
153 int root;
154 ncclComm_t comm;
155 hipStream_t stream;
157 struct
158 {
159 const void* sendbuff;
160 size_t count;
161 ncclDataType_t datatype;
162 int peer;
163 ncclComm_t comm;
164 hipStream_t stream;
166 struct
167 {
168 void* recvbuff;
169 size_t count;
170 ncclDataType_t datatype;
171 int peer;
172 ncclComm_t comm;
173 hipStream_t stream;
175 struct
176 {
177 ncclRedOp_t* op;
178 void* scalar;
179 ncclDataType_t datatype;
180 ncclScalarResidence_t residence;
181 ncclComm_t comm;
183 struct
184 {
185 ncclRedOp_t op;
186 ncclComm_t comm;
192 struct
193 {
196 struct
197 {
198 int* version;
200 struct
201 {
202 ncclUniqueId* out;
204 struct
205 {
206 ncclComm_t* newcomm;
207 int nranks;
208 ncclUniqueId commId;
209 int myrank;
211 struct
212 {
213 ncclComm_t* comms;
214 int ndev;
215 const int* devlist;
217 struct
218 {
219 ncclComm_t* comm;
220 int nranks;
221 ncclUniqueId commId;
222 int myrank;
223 ncclConfig_t* config;
225 struct
226 {
227 ncclComm_t comm;
229 struct
230 {
231 ncclComm_t comm;
233 struct
234 {
235 ncclComm_t comm;
237 struct
238 {
239 ncclComm_t comm;
240 int color;
241 int key;
242 ncclComm_t* newcomm;
243 ncclConfig_t* config;
245 struct
246 {
247 ncclResult_t code;
249 struct
250 {
251 ncclComm_t comm;
253 struct
254 {
255 ncclComm_t comm;
256 ncclResult_t* asyncError;
258 struct
259 {
260 ncclComm_t comm;
261 int* count;
263 struct
264 {
265 ncclComm_t comm;
266 int* devid;
268 struct
269 {
270 ncclComm_t comm;
271 int* rank;
273 struct
274 {
275 void** ptr;
276 size_t size;
278 struct
279 {
280 void* ptr;
282 struct
283 {
284 const char* mscclAlgoFilePath;
285 mscclAlgoHandle_t* mscclAlgoHandle;
286 int rank;
288 struct
289 {
290 const void* sendBuff;
291 const size_t* sendCounts;
292 const size_t* sDisPls;
293 void* recvBuff;
294 const size_t* recvCounts;
295 const size_t* rDisPls;
296 size_t count;
297 ncclDataType_t dataType;
298 int root;
299 int peer;
300 ncclRedOp_t op;
301 mscclAlgoHandle_t mscclAlgoHandle;
302 ncclComm_t comm;
303 hipStream_t stream;
305 struct
306 {
307 mscclAlgoHandle_t mscclAlgoHandle;
309 struct
310 {
311 ncclComm_t comm;
312 void* buff;
313 size_t size;
314 void** handle;
316 struct
317 {
318 ncclComm_t comm;
319 void* handle;
321
323
324ROCPROFILER_EXTERN_C_FINI
int mscclAlgoHandle_t
Opaque handle to MSCCL algorithm.
Definition rccl.h:944
ncclScalarResidence_t
Location and dereferencing logic for scalar arguments.
Definition rccl.h:469
ncclRedOp_t
Reduction operation selector.
Definition rccl.h:417
ncclDataType_t
Data types.
Definition rccl.h:431
ncclResult_t
Result type.
Definition rccl.h:56
struct rocprofiler_rccl_api_args_t::@733 ncclCommInitAll
struct rocprofiler_rccl_api_args_t::@728 ncclGroupStart
struct rocprofiler_rccl_api_args_t::@716 ncclAllReduce
struct rocprofiler_rccl_api_args_t::@715 ncclAllGather
struct rocprofiler_rccl_api_args_t::@726 ncclRedOpCreatePreMulSum
struct rocprofiler_rccl_api_args_t::@740 ncclGetLastError
struct rocprofiler_rccl_api_args_t::@719 ncclBroadcast
struct rocprofiler_rccl_api_args_t::@734 ncclCommInitRankConfig
struct rocprofiler_rccl_api_args_t::@748 mscclRunAlgo
struct rocprofiler_rccl_api_args_t::@742 ncclCommCount
const char * const_charp_retval
Definition api_args.h:61
struct rocprofiler_rccl_api_args_t::@732 ncclCommInitRank
struct rocprofiler_rccl_api_args_t::@739 ncclGetErrorString
struct rocprofiler_rccl_api_args_t::@743 ncclCommCuDevice
struct rocprofiler_rccl_api_args_t::@718 ncclAllToAllv
struct rocprofiler_rccl_api_args_t::@730 ncclGetVersion
struct rocprofiler_rccl_api_args_t::@750 ncclCommRegister
struct rocprofiler_rccl_api_args_t::@720 ncclGather
struct rocprofiler_rccl_api_args_t::@721 ncclReduce
struct rocprofiler_rccl_api_args_t::@746 ncclMemFree
struct rocprofiler_rccl_api_args_t::@745 ncclMemAlloc
struct rocprofiler_rccl_api_args_t::@747 mscclLoadAlgo
struct rocprofiler_rccl_api_args_t::@749 mscclUnloadAlgo
struct rocprofiler_rccl_api_args_t::@717 ncclAllToAll
struct rocprofiler_rccl_api_args_t::@736 ncclCommDestroy
struct rocprofiler_rccl_api_args_t::@741 ncclCommGetAsyncError
struct rocprofiler_rccl_api_args_t::@723 ncclScatter
struct rocprofiler_rccl_api_args_t::@725 ncclRecv
struct rocprofiler_rccl_api_args_t::@727 ncclRedOpDestroy
struct rocprofiler_rccl_api_args_t::@751 ncclCommDeregister
struct rocprofiler_rccl_api_args_t::@737 ncclCommAbort
struct rocprofiler_rccl_api_args_t::@724 ncclSend
struct rocprofiler_rccl_api_args_t::@738 ncclCommSplit
struct rocprofiler_rccl_api_args_t::@744 ncclCommUserRank
struct rocprofiler_rccl_api_args_t::@729 ncclGroupEnd
struct rocprofiler_rccl_api_args_t::@735 ncclCommFinalize
struct rocprofiler_rccl_api_args_t::@722 ncclReduceScatter
struct rocprofiler_rccl_api_args_t::@731 ncclGetUniqueId
const struct ncclComm * ncclComm_t
Opaque handle to communicator.
Definition rccl.h:38
Opaque unique id used to initialize communicators.
Definition rccl.h:45