HIP: Heterogenous-computing Interface for Portability
hip_prof_str.h
1 // automatically generated sources
2 #ifndef _HIP_PROF_STR_H
3 #define _HIP_PROF_STR_H
4 #include <sstream>
5 #include <string>
6 
7 // Dummy API callbacks definition
8 #define INIT_NONE_CB_ARGS_DATA(cb_data) {};
9 #define INIT_hipHccGetAccelerator_CB_ARGS_DATA(cb_data) {};
10 #define INIT_hipHccGetAcceleratorView_CB_ARGS_DATA(cb_data) {};
11 #define INIT_hipDeviceCanAccessPeer2_CB_ARGS_DATA(cb_data) {};
12 #define INIT_hipMemcpyPeer2_CB_ARGS_DATA(cb_data) {};
13 #define INIT_hipMemcpyPeerAsync2_CB_ARGS_DATA(cb_data) {};
14 #define INIT_hipCreateTextureObject_CB_ARGS_DATA(cb_data) {};
15 #define INIT_hipDestroyTextureObject_CB_ARGS_DATA(cb_data) {};
16 #define INIT_hipGetTextureObjectResourceDesc_CB_ARGS_DATA(cb_data) {};
17 #define INIT_hipGetTextureObjectResourceViewDesc_CB_ARGS_DATA(cb_data) {};
18 #define INIT_hipGetTextureObjectTextureDesc_CB_ARGS_DATA(cb_data) {};
19 #define INIT_hipBindTexture_CB_ARGS_DATA(cb_data) {};
20 #define INIT_hipBindTexture2D_CB_ARGS_DATA(cb_data) {};
21 #define INIT_hipBindTextureToArray_CB_ARGS_DATA(cb_data) {};
22 #define INIT_hipBindTextureToMipmappedArray_CB_ARGS_DATA(cb_data) {};
23 #define INIT_hipUnbindTexture_CB_ARGS_DATA(cb_data) {};
24 #define INIT_hipGetChannelDesc_CB_ARGS_DATA(cb_data) {};
25 #define INIT_hipGetTextureAlignmentOffset_CB_ARGS_DATA(cb_data) {};
26 #define INIT_hipGetTextureReference_CB_ARGS_DATA(cb_data) {};
27 #define INIT_hipTexRefSetFormat_CB_ARGS_DATA(cb_data) {};
28 #define INIT_hipTexRefSetFlags_CB_ARGS_DATA(cb_data) {};
29 #define INIT_hipTexRefSetFilterMode_CB_ARGS_DATA(cb_data) {};
30 #define INIT_hipTexRefSetAddressMode_CB_ARGS_DATA(cb_data) {};
31 #define INIT_hipTexRefSetArray_CB_ARGS_DATA(cb_data) {};
32 #define INIT_hipTexRefSetAddress_CB_ARGS_DATA(cb_data) {};
33 #define INIT_hipTexRefSetAddress2D_CB_ARGS_DATA(cb_data) {};
34 #define INIT_hipMemcpyHtoH_CB_ARGS_DATA(cb_data) {};
35 #define INIT_hipGetErrorName_CB_ARGS_DATA(cb_data) {};
36 #define INIT_hipGetErrorString_CB_ARGS_DATA(cb_data) {};
37 #define INIT_hipCreateSurfaceObject_CB_ARGS_DATA(cb_data) {};
38 #define INIT_hipDestroySurfaceObject_CB_ARGS_DATA(cb_data) {};
39 #define INIT_hipStreamCreateWithPriority_CB_ARGS_DATA(cb_data) {};
40 #define INIT_hipDeviceGetStreamPriorityRange_CB_ARGS_DATA(cb_data) {};
41 #define INIT_hipStreamGetPriority_CB_ARGS_DATA(cb_data) {};
42 
43 // HIP API callbacks ID enumaration
44 enum hip_api_id_t {
45  HIP_API_ID_hipHostFree = 0,
46  HIP_API_ID_hipMemcpyToSymbolAsync = 1,
47  HIP_API_ID_hipMallocPitch = 2,
48  HIP_API_ID_hipMalloc = 3,
49  HIP_API_ID_hipDeviceGetName = 4,
50  HIP_API_ID_hipEventRecord = 5,
51  HIP_API_ID_hipCtxSynchronize = 6,
52  HIP_API_ID_hipSetDevice = 7,
53  HIP_API_ID_hipSetupArgument = 8,
54  HIP_API_ID_hipMemcpyFromSymbolAsync = 9,
55  HIP_API_ID_hipMemcpyDtoD = 10,
56  HIP_API_ID_hipMemcpy2DToArray = 11,
57  HIP_API_ID_hipCtxGetCacheConfig = 12,
58  HIP_API_ID_hipStreamWaitEvent = 13,
59  HIP_API_ID_hipModuleLoad = 14,
60  HIP_API_ID_hipDevicePrimaryCtxSetFlags = 15,
61  HIP_API_ID_hipMemcpyAsync = 16,
62  HIP_API_ID_hipMalloc3DArray = 17,
63  HIP_API_ID_hipStreamCreate = 18,
64  HIP_API_ID_hipCtxGetCurrent = 19,
65  HIP_API_ID_hipDevicePrimaryCtxGetState = 20,
66  HIP_API_ID_hipEventQuery = 21,
67  HIP_API_ID_hipEventCreate = 22,
68  HIP_API_ID_hipMemGetAddressRange = 23,
69  HIP_API_ID_hipMemcpyFromSymbol = 24,
70  HIP_API_ID_hipArrayCreate = 25,
71  HIP_API_ID_hipStreamGetFlags = 26,
72  HIP_API_ID_hipMallocArray = 27,
73  HIP_API_ID_hipCtxGetSharedMemConfig = 28,
74  HIP_API_ID_hipMemPtrGetInfo = 29,
75  HIP_API_ID_hipCtxGetFlags = 30,
76  HIP_API_ID_hipStreamDestroy = 31,
77  HIP_API_ID_hipMemset3DAsync = 32,
78  HIP_API_ID_hipMemcpy3D = 33,
79  HIP_API_ID_hipInit = 34,
80  HIP_API_ID_hipMemcpyAtoH = 35,
81  HIP_API_ID_hipMemset2D = 36,
82  HIP_API_ID_hipMemset2DAsync = 37,
83  HIP_API_ID_hipDeviceCanAccessPeer = 38,
84  HIP_API_ID_hipDeviceEnablePeerAccess = 39,
85  HIP_API_ID_hipModuleUnload = 40,
86  HIP_API_ID_hipHostUnregister = 41,
87  HIP_API_ID_hipProfilerStop = 42,
88  HIP_API_ID_hipLaunchByPtr = 43,
89  HIP_API_ID_hipStreamSynchronize = 44,
90  HIP_API_ID_hipFreeHost = 45,
91  HIP_API_ID_hipRemoveApiCallback = 46,
92  HIP_API_ID_hipDeviceSetCacheConfig = 47,
93  HIP_API_ID_hipCtxGetApiVersion = 48,
94  HIP_API_ID_hipMemcpyHtoD = 49,
95  HIP_API_ID_hipModuleGetGlobal = 50,
96  HIP_API_ID_hipMemcpyHtoA = 51,
97  HIP_API_ID_hipCtxCreate = 52,
98  HIP_API_ID_hipMemcpy2D = 53,
99  HIP_API_ID_hipIpcCloseMemHandle = 54,
100  HIP_API_ID_hipChooseDevice = 55,
101  HIP_API_ID_hipDeviceSetSharedMemConfig = 56,
102  HIP_API_ID_hipDeviceComputeCapability = 57,
103  HIP_API_ID_hipRegisterApiCallback = 58,
104  HIP_API_ID_hipDeviceGet = 59,
105  HIP_API_ID_hipProfilerStart = 60,
106  HIP_API_ID_hipCtxSetCacheConfig = 61,
107  HIP_API_ID_hipFuncSetCacheConfig = 62,
108  HIP_API_ID_hipMemcpyPeerAsync = 63,
109  HIP_API_ID_hipEventElapsedTime = 64,
110  HIP_API_ID_hipDevicePrimaryCtxReset = 65,
111  HIP_API_ID_hipEventDestroy = 66,
112  HIP_API_ID_hipCtxPopCurrent = 67,
113  HIP_API_ID_hipHostGetFlags = 68,
114  HIP_API_ID_hipHostMalloc = 69,
115  HIP_API_ID_hipDriverGetVersion = 70,
116  HIP_API_ID_hipMemGetInfo = 71,
117  HIP_API_ID_hipDeviceReset = 72,
118  HIP_API_ID_hipMemset = 73,
119  HIP_API_ID_hipMemsetD8 = 74,
120  HIP_API_ID_hipHostRegister = 75,
121  HIP_API_ID_hipCtxSetSharedMemConfig = 76,
122  HIP_API_ID_hipArray3DCreate = 77,
123  HIP_API_ID_hipIpcOpenMemHandle = 78,
124  HIP_API_ID_hipGetLastError = 79,
125  HIP_API_ID_hipCtxDestroy = 80,
126  HIP_API_ID_hipDeviceGetSharedMemConfig = 81,
127  HIP_API_ID_hipRegisterActivityCallback = 82,
128  HIP_API_ID_hipSetDeviceFlags = 83,
129  HIP_API_ID_hipFree = 84,
130  HIP_API_ID_hipDeviceGetAttribute = 85,
131  HIP_API_ID_hipMemcpyDtoH = 86,
132  HIP_API_ID_hipCtxDisablePeerAccess = 87,
133  HIP_API_ID_hipDeviceGetByPCIBusId = 88,
134  HIP_API_ID_hipIpcGetMemHandle = 89,
135  HIP_API_ID_hipMemcpyHtoDAsync = 90,
136  HIP_API_ID_hipCtxGetDevice = 91,
137  HIP_API_ID_hipMemset3D = 92,
138  HIP_API_ID_hipModuleLoadData = 93,
139  HIP_API_ID_hipDeviceTotalMem = 94,
140  HIP_API_ID_hipCtxSetCurrent = 95,
141  HIP_API_ID_hipMallocHost = 96,
142  HIP_API_ID_hipDevicePrimaryCtxRetain = 97,
143  HIP_API_ID_hipDeviceDisablePeerAccess = 98,
144  HIP_API_ID_hipStreamCreateWithFlags = 99,
145  HIP_API_ID_hipMemcpyFromArray = 100,
146  HIP_API_ID_hipMemcpy2DAsync = 101,
147  HIP_API_ID_hipFuncGetAttributes = 102,
148  HIP_API_ID_hipEventCreateWithFlags = 103,
149  HIP_API_ID_hipStreamQuery = 104,
150  HIP_API_ID_hipDeviceGetPCIBusId = 105,
151  HIP_API_ID_hipMemcpy = 106,
152  HIP_API_ID_hipPeekAtLastError = 107,
153  HIP_API_ID_hipHostAlloc = 108,
154  HIP_API_ID_hipStreamAddCallback = 109,
155  HIP_API_ID_hipMemcpyToArray = 110,
156  HIP_API_ID_hipDeviceSynchronize = 111,
157  HIP_API_ID_hipDeviceGetCacheConfig = 112,
158  HIP_API_ID_hipMalloc3D = 113,
159  HIP_API_ID_hipPointerGetAttributes = 114,
160  HIP_API_ID_hipMemsetAsync = 115,
161  HIP_API_ID_hipMemcpyToSymbol = 116,
162  HIP_API_ID_hipCtxPushCurrent = 117,
163  HIP_API_ID_hipMemcpyPeer = 118,
164  HIP_API_ID_hipEventSynchronize = 119,
165  HIP_API_ID_hipMemcpyDtoDAsync = 120,
166  HIP_API_ID_hipCtxEnablePeerAccess = 121,
167  HIP_API_ID_hipMemcpyDtoHAsync = 122,
168  HIP_API_ID_hipModuleLaunchKernel = 123,
169  HIP_API_ID_hipModuleGetTexRef = 124,
170  HIP_API_ID_hipRemoveActivityCallback = 125,
171  HIP_API_ID_hipDeviceGetLimit = 126,
172  HIP_API_ID_hipModuleLoadDataEx = 127,
173  HIP_API_ID_hipRuntimeGetVersion = 128,
174  HIP_API_ID_hipGetDeviceProperties = 129,
175  HIP_API_ID_hipFreeArray = 130,
176  HIP_API_ID_hipDevicePrimaryCtxRelease = 131,
177  HIP_API_ID_hipHostGetDevicePointer = 132,
178  HIP_API_ID_hipMemcpyParam2D = 133,
179  HIP_API_ID_hipConfigureCall = 134,
180  HIP_API_ID_hipModuleGetFunction = 135,
181  HIP_API_ID_hipGetDevice = 136,
182  HIP_API_ID_hipGetDeviceCount = 137,
183  HIP_API_ID_hipHccModuleLaunchKernel = 138,
184  HIP_API_ID_NUMBER = 139,
185  HIP_API_ID_ANY = 140,
186 
187  HIP_API_ID_NONE = HIP_API_ID_NUMBER,
188  HIP_API_ID_hipHccGetAccelerator = HIP_API_ID_NUMBER,
189  HIP_API_ID_hipHccGetAcceleratorView = HIP_API_ID_NUMBER,
190  HIP_API_ID_hipDeviceCanAccessPeer2 = HIP_API_ID_NUMBER,
191  HIP_API_ID_hipMemcpyPeer2 = HIP_API_ID_NUMBER,
192  HIP_API_ID_hipMemcpyPeerAsync2 = HIP_API_ID_NUMBER,
193  HIP_API_ID_hipCreateTextureObject = HIP_API_ID_NUMBER,
194  HIP_API_ID_hipDestroyTextureObject = HIP_API_ID_NUMBER,
195  HIP_API_ID_hipGetTextureObjectResourceDesc = HIP_API_ID_NUMBER,
196  HIP_API_ID_hipGetTextureObjectResourceViewDesc = HIP_API_ID_NUMBER,
197  HIP_API_ID_hipGetTextureObjectTextureDesc = HIP_API_ID_NUMBER,
198  HIP_API_ID_hipBindTexture = HIP_API_ID_NUMBER,
199  HIP_API_ID_hipBindTexture2D = HIP_API_ID_NUMBER,
200  HIP_API_ID_hipBindTextureToArray = HIP_API_ID_NUMBER,
201  HIP_API_ID_hipBindTextureToMipmappedArray = HIP_API_ID_NUMBER,
202  HIP_API_ID_hipUnbindTexture = HIP_API_ID_NUMBER,
203  HIP_API_ID_hipGetChannelDesc = HIP_API_ID_NUMBER,
204  HIP_API_ID_hipGetTextureAlignmentOffset = HIP_API_ID_NUMBER,
205  HIP_API_ID_hipGetTextureReference = HIP_API_ID_NUMBER,
206  HIP_API_ID_hipTexRefSetFormat = HIP_API_ID_NUMBER,
207  HIP_API_ID_hipTexRefSetFlags = HIP_API_ID_NUMBER,
208  HIP_API_ID_hipTexRefSetFilterMode = HIP_API_ID_NUMBER,
209  HIP_API_ID_hipTexRefSetAddressMode = HIP_API_ID_NUMBER,
210  HIP_API_ID_hipTexRefSetArray = HIP_API_ID_NUMBER,
211  HIP_API_ID_hipTexRefSetAddress = HIP_API_ID_NUMBER,
212  HIP_API_ID_hipTexRefSetAddress2D = HIP_API_ID_NUMBER,
213  HIP_API_ID_hipMemcpyHtoH = HIP_API_ID_NUMBER,
214  HIP_API_ID_hipGetErrorName = HIP_API_ID_NUMBER,
215  HIP_API_ID_hipGetErrorString = HIP_API_ID_NUMBER,
216  HIP_API_ID_hipCreateSurfaceObject = HIP_API_ID_NUMBER,
217  HIP_API_ID_hipDestroySurfaceObject = HIP_API_ID_NUMBER,
218  HIP_API_ID_hipStreamCreateWithPriority = HIP_API_ID_NUMBER,
219  HIP_API_ID_hipDeviceGetStreamPriorityRange = HIP_API_ID_NUMBER,
220  HIP_API_ID_hipStreamGetPriority = HIP_API_ID_NUMBER,
221 };
222 
223 // Return HIP API string
224 static const char* hip_api_name(const uint32_t& id) {
225  switch(id) {
226  case HIP_API_ID_hipHostFree: return "hipHostFree";
227  case HIP_API_ID_hipMemcpyToSymbolAsync: return "hipMemcpyToSymbolAsync";
228  case HIP_API_ID_hipMallocPitch: return "hipMallocPitch";
229  case HIP_API_ID_hipMalloc: return "hipMalloc";
230  case HIP_API_ID_hipDeviceGetName: return "hipDeviceGetName";
231  case HIP_API_ID_hipEventRecord: return "hipEventRecord";
232  case HIP_API_ID_hipCtxSynchronize: return "hipCtxSynchronize";
233  case HIP_API_ID_hipSetDevice: return "hipSetDevice";
234  case HIP_API_ID_hipSetupArgument: return "hipSetupArgument";
235  case HIP_API_ID_hipMemcpyFromSymbolAsync: return "hipMemcpyFromSymbolAsync";
236  case HIP_API_ID_hipMemcpyDtoD: return "hipMemcpyDtoD";
237  case HIP_API_ID_hipMemcpy2DToArray: return "hipMemcpy2DToArray";
238  case HIP_API_ID_hipCtxGetCacheConfig: return "hipCtxGetCacheConfig";
239  case HIP_API_ID_hipStreamWaitEvent: return "hipStreamWaitEvent";
240  case HIP_API_ID_hipModuleLoad: return "hipModuleLoad";
241  case HIP_API_ID_hipDevicePrimaryCtxSetFlags: return "hipDevicePrimaryCtxSetFlags";
242  case HIP_API_ID_hipMemcpyAsync: return "hipMemcpyAsync";
243  case HIP_API_ID_hipMalloc3DArray: return "hipMalloc3DArray";
244  case HIP_API_ID_hipStreamCreate: return "hipStreamCreate";
245  case HIP_API_ID_hipCtxGetCurrent: return "hipCtxGetCurrent";
246  case HIP_API_ID_hipDevicePrimaryCtxGetState: return "hipDevicePrimaryCtxGetState";
247  case HIP_API_ID_hipEventQuery: return "hipEventQuery";
248  case HIP_API_ID_hipEventCreate: return "hipEventCreate";
249  case HIP_API_ID_hipMemGetAddressRange: return "hipMemGetAddressRange";
250  case HIP_API_ID_hipMemcpyFromSymbol: return "hipMemcpyFromSymbol";
251  case HIP_API_ID_hipArrayCreate: return "hipArrayCreate";
252  case HIP_API_ID_hipStreamGetFlags: return "hipStreamGetFlags";
253  case HIP_API_ID_hipMallocArray: return "hipMallocArray";
254  case HIP_API_ID_hipCtxGetSharedMemConfig: return "hipCtxGetSharedMemConfig";
255  case HIP_API_ID_hipMemPtrGetInfo: return "hipMemPtrGetInfo";
256  case HIP_API_ID_hipCtxGetFlags: return "hipCtxGetFlags";
257  case HIP_API_ID_hipStreamDestroy: return "hipStreamDestroy";
258  case HIP_API_ID_hipMemset3DAsync: return "hipMemset3DAsync";
259  case HIP_API_ID_hipMemcpy3D: return "hipMemcpy3D";
260  case HIP_API_ID_hipInit: return "hipInit";
261  case HIP_API_ID_hipMemcpyAtoH: return "hipMemcpyAtoH";
262  case HIP_API_ID_hipMemset2D: return "hipMemset2D";
263  case HIP_API_ID_hipMemset2DAsync: return "hipMemset2DAsync";
264  case HIP_API_ID_hipDeviceCanAccessPeer: return "hipDeviceCanAccessPeer";
265  case HIP_API_ID_hipDeviceEnablePeerAccess: return "hipDeviceEnablePeerAccess";
266  case HIP_API_ID_hipModuleUnload: return "hipModuleUnload";
267  case HIP_API_ID_hipHostUnregister: return "hipHostUnregister";
268  case HIP_API_ID_hipProfilerStop: return "hipProfilerStop";
269  case HIP_API_ID_hipLaunchByPtr: return "hipLaunchByPtr";
270  case HIP_API_ID_hipStreamSynchronize: return "hipStreamSynchronize";
271  case HIP_API_ID_hipFreeHost: return "hipFreeHost";
272  case HIP_API_ID_hipRemoveApiCallback: return "hipRemoveApiCallback";
273  case HIP_API_ID_hipDeviceSetCacheConfig: return "hipDeviceSetCacheConfig";
274  case HIP_API_ID_hipCtxGetApiVersion: return "hipCtxGetApiVersion";
275  case HIP_API_ID_hipMemcpyHtoD: return "hipMemcpyHtoD";
276  case HIP_API_ID_hipModuleGetGlobal: return "hipModuleGetGlobal";
277  case HIP_API_ID_hipMemcpyHtoA: return "hipMemcpyHtoA";
278  case HIP_API_ID_hipCtxCreate: return "hipCtxCreate";
279  case HIP_API_ID_hipMemcpy2D: return "hipMemcpy2D";
280  case HIP_API_ID_hipIpcCloseMemHandle: return "hipIpcCloseMemHandle";
281  case HIP_API_ID_hipChooseDevice: return "hipChooseDevice";
282  case HIP_API_ID_hipDeviceSetSharedMemConfig: return "hipDeviceSetSharedMemConfig";
283  case HIP_API_ID_hipDeviceComputeCapability: return "hipDeviceComputeCapability";
284  case HIP_API_ID_hipRegisterApiCallback: return "hipRegisterApiCallback";
285  case HIP_API_ID_hipDeviceGet: return "hipDeviceGet";
286  case HIP_API_ID_hipProfilerStart: return "hipProfilerStart";
287  case HIP_API_ID_hipCtxSetCacheConfig: return "hipCtxSetCacheConfig";
288  case HIP_API_ID_hipFuncSetCacheConfig: return "hipFuncSetCacheConfig";
289  case HIP_API_ID_hipMemcpyPeerAsync: return "hipMemcpyPeerAsync";
290  case HIP_API_ID_hipEventElapsedTime: return "hipEventElapsedTime";
291  case HIP_API_ID_hipDevicePrimaryCtxReset: return "hipDevicePrimaryCtxReset";
292  case HIP_API_ID_hipEventDestroy: return "hipEventDestroy";
293  case HIP_API_ID_hipCtxPopCurrent: return "hipCtxPopCurrent";
294  case HIP_API_ID_hipHostGetFlags: return "hipHostGetFlags";
295  case HIP_API_ID_hipHostMalloc: return "hipHostMalloc";
296  case HIP_API_ID_hipDriverGetVersion: return "hipDriverGetVersion";
297  case HIP_API_ID_hipMemGetInfo: return "hipMemGetInfo";
298  case HIP_API_ID_hipDeviceReset: return "hipDeviceReset";
299  case HIP_API_ID_hipMemset: return "hipMemset";
300  case HIP_API_ID_hipMemsetD8: return "hipMemsetD8";
301  case HIP_API_ID_hipHostRegister: return "hipHostRegister";
302  case HIP_API_ID_hipCtxSetSharedMemConfig: return "hipCtxSetSharedMemConfig";
303  case HIP_API_ID_hipArray3DCreate: return "hipArray3DCreate";
304  case HIP_API_ID_hipIpcOpenMemHandle: return "hipIpcOpenMemHandle";
305  case HIP_API_ID_hipGetLastError: return "hipGetLastError";
306  case HIP_API_ID_hipCtxDestroy: return "hipCtxDestroy";
307  case HIP_API_ID_hipDeviceGetSharedMemConfig: return "hipDeviceGetSharedMemConfig";
308  case HIP_API_ID_hipRegisterActivityCallback: return "hipRegisterActivityCallback";
309  case HIP_API_ID_hipSetDeviceFlags: return "hipSetDeviceFlags";
310  case HIP_API_ID_hipFree: return "hipFree";
311  case HIP_API_ID_hipDeviceGetAttribute: return "hipDeviceGetAttribute";
312  case HIP_API_ID_hipMemcpyDtoH: return "hipMemcpyDtoH";
313  case HIP_API_ID_hipCtxDisablePeerAccess: return "hipCtxDisablePeerAccess";
314  case HIP_API_ID_hipDeviceGetByPCIBusId: return "hipDeviceGetByPCIBusId";
315  case HIP_API_ID_hipIpcGetMemHandle: return "hipIpcGetMemHandle";
316  case HIP_API_ID_hipMemcpyHtoDAsync: return "hipMemcpyHtoDAsync";
317  case HIP_API_ID_hipCtxGetDevice: return "hipCtxGetDevice";
318  case HIP_API_ID_hipMemset3D: return "hipMemset3D";
319  case HIP_API_ID_hipModuleLoadData: return "hipModuleLoadData";
320  case HIP_API_ID_hipDeviceTotalMem: return "hipDeviceTotalMem";
321  case HIP_API_ID_hipCtxSetCurrent: return "hipCtxSetCurrent";
322  case HIP_API_ID_hipMallocHost: return "hipMallocHost";
323  case HIP_API_ID_hipDevicePrimaryCtxRetain: return "hipDevicePrimaryCtxRetain";
324  case HIP_API_ID_hipDeviceDisablePeerAccess: return "hipDeviceDisablePeerAccess";
325  case HIP_API_ID_hipStreamCreateWithFlags: return "hipStreamCreateWithFlags";
326  case HIP_API_ID_hipMemcpyFromArray: return "hipMemcpyFromArray";
327  case HIP_API_ID_hipMemcpy2DAsync: return "hipMemcpy2DAsync";
328  case HIP_API_ID_hipFuncGetAttributes: return "hipFuncGetAttributes";
329  case HIP_API_ID_hipEventCreateWithFlags: return "hipEventCreateWithFlags";
330  case HIP_API_ID_hipStreamQuery: return "hipStreamQuery";
331  case HIP_API_ID_hipDeviceGetPCIBusId: return "hipDeviceGetPCIBusId";
332  case HIP_API_ID_hipMemcpy: return "hipMemcpy";
333  case HIP_API_ID_hipPeekAtLastError: return "hipPeekAtLastError";
334  case HIP_API_ID_hipHostAlloc: return "hipHostAlloc";
335  case HIP_API_ID_hipStreamAddCallback: return "hipStreamAddCallback";
336  case HIP_API_ID_hipMemcpyToArray: return "hipMemcpyToArray";
337  case HIP_API_ID_hipDeviceSynchronize: return "hipDeviceSynchronize";
338  case HIP_API_ID_hipDeviceGetCacheConfig: return "hipDeviceGetCacheConfig";
339  case HIP_API_ID_hipMalloc3D: return "hipMalloc3D";
340  case HIP_API_ID_hipPointerGetAttributes: return "hipPointerGetAttributes";
341  case HIP_API_ID_hipMemsetAsync: return "hipMemsetAsync";
342  case HIP_API_ID_hipMemcpyToSymbol: return "hipMemcpyToSymbol";
343  case HIP_API_ID_hipCtxPushCurrent: return "hipCtxPushCurrent";
344  case HIP_API_ID_hipMemcpyPeer: return "hipMemcpyPeer";
345  case HIP_API_ID_hipEventSynchronize: return "hipEventSynchronize";
346  case HIP_API_ID_hipMemcpyDtoDAsync: return "hipMemcpyDtoDAsync";
347  case HIP_API_ID_hipCtxEnablePeerAccess: return "hipCtxEnablePeerAccess";
348  case HIP_API_ID_hipMemcpyDtoHAsync: return "hipMemcpyDtoHAsync";
349  case HIP_API_ID_hipModuleLaunchKernel: return "hipModuleLaunchKernel";
350  case HIP_API_ID_hipModuleGetTexRef: return "hipModuleGetTexRef";
351  case HIP_API_ID_hipRemoveActivityCallback: return "hipRemoveActivityCallback";
352  case HIP_API_ID_hipDeviceGetLimit: return "hipDeviceGetLimit";
353  case HIP_API_ID_hipModuleLoadDataEx: return "hipModuleLoadDataEx";
354  case HIP_API_ID_hipRuntimeGetVersion: return "hipRuntimeGetVersion";
355  case HIP_API_ID_hipGetDeviceProperties: return "hipGetDeviceProperties";
356  case HIP_API_ID_hipFreeArray: return "hipFreeArray";
357  case HIP_API_ID_hipDevicePrimaryCtxRelease: return "hipDevicePrimaryCtxRelease";
358  case HIP_API_ID_hipHostGetDevicePointer: return "hipHostGetDevicePointer";
359  case HIP_API_ID_hipMemcpyParam2D: return "hipMemcpyParam2D";
360  case HIP_API_ID_hipConfigureCall: return "hipConfigureCall";
361  case HIP_API_ID_hipModuleGetFunction: return "hipModuleGetFunction";
362  case HIP_API_ID_hipGetDevice: return "hipGetDevice";
363  case HIP_API_ID_hipGetDeviceCount: return "hipGetDeviceCount";
364  };
365  return "unknown";
366 };
367 
368 // HIP API callbacks data structure
370  uint64_t correlation_id;
371  uint32_t phase;
372  union {
373  struct {
374  void* ptr;
375  } hipHostFree;
376  struct {
377  const void* symbolName;
378  const void* src;
379  size_t sizeBytes;
380  size_t offset;
381  hipMemcpyKind kind;
382  hipStream_t stream;
383  } hipMemcpyToSymbolAsync;
384  struct {
385  void** ptr;
386  size_t* pitch;
387  size_t width;
388  size_t height;
389  } hipMallocPitch;
390  struct {
391  void** ptr;
392  size_t size;
393  } hipMalloc;
394  struct {
395  char* name;
396  int len;
397  hipDevice_t device;
398  } hipDeviceGetName;
399  struct {
400  hipEvent_t event;
401  hipStream_t stream;
402  } hipEventRecord;
403  struct {
404  int deviceId;
405  } hipSetDevice;
406  struct {
407  const void* arg;
408  size_t size;
409  size_t offset;
410  } hipSetupArgument;
411  struct {
412  void* dst;
413  const void* symbolName;
414  size_t sizeBytes;
415  size_t offset;
416  hipMemcpyKind kind;
417  hipStream_t stream;
418  } hipMemcpyFromSymbolAsync;
419  struct {
420  hipDeviceptr_t dst;
421  hipDeviceptr_t src;
422  size_t sizeBytes;
423  } hipMemcpyDtoD;
424  struct {
425  hipArray* dst;
426  size_t wOffset;
427  size_t hOffset;
428  const void* src;
429  size_t spitch;
430  size_t width;
431  size_t height;
432  hipMemcpyKind kind;
433  } hipMemcpy2DToArray;
434  struct {
435  hipFuncCache_t* cacheConfig;
436  } hipCtxGetCacheConfig;
437  struct {
438  hipStream_t stream;
439  hipEvent_t event;
440  unsigned int flags;
441  } hipStreamWaitEvent;
442  struct {
443  hipModule_t* module;
444  const char* fname;
445  } hipModuleLoad;
446  struct {
447  hipDevice_t dev;
448  unsigned int flags;
449  } hipDevicePrimaryCtxSetFlags;
450  struct {
451  void* dst;
452  const void* src;
453  size_t sizeBytes;
454  hipMemcpyKind kind;
455  hipStream_t stream;
456  } hipMemcpyAsync;
457  struct {
458  hipArray** array;
459  const hipChannelFormatDesc* desc;
460  hipExtent extent;
461  unsigned int flags;
462  } hipMalloc3DArray;
463  struct {
464  hipStream_t* stream;
465  } hipStreamCreate;
466  struct {
467  hipCtx_t* ctx;
468  } hipCtxGetCurrent;
469  struct {
470  hipDevice_t dev;
471  unsigned int* flags;
472  int* active;
473  } hipDevicePrimaryCtxGetState;
474  struct {
475  hipEvent_t event;
476  } hipEventQuery;
477  struct {
478  hipEvent_t* event;
479  } hipEventCreate;
480  struct {
481  hipDeviceptr_t* pbase;
482  size_t* psize;
483  hipDeviceptr_t dptr;
484  } hipMemGetAddressRange;
485  struct {
486  void* dst;
487  const void* symbolName;
488  size_t sizeBytes;
489  size_t offset;
490  hipMemcpyKind kind;
491  } hipMemcpyFromSymbol;
492  struct {
493  hipArray** pHandle;
494  const HIP_ARRAY_DESCRIPTOR* pAllocateArray;
495  } hipArrayCreate;
496  struct {
497  hipStream_t stream;
498  unsigned int* flags;
499  } hipStreamGetFlags;
500  struct {
501  hipArray** array;
502  const hipChannelFormatDesc* desc;
503  size_t width;
504  size_t height;
505  unsigned int flags;
506  } hipMallocArray;
507  struct {
508  hipSharedMemConfig* pConfig;
509  } hipCtxGetSharedMemConfig;
510  struct {
511  void* ptr;
512  size_t* size;
513  } hipMemPtrGetInfo;
514  struct {
515  unsigned int* flags;
516  } hipCtxGetFlags;
517  struct {
518  hipStream_t stream;
519  } hipStreamDestroy;
520  struct {
521  hipPitchedPtr pitchedDevPtr;
522  int value;
523  hipExtent extent;
524  hipStream_t stream;
525  } hipMemset3DAsync;
526  struct {
527  const hipMemcpy3DParms* p;
528  } hipMemcpy3D;
529  struct {
530  unsigned int flags;
531  } hipInit;
532  struct {
533  void* dst;
534  hipArray* srcArray;
535  size_t srcOffset;
536  size_t count;
537  } hipMemcpyAtoH;
538  struct {
539  void* dst;
540  size_t pitch;
541  int value;
542  size_t width;
543  size_t height;
544  } hipMemset2D;
545  struct {
546  void* dst;
547  size_t pitch;
548  int value;
549  size_t width;
550  size_t height;
551  hipStream_t stream;
552  } hipMemset2DAsync;
553  struct {
554  int* canAccessPeer;
555  int deviceId;
556  int peerDeviceId;
557  } hipDeviceCanAccessPeer;
558  struct {
559  int peerDeviceId;
560  unsigned int flags;
561  } hipDeviceEnablePeerAccess;
562  struct {
563  hipModule_t module;
564  } hipModuleUnload;
565  struct {
566  void* hostPtr;
567  } hipHostUnregister;
568  struct {
569  const void* func;
570  } hipLaunchByPtr;
571  struct {
572  hipStream_t stream;
573  } hipStreamSynchronize;
574  struct {
575  void* ptr;
576  } hipFreeHost;
577  struct {
578  uint32_t id;
579  } hipRemoveApiCallback;
580  struct {
581  hipFuncCache_t cacheConfig;
582  } hipDeviceSetCacheConfig;
583  struct {
584  hipCtx_t ctx;
585  int* apiVersion;
586  } hipCtxGetApiVersion;
587  struct {
588  hipDeviceptr_t dst;
589  void* src;
590  size_t sizeBytes;
591  } hipMemcpyHtoD;
592  struct {
593  hipDeviceptr_t* dptr;
594  size_t* bytes;
595  hipModule_t hmod;
596  const char* name;
597  } hipModuleGetGlobal;
598  struct {
599  hipArray* dstArray;
600  size_t dstOffset;
601  const void* srcHost;
602  size_t count;
603  } hipMemcpyHtoA;
604  struct {
605  hipCtx_t* ctx;
606  unsigned int flags;
607  hipDevice_t device;
608  } hipCtxCreate;
609  struct {
610  void* dst;
611  size_t dpitch;
612  const void* src;
613  size_t spitch;
614  size_t width;
615  size_t height;
616  hipMemcpyKind kind;
617  } hipMemcpy2D;
618  struct {
619  void* devPtr;
620  } hipIpcCloseMemHandle;
621  struct {
622  int* device;
623  const hipDeviceProp_t* prop;
624  } hipChooseDevice;
625  struct {
626  hipSharedMemConfig config;
627  } hipDeviceSetSharedMemConfig;
628  struct {
629  int* major;
630  int* minor;
631  hipDevice_t device;
632  } hipDeviceComputeCapability;
633  struct {
634  uint32_t id;
635  void* fun;
636  void* arg;
637  } hipRegisterApiCallback;
638  struct {
639  hipDevice_t* device;
640  int ordinal;
641  } hipDeviceGet;
642  struct {
643  hipFuncCache_t cacheConfig;
644  } hipCtxSetCacheConfig;
645  struct {
646  const void* func;
647  hipFuncCache_t config;
648  } hipFuncSetCacheConfig;
649  struct {
650  void* dst;
651  int dstDeviceId;
652  const void* src;
653  int srcDevice;
654  size_t sizeBytes;
655  hipStream_t stream;
656  } hipMemcpyPeerAsync;
657  struct {
658  float* ms;
659  hipEvent_t start;
660  hipEvent_t stop;
661  } hipEventElapsedTime;
662  struct {
663  hipDevice_t dev;
664  } hipDevicePrimaryCtxReset;
665  struct {
666  hipEvent_t event;
667  } hipEventDestroy;
668  struct {
669  hipCtx_t* ctx;
670  } hipCtxPopCurrent;
671  struct {
672  unsigned int* flagsPtr;
673  void* hostPtr;
674  } hipHostGetFlags;
675  struct {
676  void** ptr;
677  size_t size;
678  unsigned int flags;
679  } hipHostMalloc;
680  struct {
681  int* driverVersion;
682  } hipDriverGetVersion;
683  struct {
684  size_t* free;
685  size_t* total;
686  } hipMemGetInfo;
687  struct {
688  void* dst;
689  int value;
690  size_t sizeBytes;
691  } hipMemset;
692  struct {
693  hipDeviceptr_t dest;
694  unsigned char value;
695  size_t sizeBytes;
696  } hipMemsetD8;
697  struct {
698  void* hostPtr;
699  size_t sizeBytes;
700  unsigned int flags;
701  } hipHostRegister;
702  struct {
703  hipSharedMemConfig config;
704  } hipCtxSetSharedMemConfig;
705  struct {
706  hipArray** array;
707  const HIP_ARRAY_DESCRIPTOR* pAllocateArray;
708  } hipArray3DCreate;
709  struct {
710  void** devPtr;
711  hipIpcMemHandle_t handle;
712  unsigned int flags;
713  } hipIpcOpenMemHandle;
714  struct {
715  hipCtx_t ctx;
716  } hipCtxDestroy;
717  struct {
718  hipSharedMemConfig* pConfig;
719  } hipDeviceGetSharedMemConfig;
720  struct {
721  uint32_t id;
722  void* fun;
723  void* arg;
724  } hipRegisterActivityCallback;
725  struct {
726  unsigned flags;
727  } hipSetDeviceFlags;
728  struct {
729  void* ptr;
730  } hipFree;
731  struct {
732  int* pi;
734  int deviceId;
735  } hipDeviceGetAttribute;
736  struct {
737  void* dst;
738  hipDeviceptr_t src;
739  size_t sizeBytes;
740  } hipMemcpyDtoH;
741  struct {
742  hipCtx_t peerCtx;
743  } hipCtxDisablePeerAccess;
744  struct {
745  int* device;
746  const char* pciBusId;
747  } hipDeviceGetByPCIBusId;
748  struct {
749  hipIpcMemHandle_t* handle;
750  void* devPtr;
751  } hipIpcGetMemHandle;
752  struct {
753  hipDeviceptr_t dst;
754  void* src;
755  size_t sizeBytes;
756  hipStream_t stream;
757  } hipMemcpyHtoDAsync;
758  struct {
759  hipDevice_t* device;
760  } hipCtxGetDevice;
761  struct {
762  hipPitchedPtr pitchedDevPtr;
763  int value;
764  hipExtent extent;
765  } hipMemset3D;
766  struct {
767  hipModule_t* module;
768  const void* image;
769  } hipModuleLoadData;
770  struct {
771  size_t* bytes;
772  hipDevice_t device;
773  } hipDeviceTotalMem;
774  struct {
775  hipCtx_t ctx;
776  } hipCtxSetCurrent;
777  struct {
778  void** ptr;
779  size_t size;
780  } hipMallocHost;
781  struct {
782  hipCtx_t* pctx;
783  hipDevice_t dev;
784  } hipDevicePrimaryCtxRetain;
785  struct {
786  int peerDeviceId;
787  } hipDeviceDisablePeerAccess;
788  struct {
789  hipStream_t* stream;
790  unsigned int flags;
791  } hipStreamCreateWithFlags;
792  struct {
793  void* dst;
794  hipArray_const_t srcArray;
795  size_t wOffset;
796  size_t hOffset;
797  size_t count;
798  hipMemcpyKind kind;
799  } hipMemcpyFromArray;
800  struct {
801  void* dst;
802  size_t dpitch;
803  const void* src;
804  size_t spitch;
805  size_t width;
806  size_t height;
807  hipMemcpyKind kind;
808  hipStream_t stream;
809  } hipMemcpy2DAsync;
810  struct {
811  hipFuncAttributes* attr;
812  const void* func;
813  } hipFuncGetAttributes;
814  struct {
815  hipEvent_t* event;
816  unsigned flags;
817  } hipEventCreateWithFlags;
818  struct {
819  hipStream_t stream;
820  } hipStreamQuery;
821  struct {
822  char* pciBusId;
823  int len;
824  int device;
825  } hipDeviceGetPCIBusId;
826  struct {
827  void* dst;
828  const void* src;
829  size_t sizeBytes;
830  hipMemcpyKind kind;
831  } hipMemcpy;
832  struct {
833  void** ptr;
834  size_t size;
835  unsigned int flags;
836  } hipHostAlloc;
837  struct {
838  hipStream_t stream;
839  hipStreamCallback_t callback;
840  void* userData;
841  unsigned int flags;
842  } hipStreamAddCallback;
843  struct {
844  hipArray* dst;
845  size_t wOffset;
846  size_t hOffset;
847  const void* src;
848  size_t count;
849  hipMemcpyKind kind;
850  } hipMemcpyToArray;
851  struct {
852  hipFuncCache_t* cacheConfig;
853  } hipDeviceGetCacheConfig;
854  struct {
855  hipPitchedPtr* pitchedDevPtr;
856  hipExtent extent;
857  } hipMalloc3D;
858  struct {
859  hipPointerAttribute_t* attributes;
860  const void* ptr;
861  } hipPointerGetAttributes;
862  struct {
863  void* dst;
864  int value;
865  size_t sizeBytes;
866  hipStream_t stream;
867  } hipMemsetAsync;
868  struct {
869  const void* symbolName;
870  const void* src;
871  size_t sizeBytes;
872  size_t offset;
873  hipMemcpyKind kind;
874  } hipMemcpyToSymbol;
875  struct {
876  hipCtx_t ctx;
877  } hipCtxPushCurrent;
878  struct {
879  void* dst;
880  int dstDeviceId;
881  const void* src;
882  int srcDeviceId;
883  size_t sizeBytes;
884  } hipMemcpyPeer;
885  struct {
886  hipEvent_t event;
887  } hipEventSynchronize;
888  struct {
889  hipDeviceptr_t dst;
890  hipDeviceptr_t src;
891  size_t sizeBytes;
892  hipStream_t stream;
893  } hipMemcpyDtoDAsync;
894  struct {
895  hipCtx_t peerCtx;
896  unsigned int flags;
897  } hipCtxEnablePeerAccess;
898  struct {
899  void* dst;
900  hipDeviceptr_t src;
901  size_t sizeBytes;
902  hipStream_t stream;
903  } hipMemcpyDtoHAsync;
904  struct {
905  hipFunction_t f;
906  unsigned int gridDimX;
907  unsigned int gridDimY;
908  unsigned int gridDimZ;
909  unsigned int blockDimX;
910  unsigned int blockDimY;
911  unsigned int blockDimZ;
912  unsigned int sharedMemBytes;
913  hipStream_t stream;
914  void** kernelParams;
915  void** extra;
916  } hipModuleLaunchKernel;
917  struct {
918  hipFunction_t f;
919  } hipHccModuleLaunchKernel;
920  struct {
921  textureReference** texRef;
922  hipModule_t hmod;
923  const char* name;
924  } hipModuleGetTexRef;
925  struct {
926  uint32_t id;
927  } hipRemoveActivityCallback;
928  struct {
929  size_t* pValue;
930  hipLimit_t limit;
931  } hipDeviceGetLimit;
932  struct {
933  hipModule_t* module;
934  const void* image;
935  unsigned int numOptions;
936  hipJitOption* options;
937  void** optionValues;
938  } hipModuleLoadDataEx;
939  struct {
940  int* runtimeVersion;
941  } hipRuntimeGetVersion;
942  struct {
943  hipDeviceProp_t* prop;
944  int deviceId;
945  } hipGetDeviceProperties;
946  struct {
947  hipArray* array;
948  } hipFreeArray;
949  struct {
950  hipDevice_t dev;
951  } hipDevicePrimaryCtxRelease;
952  struct {
953  void** devPtr;
954  void* hstPtr;
955  unsigned int flags;
956  } hipHostGetDevicePointer;
957  struct {
958  const hip_Memcpy2D* pCopy;
959  } hipMemcpyParam2D;
960  struct {
961  dim3 gridDim;
962  dim3 blockDim;
963  size_t sharedMem;
964  hipStream_t stream;
965  } hipConfigureCall;
966  struct {
967  hipFunction_t* function;
968  hipModule_t module;
969  const char* kname;
970  } hipModuleGetFunction;
971  struct {
972  int* deviceId;
973  } hipGetDevice;
974  struct {
975  int* count;
976  } hipGetDeviceCount;
977  } args;
978 };
979 
980 // HIP API callbacks args data filling macros
981 #define INIT_hipHostFree_CB_ARGS_DATA(cb_data) { \
982  cb_data.args.hipHostFree.ptr = (void*)ptr; \
983 };
984 #define INIT_hipMemcpyToSymbolAsync_CB_ARGS_DATA(cb_data) { \
985  cb_data.args.hipMemcpyToSymbolAsync.symbolName = (const void*)symbolName; \
986  cb_data.args.hipMemcpyToSymbolAsync.src = (const void*)src; \
987  cb_data.args.hipMemcpyToSymbolAsync.sizeBytes = (size_t)count; \
988  cb_data.args.hipMemcpyToSymbolAsync.offset = (size_t)offset; \
989  cb_data.args.hipMemcpyToSymbolAsync.kind = (hipMemcpyKind)kind; \
990  cb_data.args.hipMemcpyToSymbolAsync.stream = (hipStream_t)stream; \
991 };
992 #define INIT_hipMallocPitch_CB_ARGS_DATA(cb_data) { \
993  cb_data.args.hipMallocPitch.ptr = (void**)ptr; \
994  cb_data.args.hipMallocPitch.pitch = (size_t*)pitch; \
995  cb_data.args.hipMallocPitch.width = (size_t)width; \
996  cb_data.args.hipMallocPitch.height = (size_t)height; \
997 };
998 #define INIT_hipMalloc_CB_ARGS_DATA(cb_data) { \
999  cb_data.args.hipMalloc.ptr = (void**)ptr; \
1000  cb_data.args.hipMalloc.size = (size_t)sizeBytes; \
1001 };
1002 #define INIT_hipDeviceGetName_CB_ARGS_DATA(cb_data) { \
1003  cb_data.args.hipDeviceGetName.name = (char*)name; \
1004  cb_data.args.hipDeviceGetName.len = (int)len; \
1005  cb_data.args.hipDeviceGetName.device = (hipDevice_t)device; \
1006 };
1007 #define INIT_hipEventRecord_CB_ARGS_DATA(cb_data) { \
1008  cb_data.args.hipEventRecord.event = (hipEvent_t)event; \
1009  cb_data.args.hipEventRecord.stream = (hipStream_t)stream; \
1010 };
1011 #define INIT_hipCtxSynchronize_CB_ARGS_DATA(cb_data) { \
1012 };
1013 #define INIT_hipSetDevice_CB_ARGS_DATA(cb_data) { \
1014  cb_data.args.hipSetDevice.deviceId = (int)deviceId; \
1015 };
1016 #define INIT_hipSetupArgument_CB_ARGS_DATA(cb_data) { \
1017  cb_data.args.hipSetupArgument.arg = (const void*)arg; \
1018  cb_data.args.hipSetupArgument.size = (size_t)size; \
1019  cb_data.args.hipSetupArgument.offset = (size_t)offset; \
1020 };
1021 #define INIT_hipMemcpyFromSymbolAsync_CB_ARGS_DATA(cb_data) { \
1022  cb_data.args.hipMemcpyFromSymbolAsync.dst = (void*)dst; \
1023  cb_data.args.hipMemcpyFromSymbolAsync.symbolName = (const void*)symbolName; \
1024  cb_data.args.hipMemcpyFromSymbolAsync.sizeBytes = (size_t)count; \
1025  cb_data.args.hipMemcpyFromSymbolAsync.offset = (size_t)offset; \
1026  cb_data.args.hipMemcpyFromSymbolAsync.kind = (hipMemcpyKind)kind; \
1027  cb_data.args.hipMemcpyFromSymbolAsync.stream = (hipStream_t)stream; \
1028 };
1029 #define INIT_hipMemcpyDtoD_CB_ARGS_DATA(cb_data) { \
1030  cb_data.args.hipMemcpyDtoD.dst = (hipDeviceptr_t)dst; \
1031  cb_data.args.hipMemcpyDtoD.src = (hipDeviceptr_t)src; \
1032  cb_data.args.hipMemcpyDtoD.sizeBytes = (size_t)sizeBytes; \
1033 };
1034 #define INIT_hipMemcpy2DToArray_CB_ARGS_DATA(cb_data) { \
1035  cb_data.args.hipMemcpy2DToArray.dst = (hipArray*)dst; \
1036  cb_data.args.hipMemcpy2DToArray.wOffset = (size_t)wOffset; \
1037  cb_data.args.hipMemcpy2DToArray.hOffset = (size_t)hOffset; \
1038  cb_data.args.hipMemcpy2DToArray.src = (const void*)src; \
1039  cb_data.args.hipMemcpy2DToArray.spitch = (size_t)spitch; \
1040  cb_data.args.hipMemcpy2DToArray.width = (size_t)width; \
1041  cb_data.args.hipMemcpy2DToArray.height = (size_t)height; \
1042  cb_data.args.hipMemcpy2DToArray.kind = (hipMemcpyKind)kind; \
1043 };
1044 #define INIT_hipCtxGetCacheConfig_CB_ARGS_DATA(cb_data) { \
1045  cb_data.args.hipCtxGetCacheConfig.cacheConfig = (hipFuncCache_t*)cacheConfig; \
1046 };
1047 #define INIT_hipStreamWaitEvent_CB_ARGS_DATA(cb_data) { \
1048  cb_data.args.hipStreamWaitEvent.stream = (hipStream_t)stream; \
1049  cb_data.args.hipStreamWaitEvent.event = (hipEvent_t)event; \
1050  cb_data.args.hipStreamWaitEvent.flags = (unsigned int)flags; \
1051 };
1052 #define INIT_hipModuleLoad_CB_ARGS_DATA(cb_data) { \
1053  cb_data.args.hipModuleLoad.module = (hipModule_t*)module; \
1054  cb_data.args.hipModuleLoad.fname = (const char*)fname; \
1055 };
1056 #define INIT_hipDevicePrimaryCtxSetFlags_CB_ARGS_DATA(cb_data) { \
1057  cb_data.args.hipDevicePrimaryCtxSetFlags.dev = (hipDevice_t)dev; \
1058  cb_data.args.hipDevicePrimaryCtxSetFlags.flags = (unsigned int)flags; \
1059 };
1060 #define INIT_hipMemcpyAsync_CB_ARGS_DATA(cb_data) { \
1061  cb_data.args.hipMemcpyAsync.dst = (void*)dst; \
1062  cb_data.args.hipMemcpyAsync.src = (const void*)src; \
1063  cb_data.args.hipMemcpyAsync.sizeBytes = (size_t)sizeBytes; \
1064  cb_data.args.hipMemcpyAsync.kind = (hipMemcpyKind)kind; \
1065  cb_data.args.hipMemcpyAsync.stream = (hipStream_t)stream; \
1066 };
1067 #define INIT_hipMalloc3DArray_CB_ARGS_DATA(cb_data) { \
1068  cb_data.args.hipMalloc3DArray.array = (hipArray**)array; \
1069  cb_data.args.hipMalloc3DArray.desc = (const hipChannelFormatDesc*)desc; \
1070  cb_data.args.hipMalloc3DArray.extent = (hipExtent)extent; \
1071  cb_data.args.hipMalloc3DArray.flags = (unsigned int)flags; \
1072 };
1073 #define INIT_hipStreamCreate_CB_ARGS_DATA(cb_data) { \
1074  cb_data.args.hipStreamCreate.stream = (hipStream_t*)stream; \
1075 };
1076 #define INIT_hipCtxGetCurrent_CB_ARGS_DATA(cb_data) { \
1077  cb_data.args.hipCtxGetCurrent.ctx = (hipCtx_t*)ctx; \
1078 };
1079 #define INIT_hipDevicePrimaryCtxGetState_CB_ARGS_DATA(cb_data) { \
1080  cb_data.args.hipDevicePrimaryCtxGetState.dev = (hipDevice_t)dev; \
1081  cb_data.args.hipDevicePrimaryCtxGetState.flags = (unsigned int*)flags; \
1082  cb_data.args.hipDevicePrimaryCtxGetState.active = (int*)active; \
1083 };
1084 #define INIT_hipEventQuery_CB_ARGS_DATA(cb_data) { \
1085  cb_data.args.hipEventQuery.event = (hipEvent_t)event; \
1086 };
1087 #define INIT_hipEventCreate_CB_ARGS_DATA(cb_data) { \
1088  cb_data.args.hipEventCreate.event = (hipEvent_t*)event; \
1089 };
1090 #define INIT_hipMemGetAddressRange_CB_ARGS_DATA(cb_data) { \
1091  cb_data.args.hipMemGetAddressRange.pbase = (hipDeviceptr_t*)pbase; \
1092  cb_data.args.hipMemGetAddressRange.psize = (size_t*)psize; \
1093  cb_data.args.hipMemGetAddressRange.dptr = (hipDeviceptr_t)dptr; \
1094 };
1095 #define INIT_hipMemcpyFromSymbol_CB_ARGS_DATA(cb_data) { \
1096  cb_data.args.hipMemcpyFromSymbol.dst = (void*)dst; \
1097  cb_data.args.hipMemcpyFromSymbol.symbolName = (const void*)symbolName; \
1098  cb_data.args.hipMemcpyFromSymbol.sizeBytes = (size_t)count; \
1099  cb_data.args.hipMemcpyFromSymbol.offset = (size_t)offset; \
1100  cb_data.args.hipMemcpyFromSymbol.kind = (hipMemcpyKind)kind; \
1101 };
1102 #define INIT_hipArrayCreate_CB_ARGS_DATA(cb_data) { \
1103  cb_data.args.hipArrayCreate.pHandle = (hipArray**)array; \
1104  cb_data.args.hipArrayCreate.pAllocateArray = (const HIP_ARRAY_DESCRIPTOR*)pAllocateArray; \
1105 };
1106 #define INIT_hipStreamGetFlags_CB_ARGS_DATA(cb_data) { \
1107  cb_data.args.hipStreamGetFlags.stream = (hipStream_t)stream; \
1108  cb_data.args.hipStreamGetFlags.flags = (unsigned int*)flags; \
1109 };
1110 #define INIT_hipMallocArray_CB_ARGS_DATA(cb_data) { \
1111  cb_data.args.hipMallocArray.array = (hipArray**)array; \
1112  cb_data.args.hipMallocArray.desc = (const hipChannelFormatDesc*)desc; \
1113  cb_data.args.hipMallocArray.width = (size_t)width; \
1114  cb_data.args.hipMallocArray.height = (size_t)height; \
1115  cb_data.args.hipMallocArray.flags = (unsigned int)flags; \
1116 };
1117 #define INIT_hipCtxGetSharedMemConfig_CB_ARGS_DATA(cb_data) { \
1118  cb_data.args.hipCtxGetSharedMemConfig.pConfig = (hipSharedMemConfig*)pConfig; \
1119 };
1120 #define INIT_hipMemPtrGetInfo_CB_ARGS_DATA(cb_data) { \
1121  cb_data.args.hipMemPtrGetInfo.ptr = (void*)ptr; \
1122  cb_data.args.hipMemPtrGetInfo.size = (size_t*)size; \
1123 };
1124 #define INIT_hipCtxGetFlags_CB_ARGS_DATA(cb_data) { \
1125  cb_data.args.hipCtxGetFlags.flags = (unsigned int*)flags; \
1126 };
1127 #define INIT_hipStreamDestroy_CB_ARGS_DATA(cb_data) { \
1128  cb_data.args.hipStreamDestroy.stream = (hipStream_t)stream; \
1129 };
1130 #define INIT_hipMemset3DAsync_CB_ARGS_DATA(cb_data) { \
1131  cb_data.args.hipMemset3DAsync.pitchedDevPtr = (hipPitchedPtr)pitchedDevPtr; \
1132  cb_data.args.hipMemset3DAsync.value = (int)value; \
1133  cb_data.args.hipMemset3DAsync.extent = (hipExtent)extent; \
1134  cb_data.args.hipMemset3DAsync.stream = (hipStream_t)stream; \
1135 };
1136 #define INIT_hipMemcpy3D_CB_ARGS_DATA(cb_data) { \
1137  cb_data.args.hipMemcpy3D.p = (const hipMemcpy3DParms*)p; \
1138 };
1139 #define INIT_hipInit_CB_ARGS_DATA(cb_data) { \
1140  cb_data.args.hipInit.flags = (unsigned int)flags; \
1141 };
1142 #define INIT_hipMemcpyAtoH_CB_ARGS_DATA(cb_data) { \
1143  cb_data.args.hipMemcpyAtoH.dst = (void*)dst; \
1144  cb_data.args.hipMemcpyAtoH.srcArray = (hipArray*)srcArray; \
1145  cb_data.args.hipMemcpyAtoH.srcOffset = (size_t)srcOffset; \
1146  cb_data.args.hipMemcpyAtoH.count = (size_t)count; \
1147 };
1148 #define INIT_hipMemset2D_CB_ARGS_DATA(cb_data) { \
1149  cb_data.args.hipMemset2D.dst = (void*)dst; \
1150  cb_data.args.hipMemset2D.pitch = (size_t)pitch; \
1151  cb_data.args.hipMemset2D.value = (int)value; \
1152  cb_data.args.hipMemset2D.width = (size_t)width; \
1153  cb_data.args.hipMemset2D.height = (size_t)height; \
1154 };
1155 #define INIT_hipMemset2DAsync_CB_ARGS_DATA(cb_data) { \
1156  cb_data.args.hipMemset2DAsync.dst = (void*)dst; \
1157  cb_data.args.hipMemset2DAsync.pitch = (size_t)pitch; \
1158  cb_data.args.hipMemset2DAsync.value = (int)value; \
1159  cb_data.args.hipMemset2DAsync.width = (size_t)width; \
1160  cb_data.args.hipMemset2DAsync.height = (size_t)height; \
1161  cb_data.args.hipMemset2DAsync.stream = (hipStream_t)stream; \
1162 };
1163 #define INIT_hipDeviceCanAccessPeer_CB_ARGS_DATA(cb_data) { \
1164  cb_data.args.hipDeviceCanAccessPeer.canAccessPeer = (int*)canAccessPeer; \
1165  cb_data.args.hipDeviceCanAccessPeer.deviceId = (int)deviceId; \
1166  cb_data.args.hipDeviceCanAccessPeer.peerDeviceId = (int)peerDeviceId; \
1167 };
1168 #define INIT_hipDeviceEnablePeerAccess_CB_ARGS_DATA(cb_data) { \
1169  cb_data.args.hipDeviceEnablePeerAccess.peerDeviceId = (int)peerDeviceId; \
1170  cb_data.args.hipDeviceEnablePeerAccess.flags = (unsigned int)flags; \
1171 };
1172 #define INIT_hipModuleUnload_CB_ARGS_DATA(cb_data) { \
1173  cb_data.args.hipModuleUnload.module = (hipModule_t)hmod; \
1174 };
1175 #define INIT_hipHostUnregister_CB_ARGS_DATA(cb_data) { \
1176  cb_data.args.hipHostUnregister.hostPtr = (void*)hostPtr; \
1177 };
1178 #define INIT_hipProfilerStop_CB_ARGS_DATA(cb_data) { \
1179 };
1180 #define INIT_hipLaunchByPtr_CB_ARGS_DATA(cb_data) { \
1181  cb_data.args.hipLaunchByPtr.func = (const void*)hostFunction; \
1182 };
1183 #define INIT_hipStreamSynchronize_CB_ARGS_DATA(cb_data) { \
1184  cb_data.args.hipStreamSynchronize.stream = (hipStream_t)stream; \
1185 };
1186 #define INIT_hipFreeHost_CB_ARGS_DATA(cb_data) { \
1187  cb_data.args.hipFreeHost.ptr = (void*)ptr; \
1188 };
1189 #define INIT_hipRemoveApiCallback_CB_ARGS_DATA(cb_data) { \
1190  cb_data.args.hipRemoveApiCallback.id = (uint32_t)id; \
1191 };
1192 #define INIT_hipDeviceSetCacheConfig_CB_ARGS_DATA(cb_data) { \
1193  cb_data.args.hipDeviceSetCacheConfig.cacheConfig = (hipFuncCache_t)cacheConfig; \
1194 };
1195 #define INIT_hipCtxGetApiVersion_CB_ARGS_DATA(cb_data) { \
1196  cb_data.args.hipCtxGetApiVersion.ctx = (hipCtx_t)ctx; \
1197  cb_data.args.hipCtxGetApiVersion.apiVersion = (int*)apiVersion; \
1198 };
1199 #define INIT_hipMemcpyHtoD_CB_ARGS_DATA(cb_data) { \
1200  cb_data.args.hipMemcpyHtoD.dst = (hipDeviceptr_t)dst; \
1201  cb_data.args.hipMemcpyHtoD.src = (void*)src; \
1202  cb_data.args.hipMemcpyHtoD.sizeBytes = (size_t)sizeBytes; \
1203 };
1204 #define INIT_hipModuleGetGlobal_CB_ARGS_DATA(cb_data) { \
1205  cb_data.args.hipModuleGetGlobal.dptr = (hipDeviceptr_t*)dptr; \
1206  cb_data.args.hipModuleGetGlobal.bytes = (size_t*)bytes; \
1207  cb_data.args.hipModuleGetGlobal.hmod = (hipModule_t)hmod; \
1208  cb_data.args.hipModuleGetGlobal.name = (const char*)name; \
1209 };
1210 #define INIT_hipMemcpyHtoA_CB_ARGS_DATA(cb_data) { \
1211  cb_data.args.hipMemcpyHtoA.dstArray = (hipArray*)dstArray; \
1212  cb_data.args.hipMemcpyHtoA.dstOffset = (size_t)dstOffset; \
1213  cb_data.args.hipMemcpyHtoA.srcHost = (const void*)srcHost; \
1214  cb_data.args.hipMemcpyHtoA.count = (size_t)count; \
1215 };
1216 #define INIT_hipCtxCreate_CB_ARGS_DATA(cb_data) { \
1217  cb_data.args.hipCtxCreate.ctx = (hipCtx_t*)ctx; \
1218  cb_data.args.hipCtxCreate.flags = (unsigned int)flags; \
1219  cb_data.args.hipCtxCreate.device = (hipDevice_t)device; \
1220 };
1221 #define INIT_hipMemcpy2D_CB_ARGS_DATA(cb_data) { \
1222  cb_data.args.hipMemcpy2D.dst = (void*)dst; \
1223  cb_data.args.hipMemcpy2D.dpitch = (size_t)dpitch; \
1224  cb_data.args.hipMemcpy2D.src = (const void*)src; \
1225  cb_data.args.hipMemcpy2D.spitch = (size_t)spitch; \
1226  cb_data.args.hipMemcpy2D.width = (size_t)width; \
1227  cb_data.args.hipMemcpy2D.height = (size_t)height; \
1228  cb_data.args.hipMemcpy2D.kind = (hipMemcpyKind)kind; \
1229 };
1230 #define INIT_hipIpcCloseMemHandle_CB_ARGS_DATA(cb_data) { \
1231  cb_data.args.hipIpcCloseMemHandle.devPtr = (void*)devPtr; \
1232 };
1233 #define INIT_hipChooseDevice_CB_ARGS_DATA(cb_data) { \
1234  cb_data.args.hipChooseDevice.device = (int*)device; \
1235  cb_data.args.hipChooseDevice.prop = (const hipDeviceProp_t*)prop; \
1236 };
1237 #define INIT_hipDeviceSetSharedMemConfig_CB_ARGS_DATA(cb_data) { \
1238  cb_data.args.hipDeviceSetSharedMemConfig.config = (hipSharedMemConfig)config; \
1239 };
1240 #define INIT_hipDeviceComputeCapability_CB_ARGS_DATA(cb_data) { \
1241  cb_data.args.hipDeviceComputeCapability.major = (int*)major; \
1242  cb_data.args.hipDeviceComputeCapability.minor = (int*)minor; \
1243  cb_data.args.hipDeviceComputeCapability.device = (hipDevice_t)device; \
1244 };
1245 #define INIT_hipRegisterApiCallback_CB_ARGS_DATA(cb_data) { \
1246  cb_data.args.hipRegisterApiCallback.id = (uint32_t)id; \
1247  cb_data.args.hipRegisterApiCallback.fun = (void*)fun; \
1248  cb_data.args.hipRegisterApiCallback.arg = (void*)arg; \
1249 };
1250 #define INIT_hipDeviceGet_CB_ARGS_DATA(cb_data) { \
1251  cb_data.args.hipDeviceGet.device = (hipDevice_t*)device; \
1252  cb_data.args.hipDeviceGet.ordinal = (int)deviceId; \
1253 };
1254 #define INIT_hipProfilerStart_CB_ARGS_DATA(cb_data) { \
1255 };
1256 #define INIT_hipCtxSetCacheConfig_CB_ARGS_DATA(cb_data) { \
1257  cb_data.args.hipCtxSetCacheConfig.cacheConfig = (hipFuncCache_t)cacheConfig; \
1258 };
1259 #define INIT_hipFuncSetCacheConfig_CB_ARGS_DATA(cb_data) { \
1260  cb_data.args.hipFuncSetCacheConfig.func = (const void*)func; \
1261  cb_data.args.hipFuncSetCacheConfig.config = (hipFuncCache_t)cacheConfig; \
1262 };
1263 #define INIT_hipMemcpyPeerAsync_CB_ARGS_DATA(cb_data) { \
1264  cb_data.args.hipMemcpyPeerAsync.dst = (void*)dst; \
1265  cb_data.args.hipMemcpyPeerAsync.dstDeviceId = (int)dstDevice; \
1266  cb_data.args.hipMemcpyPeerAsync.src = (const void*)src; \
1267  cb_data.args.hipMemcpyPeerAsync.srcDevice = (int)srcDevice; \
1268  cb_data.args.hipMemcpyPeerAsync.sizeBytes = (size_t)sizeBytes; \
1269  cb_data.args.hipMemcpyPeerAsync.stream = (hipStream_t)stream; \
1270 };
1271 #define INIT_hipEventElapsedTime_CB_ARGS_DATA(cb_data) { \
1272  cb_data.args.hipEventElapsedTime.ms = (float*)ms; \
1273  cb_data.args.hipEventElapsedTime.start = (hipEvent_t)start; \
1274  cb_data.args.hipEventElapsedTime.stop = (hipEvent_t)stop; \
1275 };
1276 #define INIT_hipDevicePrimaryCtxReset_CB_ARGS_DATA(cb_data) { \
1277  cb_data.args.hipDevicePrimaryCtxReset.dev = (hipDevice_t)dev; \
1278 };
1279 #define INIT_hipEventDestroy_CB_ARGS_DATA(cb_data) { \
1280  cb_data.args.hipEventDestroy.event = (hipEvent_t)event; \
1281 };
1282 #define INIT_hipCtxPopCurrent_CB_ARGS_DATA(cb_data) { \
1283  cb_data.args.hipCtxPopCurrent.ctx = (hipCtx_t*)ctx; \
1284 };
1285 #define INIT_hipHostGetFlags_CB_ARGS_DATA(cb_data) { \
1286  cb_data.args.hipHostGetFlags.flagsPtr = (unsigned int*)flagsPtr; \
1287  cb_data.args.hipHostGetFlags.hostPtr = (void*)hostPtr; \
1288 };
1289 #define INIT_hipHostMalloc_CB_ARGS_DATA(cb_data) { \
1290  cb_data.args.hipHostMalloc.ptr = (void**)ptr; \
1291  cb_data.args.hipHostMalloc.size = (size_t)sizeBytes; \
1292  cb_data.args.hipHostMalloc.flags = (unsigned int)flags; \
1293 };
1294 #define INIT_hipDriverGetVersion_CB_ARGS_DATA(cb_data) { \
1295  cb_data.args.hipDriverGetVersion.driverVersion = (int*)driverVersion; \
1296 };
1297 #define INIT_hipMemGetInfo_CB_ARGS_DATA(cb_data) { \
1298  cb_data.args.hipMemGetInfo.free = (size_t*)free; \
1299  cb_data.args.hipMemGetInfo.total = (size_t*)total; \
1300 };
1301 #define INIT_hipDeviceReset_CB_ARGS_DATA(cb_data) { \
1302 };
1303 #define INIT_hipMemset_CB_ARGS_DATA(cb_data) { \
1304  cb_data.args.hipMemset.dst = (void*)dst; \
1305  cb_data.args.hipMemset.value = (int)value; \
1306  cb_data.args.hipMemset.sizeBytes = (size_t)sizeBytes; \
1307 };
1308 #define INIT_hipMemsetD8_CB_ARGS_DATA(cb_data) { \
1309  cb_data.args.hipMemsetD8.dest = (hipDeviceptr_t)dst; \
1310  cb_data.args.hipMemsetD8.value = (unsigned char)value; \
1311  cb_data.args.hipMemsetD8.sizeBytes = (size_t)sizeBytes; \
1312 };
1313 #define INIT_hipHostRegister_CB_ARGS_DATA(cb_data) { \
1314  cb_data.args.hipHostRegister.hostPtr = (void*)hostPtr; \
1315  cb_data.args.hipHostRegister.sizeBytes = (size_t)sizeBytes; \
1316  cb_data.args.hipHostRegister.flags = (unsigned int)flags; \
1317 };
1318 #define INIT_hipCtxSetSharedMemConfig_CB_ARGS_DATA(cb_data) { \
1319  cb_data.args.hipCtxSetSharedMemConfig.config = (hipSharedMemConfig)config; \
1320 };
1321 #define INIT_hipArray3DCreate_CB_ARGS_DATA(cb_data) { \
1322  cb_data.args.hipArray3DCreate.array = (hipArray**)array; \
1323  cb_data.args.hipArray3DCreate.pAllocateArray = (const HIP_ARRAY_DESCRIPTOR*)pAllocateArray; \
1324 };
1325 #define INIT_hipIpcOpenMemHandle_CB_ARGS_DATA(cb_data) { \
1326  cb_data.args.hipIpcOpenMemHandle.devPtr = (void**)devPtr; \
1327  cb_data.args.hipIpcOpenMemHandle.handle = (hipIpcMemHandle_t)handle; \
1328  cb_data.args.hipIpcOpenMemHandle.flags = (unsigned int)flags; \
1329 };
1330 #define INIT_hipGetLastError_CB_ARGS_DATA(cb_data) { \
1331 };
1332 #define INIT_hipCtxDestroy_CB_ARGS_DATA(cb_data) { \
1333  cb_data.args.hipCtxDestroy.ctx = (hipCtx_t)ctx; \
1334 };
1335 #define INIT_hipDeviceGetSharedMemConfig_CB_ARGS_DATA(cb_data) { \
1336  cb_data.args.hipDeviceGetSharedMemConfig.pConfig = (hipSharedMemConfig*)pConfig; \
1337 };
1338 #define INIT_hipRegisterActivityCallback_CB_ARGS_DATA(cb_data) { \
1339  cb_data.args.hipRegisterActivityCallback.id = (uint32_t)id; \
1340  cb_data.args.hipRegisterActivityCallback.fun = (void*)fun; \
1341  cb_data.args.hipRegisterActivityCallback.arg = (void*)arg; \
1342 };
1343 #define INIT_hipSetDeviceFlags_CB_ARGS_DATA(cb_data) { \
1344  cb_data.args.hipSetDeviceFlags.flags = (unsigned)flags; \
1345 };
1346 #define INIT_hipFree_CB_ARGS_DATA(cb_data) { \
1347  cb_data.args.hipFree.ptr = (void*)ptr; \
1348 };
1349 #define INIT_hipDeviceGetAttribute_CB_ARGS_DATA(cb_data) { \
1350  cb_data.args.hipDeviceGetAttribute.pi = (int*)pi; \
1351  cb_data.args.hipDeviceGetAttribute.attr = (hipDeviceAttribute_t)attr; \
1352  cb_data.args.hipDeviceGetAttribute.deviceId = (int)device; \
1353 };
1354 #define INIT_hipMemcpyDtoH_CB_ARGS_DATA(cb_data) { \
1355  cb_data.args.hipMemcpyDtoH.dst = (void*)dst; \
1356  cb_data.args.hipMemcpyDtoH.src = (hipDeviceptr_t)src; \
1357  cb_data.args.hipMemcpyDtoH.sizeBytes = (size_t)sizeBytes; \
1358 };
1359 #define INIT_hipCtxDisablePeerAccess_CB_ARGS_DATA(cb_data) { \
1360  cb_data.args.hipCtxDisablePeerAccess.peerCtx = (hipCtx_t)peerCtx; \
1361 };
1362 #define INIT_hipDeviceGetByPCIBusId_CB_ARGS_DATA(cb_data) { \
1363  cb_data.args.hipDeviceGetByPCIBusId.device = (int*)device; \
1364  cb_data.args.hipDeviceGetByPCIBusId.pciBusId = (const char*)pciBusId; \
1365 };
1366 #define INIT_hipIpcGetMemHandle_CB_ARGS_DATA(cb_data) { \
1367  cb_data.args.hipIpcGetMemHandle.handle = (hipIpcMemHandle_t*)handle; \
1368  cb_data.args.hipIpcGetMemHandle.devPtr = (void*)devPtr; \
1369 };
1370 #define INIT_hipMemcpyHtoDAsync_CB_ARGS_DATA(cb_data) { \
1371  cb_data.args.hipMemcpyHtoDAsync.dst = (hipDeviceptr_t)dst; \
1372  cb_data.args.hipMemcpyHtoDAsync.src = (void*)src; \
1373  cb_data.args.hipMemcpyHtoDAsync.sizeBytes = (size_t)sizeBytes; \
1374  cb_data.args.hipMemcpyHtoDAsync.stream = (hipStream_t)stream; \
1375 };
1376 #define INIT_hipCtxGetDevice_CB_ARGS_DATA(cb_data) { \
1377  cb_data.args.hipCtxGetDevice.device = (hipDevice_t*)device; \
1378 };
1379 #define INIT_hipMemset3D_CB_ARGS_DATA(cb_data) { \
1380  cb_data.args.hipMemset3D.pitchedDevPtr = (hipPitchedPtr)pitchedDevPtr; \
1381  cb_data.args.hipMemset3D.value = (int)value; \
1382  cb_data.args.hipMemset3D.extent = (hipExtent)extent; \
1383 };
1384 #define INIT_hipModuleLoadData_CB_ARGS_DATA(cb_data) { \
1385  cb_data.args.hipModuleLoadData.module = (hipModule_t*)module; \
1386  cb_data.args.hipModuleLoadData.image = (const void*)image; \
1387 };
1388 #define INIT_hipDeviceTotalMem_CB_ARGS_DATA(cb_data) { \
1389  cb_data.args.hipDeviceTotalMem.bytes = (size_t*)bytes; \
1390  cb_data.args.hipDeviceTotalMem.device = (hipDevice_t)device; \
1391 };
1392 #define INIT_hipCtxSetCurrent_CB_ARGS_DATA(cb_data) { \
1393  cb_data.args.hipCtxSetCurrent.ctx = (hipCtx_t)ctx; \
1394 };
1395 #define INIT_hipMallocHost_CB_ARGS_DATA(cb_data) { \
1396  cb_data.args.hipMallocHost.ptr = (void**)ptr; \
1397  cb_data.args.hipMallocHost.size = (size_t)sizeBytes; \
1398 };
1399 #define INIT_hipDevicePrimaryCtxRetain_CB_ARGS_DATA(cb_data) { \
1400  cb_data.args.hipDevicePrimaryCtxRetain.pctx = (hipCtx_t*)pctx; \
1401  cb_data.args.hipDevicePrimaryCtxRetain.dev = (hipDevice_t)dev; \
1402 };
1403 #define INIT_hipDeviceDisablePeerAccess_CB_ARGS_DATA(cb_data) { \
1404  cb_data.args.hipDeviceDisablePeerAccess.peerDeviceId = (int)peerDeviceId; \
1405 };
1406 #define INIT_hipStreamCreateWithFlags_CB_ARGS_DATA(cb_data) { \
1407  cb_data.args.hipStreamCreateWithFlags.stream = (hipStream_t*)stream; \
1408  cb_data.args.hipStreamCreateWithFlags.flags = (unsigned int)flags; \
1409 };
1410 #define INIT_hipMemcpyFromArray_CB_ARGS_DATA(cb_data) { \
1411  cb_data.args.hipMemcpyFromArray.dst = (void*)dst; \
1412  cb_data.args.hipMemcpyFromArray.srcArray = (hipArray_const_t)srcArray; \
1413  cb_data.args.hipMemcpyFromArray.wOffset = (size_t)wOffset; \
1414  cb_data.args.hipMemcpyFromArray.hOffset = (size_t)hOffset; \
1415  cb_data.args.hipMemcpyFromArray.count = (size_t)count; \
1416  cb_data.args.hipMemcpyFromArray.kind = (hipMemcpyKind)kind; \
1417 };
1418 #define INIT_hipMemcpy2DAsync_CB_ARGS_DATA(cb_data) { \
1419  cb_data.args.hipMemcpy2DAsync.dst = (void*)dst; \
1420  cb_data.args.hipMemcpy2DAsync.dpitch = (size_t)dpitch; \
1421  cb_data.args.hipMemcpy2DAsync.src = (const void*)src; \
1422  cb_data.args.hipMemcpy2DAsync.spitch = (size_t)spitch; \
1423  cb_data.args.hipMemcpy2DAsync.width = (size_t)width; \
1424  cb_data.args.hipMemcpy2DAsync.height = (size_t)height; \
1425  cb_data.args.hipMemcpy2DAsync.kind = (hipMemcpyKind)kind; \
1426  cb_data.args.hipMemcpy2DAsync.stream = (hipStream_t)stream; \
1427 };
1428 #define INIT_hipFuncGetAttributes_CB_ARGS_DATA(cb_data) { \
1429  cb_data.args.hipFuncGetAttributes.attr = (hipFuncAttributes*)attr; \
1430  cb_data.args.hipFuncGetAttributes.func = (const void*)func; \
1431 };
1432 #define INIT_hipEventCreateWithFlags_CB_ARGS_DATA(cb_data) { \
1433  cb_data.args.hipEventCreateWithFlags.event = (hipEvent_t*)event; \
1434  cb_data.args.hipEventCreateWithFlags.flags = (unsigned)flags; \
1435 };
1436 #define INIT_hipStreamQuery_CB_ARGS_DATA(cb_data) { \
1437  cb_data.args.hipStreamQuery.stream = (hipStream_t)stream; \
1438 };
1439 #define INIT_hipDeviceGetPCIBusId_CB_ARGS_DATA(cb_data) { \
1440  cb_data.args.hipDeviceGetPCIBusId.pciBusId = (char*)pciBusId; \
1441  cb_data.args.hipDeviceGetPCIBusId.len = (int)len; \
1442  cb_data.args.hipDeviceGetPCIBusId.device = (int)device; \
1443 };
1444 #define INIT_hipMemcpy_CB_ARGS_DATA(cb_data) { \
1445  cb_data.args.hipMemcpy.dst = (void*)dst; \
1446  cb_data.args.hipMemcpy.src = (const void*)src; \
1447  cb_data.args.hipMemcpy.sizeBytes = (size_t)sizeBytes; \
1448  cb_data.args.hipMemcpy.kind = (hipMemcpyKind)kind; \
1449 };
1450 #define INIT_hipPeekAtLastError_CB_ARGS_DATA(cb_data) { \
1451 };
1452 #define INIT_hipHostAlloc_CB_ARGS_DATA(cb_data) { \
1453  cb_data.args.hipHostAlloc.ptr = (void**)ptr; \
1454  cb_data.args.hipHostAlloc.size = (size_t)sizeBytes; \
1455  cb_data.args.hipHostAlloc.flags = (unsigned int)flags; \
1456 };
1457 #define INIT_hipStreamAddCallback_CB_ARGS_DATA(cb_data) { \
1458  cb_data.args.hipStreamAddCallback.stream = (hipStream_t)stream; \
1459  cb_data.args.hipStreamAddCallback.callback = (hipStreamCallback_t)callback; \
1460  cb_data.args.hipStreamAddCallback.userData = (void*)userData; \
1461  cb_data.args.hipStreamAddCallback.flags = (unsigned int)flags; \
1462 };
1463 #define INIT_hipMemcpyToArray_CB_ARGS_DATA(cb_data) { \
1464  cb_data.args.hipMemcpyToArray.dst = (hipArray*)dst; \
1465  cb_data.args.hipMemcpyToArray.wOffset = (size_t)wOffset; \
1466  cb_data.args.hipMemcpyToArray.hOffset = (size_t)hOffset; \
1467  cb_data.args.hipMemcpyToArray.src = (const void*)src; \
1468  cb_data.args.hipMemcpyToArray.count = (size_t)count; \
1469  cb_data.args.hipMemcpyToArray.kind = (hipMemcpyKind)kind; \
1470 };
1471 #define INIT_hipDeviceSynchronize_CB_ARGS_DATA(cb_data) { \
1472 };
1473 #define INIT_hipDeviceGetCacheConfig_CB_ARGS_DATA(cb_data) { \
1474  cb_data.args.hipDeviceGetCacheConfig.cacheConfig = (hipFuncCache_t*)cacheConfig; \
1475 };
1476 #define INIT_hipMalloc3D_CB_ARGS_DATA(cb_data) { \
1477  cb_data.args.hipMalloc3D.pitchedDevPtr = (hipPitchedPtr*)pitchedDevPtr; \
1478  cb_data.args.hipMalloc3D.extent = (hipExtent)extent; \
1479 };
1480 #define INIT_hipPointerGetAttributes_CB_ARGS_DATA(cb_data) { \
1481  cb_data.args.hipPointerGetAttributes.attributes = (hipPointerAttribute_t*)attributes; \
1482  cb_data.args.hipPointerGetAttributes.ptr = (const void*)ptr; \
1483 };
1484 #define INIT_hipMemsetAsync_CB_ARGS_DATA(cb_data) { \
1485  cb_data.args.hipMemsetAsync.dst = (void*)dst; \
1486  cb_data.args.hipMemsetAsync.value = (int)value; \
1487  cb_data.args.hipMemsetAsync.sizeBytes = (size_t)sizeBytes; \
1488  cb_data.args.hipMemsetAsync.stream = (hipStream_t)stream; \
1489 };
1490 #define INIT_hipMemcpyToSymbol_CB_ARGS_DATA(cb_data) { \
1491  cb_data.args.hipMemcpyToSymbol.symbolName = (const void*)symbolName; \
1492  cb_data.args.hipMemcpyToSymbol.src = (const void*)src; \
1493  cb_data.args.hipMemcpyToSymbol.sizeBytes = (size_t)count; \
1494  cb_data.args.hipMemcpyToSymbol.offset = (size_t)offset; \
1495  cb_data.args.hipMemcpyToSymbol.kind = (hipMemcpyKind)kind; \
1496 };
1497 #define INIT_hipCtxPushCurrent_CB_ARGS_DATA(cb_data) { \
1498  cb_data.args.hipCtxPushCurrent.ctx = (hipCtx_t)ctx; \
1499 };
1500 #define INIT_hipMemcpyPeer_CB_ARGS_DATA(cb_data) { \
1501  cb_data.args.hipMemcpyPeer.dst = (void*)dst; \
1502  cb_data.args.hipMemcpyPeer.dstDeviceId = (int)dstDevice; \
1503  cb_data.args.hipMemcpyPeer.src = (const void*)src; \
1504  cb_data.args.hipMemcpyPeer.srcDeviceId = (int)srcDevice; \
1505  cb_data.args.hipMemcpyPeer.sizeBytes = (size_t)sizeBytes; \
1506 };
1507 #define INIT_hipEventSynchronize_CB_ARGS_DATA(cb_data) { \
1508  cb_data.args.hipEventSynchronize.event = (hipEvent_t)event; \
1509 };
1510 #define INIT_hipMemcpyDtoDAsync_CB_ARGS_DATA(cb_data) { \
1511  cb_data.args.hipMemcpyDtoDAsync.dst = (hipDeviceptr_t)dst; \
1512  cb_data.args.hipMemcpyDtoDAsync.src = (hipDeviceptr_t)src; \
1513  cb_data.args.hipMemcpyDtoDAsync.sizeBytes = (size_t)sizeBytes; \
1514  cb_data.args.hipMemcpyDtoDAsync.stream = (hipStream_t)stream; \
1515 };
1516 #define INIT_hipCtxEnablePeerAccess_CB_ARGS_DATA(cb_data) { \
1517  cb_data.args.hipCtxEnablePeerAccess.peerCtx = (hipCtx_t)peerCtx; \
1518  cb_data.args.hipCtxEnablePeerAccess.flags = (unsigned int)flags; \
1519 };
1520 #define INIT_hipMemcpyDtoHAsync_CB_ARGS_DATA(cb_data) { \
1521  cb_data.args.hipMemcpyDtoHAsync.dst = (void*)dst; \
1522  cb_data.args.hipMemcpyDtoHAsync.src = (hipDeviceptr_t)src; \
1523  cb_data.args.hipMemcpyDtoHAsync.sizeBytes = (size_t)sizeBytes; \
1524  cb_data.args.hipMemcpyDtoHAsync.stream = (hipStream_t)stream; \
1525 };
1526 #define INIT_hipModuleLaunchKernel_CB_ARGS_DATA(cb_data) { \
1527  cb_data.args.hipModuleLaunchKernel.f = (hipFunction_t)f; \
1528  cb_data.args.hipModuleLaunchKernel.gridDimX = (unsigned int)gridDimX; \
1529  cb_data.args.hipModuleLaunchKernel.gridDimY = (unsigned int)gridDimY; \
1530  cb_data.args.hipModuleLaunchKernel.gridDimZ = (unsigned int)gridDimZ; \
1531  cb_data.args.hipModuleLaunchKernel.blockDimX = (unsigned int)blockDimX; \
1532  cb_data.args.hipModuleLaunchKernel.blockDimY = (unsigned int)blockDimY; \
1533  cb_data.args.hipModuleLaunchKernel.blockDimZ = (unsigned int)blockDimZ; \
1534  cb_data.args.hipModuleLaunchKernel.sharedMemBytes = (unsigned int)sharedMemBytes; \
1535  cb_data.args.hipModuleLaunchKernel.stream = (hipStream_t)hStream; \
1536  cb_data.args.hipModuleLaunchKernel.kernelParams = (void**)kernelParams; \
1537  cb_data.args.hipModuleLaunchKernel.extra = (void**)extra; \
1538 };
1539 #define INIT_hipHccModuleLaunchKernel_CB_ARGS_DATA(cb_data) { \
1540  cb_data.args.hipModuleLaunchKernel.f = (hipFunction_t)f; \
1541 };
1542 #define INIT_hipModuleGetTexRef_CB_ARGS_DATA(cb_data) { \
1543  cb_data.args.hipModuleGetTexRef.texRef = (textureReference**)texRef; \
1544  cb_data.args.hipModuleGetTexRef.hmod = (hipModule_t)hmod; \
1545  cb_data.args.hipModuleGetTexRef.name = (const char*)name; \
1546 };
1547 #define INIT_hipRemoveActivityCallback_CB_ARGS_DATA(cb_data) { \
1548  cb_data.args.hipRemoveActivityCallback.id = (uint32_t)id; \
1549 };
1550 #define INIT_hipDeviceGetLimit_CB_ARGS_DATA(cb_data) { \
1551  cb_data.args.hipDeviceGetLimit.pValue = (size_t*)pValue; \
1552  cb_data.args.hipDeviceGetLimit.limit = (hipLimit_t)limit; \
1553 };
1554 #define INIT_hipModuleLoadDataEx_CB_ARGS_DATA(cb_data) { \
1555  cb_data.args.hipModuleLoadDataEx.module = (hipModule_t*)module; \
1556  cb_data.args.hipModuleLoadDataEx.image = (const void*)image; \
1557  cb_data.args.hipModuleLoadDataEx.numOptions = (unsigned int)numOptions; \
1558  cb_data.args.hipModuleLoadDataEx.options = (hipJitOption*)options; \
1559  cb_data.args.hipModuleLoadDataEx.optionValues = (void**)optionValues; \
1560 };
1561 #define INIT_hipRuntimeGetVersion_CB_ARGS_DATA(cb_data) { \
1562  cb_data.args.hipRuntimeGetVersion.runtimeVersion = (int*)runtimeVersion; \
1563 };
1564 #define INIT_hipGetDeviceProperties_CB_ARGS_DATA(cb_data) { \
1565  cb_data.args.hipGetDeviceProperties.prop = (hipDeviceProp_t*)props; \
1566  cb_data.args.hipGetDeviceProperties.deviceId = (int)device; \
1567 };
1568 #define INIT_hipFreeArray_CB_ARGS_DATA(cb_data) { \
1569  cb_data.args.hipFreeArray.array = (hipArray*)array; \
1570 };
1571 #define INIT_hipDevicePrimaryCtxRelease_CB_ARGS_DATA(cb_data) { \
1572  cb_data.args.hipDevicePrimaryCtxRelease.dev = (hipDevice_t)dev; \
1573 };
1574 #define INIT_hipHostGetDevicePointer_CB_ARGS_DATA(cb_data) { \
1575  cb_data.args.hipHostGetDevicePointer.devPtr = (void**)devicePointer; \
1576  cb_data.args.hipHostGetDevicePointer.hstPtr = (void*)hostPointer; \
1577  cb_data.args.hipHostGetDevicePointer.flags = (unsigned int)flags; \
1578 };
1579 #define INIT_hipMemcpyParam2D_CB_ARGS_DATA(cb_data) { \
1580  cb_data.args.hipMemcpyParam2D.pCopy = (const hip_Memcpy2D*)pCopy; \
1581 };
1582 #define INIT_hipConfigureCall_CB_ARGS_DATA(cb_data) { \
1583  cb_data.args.hipConfigureCall.gridDim = (dim3)gridDim; \
1584  cb_data.args.hipConfigureCall.blockDim = (dim3)blockDim; \
1585  cb_data.args.hipConfigureCall.sharedMem = (size_t)sharedMem; \
1586  cb_data.args.hipConfigureCall.stream = (hipStream_t)stream; \
1587 };
1588 #define INIT_hipModuleGetFunction_CB_ARGS_DATA(cb_data) { \
1589  cb_data.args.hipModuleGetFunction.function = (hipFunction_t*)hfunc; \
1590  cb_data.args.hipModuleGetFunction.module = (hipModule_t)hmod; \
1591  cb_data.args.hipModuleGetFunction.kname = (const char*)name; \
1592 };
1593 #define INIT_hipGetDevice_CB_ARGS_DATA(cb_data) { \
1594  cb_data.args.hipGetDevice.deviceId = (int*)deviceId; \
1595 };
1596 #define INIT_hipGetDeviceCount_CB_ARGS_DATA(cb_data) { \
1597  cb_data.args.hipGetDeviceCount.count = (int*)count; \
1598 };
1599 #define INIT_CB_ARGS_DATA(cb_id, cb_data) INIT_##cb_id##_CB_ARGS_DATA(cb_data)
1600 
1601 #if 0
1602 // HIP API string method, method name and parameters
1603 const char* hipApiString(hip_api_id_t id, const hip_api_data_t* data) {
1604  std::ostringstream oss;
1605  switch (id) {
1606  case HIP_API_ID_hipHostFree:
1607  oss << "hipHostFree("
1608  << " ptr=" << data->args.hipHostFree.ptr
1609  << ")";
1610  break;
1611  case HIP_API_ID_hipMemcpyToSymbolAsync:
1612  oss << "hipMemcpyToSymbolAsync("
1613  << " symbolName=" << data->args.hipMemcpyToSymbolAsync.symbolName << ","
1614  << " src=" << data->args.hipMemcpyToSymbolAsync.src << ","
1615  << " sizeBytes=" << data->args.hipMemcpyToSymbolAsync.sizeBytes << ","
1616  << " offset=" << data->args.hipMemcpyToSymbolAsync.offset << ","
1617  << " kind=" << data->args.hipMemcpyToSymbolAsync.kind << ","
1618  << " stream=" << data->args.hipMemcpyToSymbolAsync.stream
1619  << ")";
1620  break;
1621  case HIP_API_ID_hipMallocPitch:
1622  oss << "hipMallocPitch("
1623  << " ptr=" << data->args.hipMallocPitch.ptr << ","
1624  << " pitch=" << data->args.hipMallocPitch.pitch << ","
1625  << " width=" << data->args.hipMallocPitch.width << ","
1626  << " height=" << data->args.hipMallocPitch.height
1627  << ")";
1628  break;
1629  case HIP_API_ID_hipMalloc:
1630  oss << "hipMalloc("
1631  << " ptr=" << data->args.hipMalloc.ptr << ","
1632  << " size=" << data->args.hipMalloc.size
1633  << ")";
1634  break;
1635  case HIP_API_ID_hipDeviceGetName:
1636  oss << "hipDeviceGetName("
1637  << " name=" << data->args.hipDeviceGetName.name << ","
1638  << " len=" << data->args.hipDeviceGetName.len << ","
1639  << " device=" << data->args.hipDeviceGetName.device
1640  << ")";
1641  break;
1642  case HIP_API_ID_hipEventRecord:
1643  oss << "hipEventRecord("
1644  << " event=" << data->args.hipEventRecord.event << ","
1645  << " stream=" << data->args.hipEventRecord.stream
1646  << ")";
1647  break;
1648  case HIP_API_ID_hipCtxSynchronize:
1649  oss << "hipCtxSynchronize("
1650  << ")";
1651  break;
1652  case HIP_API_ID_hipSetDevice:
1653  oss << "hipSetDevice("
1654  << " deviceId=" << data->args.hipSetDevice.deviceId
1655  << ")";
1656  break;
1657  case HIP_API_ID_hipSetupArgument:
1658  oss << "hipSetupArgument("
1659  << " arg=" << data->args.hipSetupArgument.arg << ","
1660  << " size=" << data->args.hipSetupArgument.size << ","
1661  << " offset=" << data->args.hipSetupArgument.offset
1662  << ")";
1663  break;
1664  case HIP_API_ID_hipMemcpyFromSymbolAsync:
1665  oss << "hipMemcpyFromSymbolAsync("
1666  << " dst=" << data->args.hipMemcpyFromSymbolAsync.dst << ","
1667  << " symbolName=" << data->args.hipMemcpyFromSymbolAsync.symbolName << ","
1668  << " sizeBytes=" << data->args.hipMemcpyFromSymbolAsync.sizeBytes << ","
1669  << " offset=" << data->args.hipMemcpyFromSymbolAsync.offset << ","
1670  << " kind=" << data->args.hipMemcpyFromSymbolAsync.kind << ","
1671  << " stream=" << data->args.hipMemcpyFromSymbolAsync.stream
1672  << ")";
1673  break;
1674  case HIP_API_ID_hipMemcpyDtoD:
1675  oss << "hipMemcpyDtoD("
1676  << " dst=" << data->args.hipMemcpyDtoD.dst << ","
1677  << " src=" << data->args.hipMemcpyDtoD.src << ","
1678  << " sizeBytes=" << data->args.hipMemcpyDtoD.sizeBytes
1679  << ")";
1680  break;
1681  case HIP_API_ID_hipMemcpy2DToArray:
1682  oss << "hipMemcpy2DToArray("
1683  << " dst=" << data->args.hipMemcpy2DToArray.dst << ","
1684  << " wOffset=" << data->args.hipMemcpy2DToArray.wOffset << ","
1685  << " hOffset=" << data->args.hipMemcpy2DToArray.hOffset << ","
1686  << " src=" << data->args.hipMemcpy2DToArray.src << ","
1687  << " spitch=" << data->args.hipMemcpy2DToArray.spitch << ","
1688  << " width=" << data->args.hipMemcpy2DToArray.width << ","
1689  << " height=" << data->args.hipMemcpy2DToArray.height << ","
1690  << " kind=" << data->args.hipMemcpy2DToArray.kind
1691  << ")";
1692  break;
1693  case HIP_API_ID_hipCtxGetCacheConfig:
1694  oss << "hipCtxGetCacheConfig("
1695  << " cacheConfig=" << data->args.hipCtxGetCacheConfig.cacheConfig
1696  << ")";
1697  break;
1698  case HIP_API_ID_hipStreamWaitEvent:
1699  oss << "hipStreamWaitEvent("
1700  << " stream=" << data->args.hipStreamWaitEvent.stream << ","
1701  << " event=" << data->args.hipStreamWaitEvent.event << ","
1702  << " flags=" << data->args.hipStreamWaitEvent.flags
1703  << ")";
1704  break;
1705  case HIP_API_ID_hipModuleLoad:
1706  oss << "hipModuleLoad("
1707  << " module=" << data->args.hipModuleLoad.module << ","
1708  << " fname=" << data->args.hipModuleLoad.fname
1709  << ")";
1710  break;
1711  case HIP_API_ID_hipDevicePrimaryCtxSetFlags:
1712  oss << "hipDevicePrimaryCtxSetFlags("
1713  << " dev=" << data->args.hipDevicePrimaryCtxSetFlags.dev << ","
1714  << " flags=" << data->args.hipDevicePrimaryCtxSetFlags.flags
1715  << ")";
1716  break;
1717  case HIP_API_ID_hipMemcpyAsync:
1718  oss << "hipMemcpyAsync("
1719  << " dst=" << data->args.hipMemcpyAsync.dst << ","
1720  << " src=" << data->args.hipMemcpyAsync.src << ","
1721  << " sizeBytes=" << data->args.hipMemcpyAsync.sizeBytes << ","
1722  << " kind=" << data->args.hipMemcpyAsync.kind << ","
1723  << " stream=" << data->args.hipMemcpyAsync.stream
1724  << ")";
1725  break;
1726  case HIP_API_ID_hipMalloc3DArray:
1727  oss << "hipMalloc3DArray("
1728  << " array=" << data->args.hipMalloc3DArray.array << ","
1729  << " desc=" << data->args.hipMalloc3DArray.desc << ","
1730  << " extent=" << data->args.hipMalloc3DArray.extent << ","
1731  << " flags=" << data->args.hipMalloc3DArray.flags
1732  << ")";
1733  break;
1734  case HIP_API_ID_hipStreamCreate:
1735  oss << "hipStreamCreate("
1736  << " stream=" << data->args.hipStreamCreate.stream
1737  << ")";
1738  break;
1739  case HIP_API_ID_hipCtxGetCurrent:
1740  oss << "hipCtxGetCurrent("
1741  << " ctx=" << data->args.hipCtxGetCurrent.ctx
1742  << ")";
1743  break;
1744  case HIP_API_ID_hipDevicePrimaryCtxGetState:
1745  oss << "hipDevicePrimaryCtxGetState("
1746  << " dev=" << data->args.hipDevicePrimaryCtxGetState.dev << ","
1747  << " flags=" << data->args.hipDevicePrimaryCtxGetState.flags << ","
1748  << " active=" << data->args.hipDevicePrimaryCtxGetState.active
1749  << ")";
1750  break;
1751  case HIP_API_ID_hipEventQuery:
1752  oss << "hipEventQuery("
1753  << " event=" << data->args.hipEventQuery.event
1754  << ")";
1755  break;
1756  case HIP_API_ID_hipEventCreate:
1757  oss << "hipEventCreate("
1758  << " event=" << data->args.hipEventCreate.event
1759  << ")";
1760  break;
1761  case HIP_API_ID_hipMemGetAddressRange:
1762  oss << "hipMemGetAddressRange("
1763  << " pbase=" << data->args.hipMemGetAddressRange.pbase << ","
1764  << " psize=" << data->args.hipMemGetAddressRange.psize << ","
1765  << " dptr=" << data->args.hipMemGetAddressRange.dptr
1766  << ")";
1767  break;
1768  case HIP_API_ID_hipMemcpyFromSymbol:
1769  oss << "hipMemcpyFromSymbol("
1770  << " dst=" << data->args.hipMemcpyFromSymbol.dst << ","
1771  << " symbolName=" << data->args.hipMemcpyFromSymbol.symbolName << ","
1772  << " sizeBytes=" << data->args.hipMemcpyFromSymbol.sizeBytes << ","
1773  << " offset=" << data->args.hipMemcpyFromSymbol.offset << ","
1774  << " kind=" << data->args.hipMemcpyFromSymbol.kind
1775  << ")";
1776  break;
1777  case HIP_API_ID_hipArrayCreate:
1778  oss << "hipArrayCreate("
1779  << " pHandle=" << data->args.hipArrayCreate.pHandle << ","
1780  << " pAllocateArray=" << data->args.hipArrayCreate.pAllocateArray
1781  << ")";
1782  break;
1783  case HIP_API_ID_hipStreamGetFlags:
1784  oss << "hipStreamGetFlags("
1785  << " stream=" << data->args.hipStreamGetFlags.stream << ","
1786  << " flags=" << data->args.hipStreamGetFlags.flags
1787  << ")";
1788  break;
1789  case HIP_API_ID_hipMallocArray:
1790  oss << "hipMallocArray("
1791  << " array=" << data->args.hipMallocArray.array << ","
1792  << " desc=" << data->args.hipMallocArray.desc << ","
1793  << " width=" << data->args.hipMallocArray.width << ","
1794  << " height=" << data->args.hipMallocArray.height << ","
1795  << " flags=" << data->args.hipMallocArray.flags
1796  << ")";
1797  break;
1798  case HIP_API_ID_hipCtxGetSharedMemConfig:
1799  oss << "hipCtxGetSharedMemConfig("
1800  << " pConfig=" << data->args.hipCtxGetSharedMemConfig.pConfig
1801  << ")";
1802  break;
1803  case HIP_API_ID_hipMemPtrGetInfo:
1804  oss << "hipMemPtrGetInfo("
1805  << " ptr=" << data->args.hipMemPtrGetInfo.ptr << ","
1806  << " size=" << data->args.hipMemPtrGetInfo.size
1807  << ")";
1808  break;
1809  case HIP_API_ID_hipCtxGetFlags:
1810  oss << "hipCtxGetFlags("
1811  << " flags=" << data->args.hipCtxGetFlags.flags
1812  << ")";
1813  break;
1814  case HIP_API_ID_hipStreamDestroy:
1815  oss << "hipStreamDestroy("
1816  << " stream=" << data->args.hipStreamDestroy.stream
1817  << ")";
1818  break;
1819  case HIP_API_ID_hipMemset3DAsync:
1820  oss << "hipMemset3DAsync("
1821  << " pitchedDevPtr=" << data->args.hipMemset3DAsync.pitchedDevPtr << ","
1822  << " value=" << data->args.hipMemset3DAsync.value << ","
1823  << " extent=" << data->args.hipMemset3DAsync.extent << ","
1824  << " stream=" << data->args.hipMemset3DAsync.stream
1825  << ")";
1826  break;
1827  case HIP_API_ID_hipMemcpy3D:
1828  oss << "hipMemcpy3D("
1829  << " p=" << data->args.hipMemcpy3D.p
1830  << ")";
1831  break;
1832  case HIP_API_ID_hipInit:
1833  oss << "hipInit("
1834  << " flags=" << data->args.hipInit.flags
1835  << ")";
1836  break;
1837  case HIP_API_ID_hipMemcpyAtoH:
1838  oss << "hipMemcpyAtoH("
1839  << " dst=" << data->args.hipMemcpyAtoH.dst << ","
1840  << " srcArray=" << data->args.hipMemcpyAtoH.srcArray << ","
1841  << " srcOffset=" << data->args.hipMemcpyAtoH.srcOffset << ","
1842  << " count=" << data->args.hipMemcpyAtoH.count
1843  << ")";
1844  break;
1845  case HIP_API_ID_hipMemset2D:
1846  oss << "hipMemset2D("
1847  << " dst=" << data->args.hipMemset2D.dst << ","
1848  << " pitch=" << data->args.hipMemset2D.pitch << ","
1849  << " value=" << data->args.hipMemset2D.value << ","
1850  << " width=" << data->args.hipMemset2D.width << ","
1851  << " height=" << data->args.hipMemset2D.height
1852  << ")";
1853  break;
1854  case HIP_API_ID_hipMemset2DAsync:
1855  oss << "hipMemset2DAsync("
1856  << " dst=" << data->args.hipMemset2DAsync.dst << ","
1857  << " pitch=" << data->args.hipMemset2DAsync.pitch << ","
1858  << " value=" << data->args.hipMemset2DAsync.value << ","
1859  << " width=" << data->args.hipMemset2DAsync.width << ","
1860  << " height=" << data->args.hipMemset2DAsync.height << ","
1861  << " stream=" << data->args.hipMemset2DAsync.stream
1862  << ")";
1863  break;
1864  case HIP_API_ID_hipDeviceCanAccessPeer:
1865  oss << "hipDeviceCanAccessPeer("
1866  << " canAccessPeer=" << data->args.hipDeviceCanAccessPeer.canAccessPeer << ","
1867  << " deviceId=" << data->args.hipDeviceCanAccessPeer.deviceId << ","
1868  << " peerDeviceId=" << data->args.hipDeviceCanAccessPeer.peerDeviceId
1869  << ")";
1870  break;
1871  case HIP_API_ID_hipDeviceEnablePeerAccess:
1872  oss << "hipDeviceEnablePeerAccess("
1873  << " peerDeviceId=" << data->args.hipDeviceEnablePeerAccess.peerDeviceId << ","
1874  << " flags=" << data->args.hipDeviceEnablePeerAccess.flags
1875  << ")";
1876  break;
1877  case HIP_API_ID_hipModuleUnload:
1878  oss << "hipModuleUnload("
1879  << " module=" << data->args.hipModuleUnload.module
1880  << ")";
1881  break;
1882  case HIP_API_ID_hipHostUnregister:
1883  oss << "hipHostUnregister("
1884  << " hostPtr=" << data->args.hipHostUnregister.hostPtr
1885  << ")";
1886  break;
1887  case HIP_API_ID_hipProfilerStop:
1888  oss << "hipProfilerStop("
1889  << ")";
1890  break;
1891  case HIP_API_ID_hipLaunchByPtr:
1892  oss << "hipLaunchByPtr("
1893  << " func=" << data->args.hipLaunchByPtr.func
1894  << ")";
1895  break;
1896  case HIP_API_ID_hipStreamSynchronize:
1897  oss << "hipStreamSynchronize("
1898  << " stream=" << data->args.hipStreamSynchronize.stream
1899  << ")";
1900  break;
1901  case HIP_API_ID_hipFreeHost:
1902  oss << "hipFreeHost("
1903  << " ptr=" << data->args.hipFreeHost.ptr
1904  << ")";
1905  break;
1906  case HIP_API_ID_hipRemoveApiCallback:
1907  oss << "hipRemoveApiCallback("
1908  << " id=" << data->args.hipRemoveApiCallback.id
1909  << ")";
1910  break;
1911  case HIP_API_ID_hipDeviceSetCacheConfig:
1912  oss << "hipDeviceSetCacheConfig("
1913  << " cacheConfig=" << data->args.hipDeviceSetCacheConfig.cacheConfig
1914  << ")";
1915  break;
1916  case HIP_API_ID_hipCtxGetApiVersion:
1917  oss << "hipCtxGetApiVersion("
1918  << " ctx=" << data->args.hipCtxGetApiVersion.ctx << ","
1919  << " apiVersion=" << data->args.hipCtxGetApiVersion.apiVersion
1920  << ")";
1921  break;
1922  case HIP_API_ID_hipMemcpyHtoD:
1923  oss << "hipMemcpyHtoD("
1924  << " dst=" << data->args.hipMemcpyHtoD.dst << ","
1925  << " src=" << data->args.hipMemcpyHtoD.src << ","
1926  << " sizeBytes=" << data->args.hipMemcpyHtoD.sizeBytes
1927  << ")";
1928  break;
1929  case HIP_API_ID_hipModuleGetGlobal:
1930  oss << "hipModuleGetGlobal("
1931  << " dptr=" << data->args.hipModuleGetGlobal.dptr << ","
1932  << " bytes=" << data->args.hipModuleGetGlobal.bytes << ","
1933  << " hmod=" << data->args.hipModuleGetGlobal.hmod << ","
1934  << " name=" << data->args.hipModuleGetGlobal.name
1935  << ")";
1936  break;
1937  case HIP_API_ID_hipMemcpyHtoA:
1938  oss << "hipMemcpyHtoA("
1939  << " dstArray=" << data->args.hipMemcpyHtoA.dstArray << ","
1940  << " dstOffset=" << data->args.hipMemcpyHtoA.dstOffset << ","
1941  << " srcHost=" << data->args.hipMemcpyHtoA.srcHost << ","
1942  << " count=" << data->args.hipMemcpyHtoA.count
1943  << ")";
1944  break;
1945  case HIP_API_ID_hipCtxCreate:
1946  oss << "hipCtxCreate("
1947  << " ctx=" << data->args.hipCtxCreate.ctx << ","
1948  << " flags=" << data->args.hipCtxCreate.flags << ","
1949  << " device=" << data->args.hipCtxCreate.device
1950  << ")";
1951  break;
1952  case HIP_API_ID_hipMemcpy2D:
1953  oss << "hipMemcpy2D("
1954  << " dst=" << data->args.hipMemcpy2D.dst << ","
1955  << " dpitch=" << data->args.hipMemcpy2D.dpitch << ","
1956  << " src=" << data->args.hipMemcpy2D.src << ","
1957  << " spitch=" << data->args.hipMemcpy2D.spitch << ","
1958  << " width=" << data->args.hipMemcpy2D.width << ","
1959  << " height=" << data->args.hipMemcpy2D.height << ","
1960  << " kind=" << data->args.hipMemcpy2D.kind
1961  << ")";
1962  break;
1963  case HIP_API_ID_hipIpcCloseMemHandle:
1964  oss << "hipIpcCloseMemHandle("
1965  << " devPtr=" << data->args.hipIpcCloseMemHandle.devPtr
1966  << ")";
1967  break;
1968  case HIP_API_ID_hipChooseDevice:
1969  oss << "hipChooseDevice("
1970  << " device=" << data->args.hipChooseDevice.device << ","
1971  << " prop=" << data->args.hipChooseDevice.prop
1972  << ")";
1973  break;
1974  case HIP_API_ID_hipDeviceSetSharedMemConfig:
1975  oss << "hipDeviceSetSharedMemConfig("
1976  << " config=" << data->args.hipDeviceSetSharedMemConfig.config
1977  << ")";
1978  break;
1979  case HIP_API_ID_hipDeviceComputeCapability:
1980  oss << "hipDeviceComputeCapability("
1981  << " major=" << data->args.hipDeviceComputeCapability.major << ","
1982  << " minor=" << data->args.hipDeviceComputeCapability.minor << ","
1983  << " device=" << data->args.hipDeviceComputeCapability.device
1984  << ")";
1985  break;
1986  case HIP_API_ID_hipRegisterApiCallback:
1987  oss << "hipRegisterApiCallback("
1988  << " id=" << data->args.hipRegisterApiCallback.id << ","
1989  << " fun=" << data->args.hipRegisterApiCallback.fun << ","
1990  << " arg=" << data->args.hipRegisterApiCallback.arg
1991  << ")";
1992  break;
1993  case HIP_API_ID_hipDeviceGet:
1994  oss << "hipDeviceGet("
1995  << " device=" << data->args.hipDeviceGet.device << ","
1996  << " ordinal=" << data->args.hipDeviceGet.ordinal
1997  << ")";
1998  break;
1999  case HIP_API_ID_hipProfilerStart:
2000  oss << "hipProfilerStart("
2001  << ")";
2002  break;
2003  case HIP_API_ID_hipCtxSetCacheConfig:
2004  oss << "hipCtxSetCacheConfig("
2005  << " cacheConfig=" << data->args.hipCtxSetCacheConfig.cacheConfig
2006  << ")";
2007  break;
2008  case HIP_API_ID_hipFuncSetCacheConfig:
2009  oss << "hipFuncSetCacheConfig("
2010  << " func=" << data->args.hipFuncSetCacheConfig.func << ","
2011  << " config=" << data->args.hipFuncSetCacheConfig.config
2012  << ")";
2013  break;
2014  case HIP_API_ID_hipMemcpyPeerAsync:
2015  oss << "hipMemcpyPeerAsync("
2016  << " dst=" << data->args.hipMemcpyPeerAsync.dst << ","
2017  << " dstDeviceId=" << data->args.hipMemcpyPeerAsync.dstDeviceId << ","
2018  << " src=" << data->args.hipMemcpyPeerAsync.src << ","
2019  << " srcDevice=" << data->args.hipMemcpyPeerAsync.srcDevice << ","
2020  << " sizeBytes=" << data->args.hipMemcpyPeerAsync.sizeBytes << ","
2021  << " stream=" << data->args.hipMemcpyPeerAsync.stream
2022  << ")";
2023  break;
2024  case HIP_API_ID_hipEventElapsedTime:
2025  oss << "hipEventElapsedTime("
2026  << " ms=" << data->args.hipEventElapsedTime.ms << ","
2027  << " start=" << data->args.hipEventElapsedTime.start << ","
2028  << " stop=" << data->args.hipEventElapsedTime.stop
2029  << ")";
2030  break;
2031  case HIP_API_ID_hipDevicePrimaryCtxReset:
2032  oss << "hipDevicePrimaryCtxReset("
2033  << " dev=" << data->args.hipDevicePrimaryCtxReset.dev
2034  << ")";
2035  break;
2036  case HIP_API_ID_hipEventDestroy:
2037  oss << "hipEventDestroy("
2038  << " event=" << data->args.hipEventDestroy.event
2039  << ")";
2040  break;
2041  case HIP_API_ID_hipCtxPopCurrent:
2042  oss << "hipCtxPopCurrent("
2043  << " ctx=" << data->args.hipCtxPopCurrent.ctx
2044  << ")";
2045  break;
2046  case HIP_API_ID_hipHostGetFlags:
2047  oss << "hipHostGetFlags("
2048  << " flagsPtr=" << data->args.hipHostGetFlags.flagsPtr << ","
2049  << " hostPtr=" << data->args.hipHostGetFlags.hostPtr
2050  << ")";
2051  break;
2052  case HIP_API_ID_hipHostMalloc:
2053  oss << "hipHostMalloc("
2054  << " ptr=" << data->args.hipHostMalloc.ptr << ","
2055  << " size=" << data->args.hipHostMalloc.size << ","
2056  << " flags=" << data->args.hipHostMalloc.flags
2057  << ")";
2058  break;
2059  case HIP_API_ID_hipDriverGetVersion:
2060  oss << "hipDriverGetVersion("
2061  << " driverVersion=" << data->args.hipDriverGetVersion.driverVersion
2062  << ")";
2063  break;
2064  case HIP_API_ID_hipMemGetInfo:
2065  oss << "hipMemGetInfo("
2066  << " free=" << data->args.hipMemGetInfo.free << ","
2067  << " total=" << data->args.hipMemGetInfo.total
2068  << ")";
2069  break;
2070  case HIP_API_ID_hipDeviceReset:
2071  oss << "hipDeviceReset("
2072  << ")";
2073  break;
2074  case HIP_API_ID_hipMemset:
2075  oss << "hipMemset("
2076  << " dst=" << data->args.hipMemset.dst << ","
2077  << " value=" << data->args.hipMemset.value << ","
2078  << " sizeBytes=" << data->args.hipMemset.sizeBytes
2079  << ")";
2080  break;
2081  case HIP_API_ID_hipMemsetD8:
2082  oss << "hipMemsetD8("
2083  << " dest=" << data->args.hipMemsetD8.dest << ","
2084  << " value=" << data->args.hipMemsetD8.value << ","
2085  << " sizeBytes=" << data->args.hipMemsetD8.sizeBytes
2086  << ")";
2087  break;
2088  case HIP_API_ID_hipHostRegister:
2089  oss << "hipHostRegister("
2090  << " hostPtr=" << data->args.hipHostRegister.hostPtr << ","
2091  << " sizeBytes=" << data->args.hipHostRegister.sizeBytes << ","
2092  << " flags=" << data->args.hipHostRegister.flags
2093  << ")";
2094  break;
2095  case HIP_API_ID_hipCtxSetSharedMemConfig:
2096  oss << "hipCtxSetSharedMemConfig("
2097  << " config=" << data->args.hipCtxSetSharedMemConfig.config
2098  << ")";
2099  break;
2100  case HIP_API_ID_hipArray3DCreate:
2101  oss << "hipArray3DCreate("
2102  << " array=" << data->args.hipArray3DCreate.array << ","
2103  << " pAllocateArray=" << data->args.hipArray3DCreate.pAllocateArray
2104  << ")";
2105  break;
2106  case HIP_API_ID_hipIpcOpenMemHandle:
2107  oss << "hipIpcOpenMemHandle("
2108  << " devPtr=" << data->args.hipIpcOpenMemHandle.devPtr << ","
2109  << " handle=" << data->args.hipIpcOpenMemHandle.handle << ","
2110  << " flags=" << data->args.hipIpcOpenMemHandle.flags
2111  << ")";
2112  break;
2113  case HIP_API_ID_hipGetLastError:
2114  oss << "hipGetLastError("
2115  << ")";
2116  break;
2117  case HIP_API_ID_hipCtxDestroy:
2118  oss << "hipCtxDestroy("
2119  << " ctx=" << data->args.hipCtxDestroy.ctx
2120  << ")";
2121  break;
2122  case HIP_API_ID_hipDeviceGetSharedMemConfig:
2123  oss << "hipDeviceGetSharedMemConfig("
2124  << " pConfig=" << data->args.hipDeviceGetSharedMemConfig.pConfig
2125  << ")";
2126  break;
2127  case HIP_API_ID_hipRegisterActivityCallback:
2128  oss << "hipRegisterActivityCallback("
2129  << " id=" << data->args.hipRegisterActivityCallback.id << ","
2130  << " fun=" << data->args.hipRegisterActivityCallback.fun << ","
2131  << " arg=" << data->args.hipRegisterActivityCallback.arg
2132  << ")";
2133  break;
2134  case HIP_API_ID_hipSetDeviceFlags:
2135  oss << "hipSetDeviceFlags("
2136  << " flags=" << data->args.hipSetDeviceFlags.flags
2137  << ")";
2138  break;
2139  case HIP_API_ID_hipFree:
2140  oss << "hipFree("
2141  << " ptr=" << data->args.hipFree.ptr
2142  << ")";
2143  break;
2144  case HIP_API_ID_hipDeviceGetAttribute:
2145  oss << "hipDeviceGetAttribute("
2146  << " pi=" << data->args.hipDeviceGetAttribute.pi << ","
2147  << " attr=" << data->args.hipDeviceGetAttribute.attr << ","
2148  << " deviceId=" << data->args.hipDeviceGetAttribute.deviceId
2149  << ")";
2150  break;
2151  case HIP_API_ID_hipMemcpyDtoH:
2152  oss << "hipMemcpyDtoH("
2153  << " dst=" << data->args.hipMemcpyDtoH.dst << ","
2154  << " src=" << data->args.hipMemcpyDtoH.src << ","
2155  << " sizeBytes=" << data->args.hipMemcpyDtoH.sizeBytes
2156  << ")";
2157  break;
2158  case HIP_API_ID_hipCtxDisablePeerAccess:
2159  oss << "hipCtxDisablePeerAccess("
2160  << " peerCtx=" << data->args.hipCtxDisablePeerAccess.peerCtx
2161  << ")";
2162  break;
2163  case HIP_API_ID_hipDeviceGetByPCIBusId:
2164  oss << "hipDeviceGetByPCIBusId("
2165  << " device=" << data->args.hipDeviceGetByPCIBusId.device << ","
2166  << " pciBusId=" << data->args.hipDeviceGetByPCIBusId.pciBusId
2167  << ")";
2168  break;
2169  case HIP_API_ID_hipIpcGetMemHandle:
2170  oss << "hipIpcGetMemHandle("
2171  << " handle=" << data->args.hipIpcGetMemHandle.handle << ","
2172  << " devPtr=" << data->args.hipIpcGetMemHandle.devPtr
2173  << ")";
2174  break;
2175  case HIP_API_ID_hipMemcpyHtoDAsync:
2176  oss << "hipMemcpyHtoDAsync("
2177  << " dst=" << data->args.hipMemcpyHtoDAsync.dst << ","
2178  << " src=" << data->args.hipMemcpyHtoDAsync.src << ","
2179  << " sizeBytes=" << data->args.hipMemcpyHtoDAsync.sizeBytes << ","
2180  << " stream=" << data->args.hipMemcpyHtoDAsync.stream
2181  << ")";
2182  break;
2183  case HIP_API_ID_hipCtxGetDevice:
2184  oss << "hipCtxGetDevice("
2185  << " device=" << data->args.hipCtxGetDevice.device
2186  << ")";
2187  break;
2188  case HIP_API_ID_hipMemset3D:
2189  oss << "hipMemset3D("
2190  << " pitchedDevPtr=" << data->args.hipMemset3D.pitchedDevPtr << ","
2191  << " value=" << data->args.hipMemset3D.value << ","
2192  << " extent=" << data->args.hipMemset3D.extent
2193  << ")";
2194  break;
2195  case HIP_API_ID_hipModuleLoadData:
2196  oss << "hipModuleLoadData("
2197  << " module=" << data->args.hipModuleLoadData.module << ","
2198  << " image=" << data->args.hipModuleLoadData.image
2199  << ")";
2200  break;
2201  case HIP_API_ID_hipDeviceTotalMem:
2202  oss << "hipDeviceTotalMem("
2203  << " bytes=" << data->args.hipDeviceTotalMem.bytes << ","
2204  << " device=" << data->args.hipDeviceTotalMem.device
2205  << ")";
2206  break;
2207  case HIP_API_ID_hipCtxSetCurrent:
2208  oss << "hipCtxSetCurrent("
2209  << " ctx=" << data->args.hipCtxSetCurrent.ctx
2210  << ")";
2211  break;
2212  case HIP_API_ID_hipMallocHost:
2213  oss << "hipMallocHost("
2214  << " ptr=" << data->args.hipMallocHost.ptr << ","
2215  << " size=" << data->args.hipMallocHost.size
2216  << ")";
2217  break;
2218  case HIP_API_ID_hipDevicePrimaryCtxRetain:
2219  oss << "hipDevicePrimaryCtxRetain("
2220  << " pctx=" << data->args.hipDevicePrimaryCtxRetain.pctx << ","
2221  << " dev=" << data->args.hipDevicePrimaryCtxRetain.dev
2222  << ")";
2223  break;
2224  case HIP_API_ID_hipDeviceDisablePeerAccess:
2225  oss << "hipDeviceDisablePeerAccess("
2226  << " peerDeviceId=" << data->args.hipDeviceDisablePeerAccess.peerDeviceId
2227  << ")";
2228  break;
2229  case HIP_API_ID_hipStreamCreateWithFlags:
2230  oss << "hipStreamCreateWithFlags("
2231  << " stream=" << data->args.hipStreamCreateWithFlags.stream << ","
2232  << " flags=" << data->args.hipStreamCreateWithFlags.flags
2233  << ")";
2234  break;
2235  case HIP_API_ID_hipMemcpyFromArray:
2236  oss << "hipMemcpyFromArray("
2237  << " dst=" << data->args.hipMemcpyFromArray.dst << ","
2238  << " srcArray=" << data->args.hipMemcpyFromArray.srcArray << ","
2239  << " wOffset=" << data->args.hipMemcpyFromArray.wOffset << ","
2240  << " hOffset=" << data->args.hipMemcpyFromArray.hOffset << ","
2241  << " count=" << data->args.hipMemcpyFromArray.count << ","
2242  << " kind=" << data->args.hipMemcpyFromArray.kind
2243  << ")";
2244  break;
2245  case HIP_API_ID_hipMemcpy2DAsync:
2246  oss << "hipMemcpy2DAsync("
2247  << " dst=" << data->args.hipMemcpy2DAsync.dst << ","
2248  << " dpitch=" << data->args.hipMemcpy2DAsync.dpitch << ","
2249  << " src=" << data->args.hipMemcpy2DAsync.src << ","
2250  << " spitch=" << data->args.hipMemcpy2DAsync.spitch << ","
2251  << " width=" << data->args.hipMemcpy2DAsync.width << ","
2252  << " height=" << data->args.hipMemcpy2DAsync.height << ","
2253  << " kind=" << data->args.hipMemcpy2DAsync.kind << ","
2254  << " stream=" << data->args.hipMemcpy2DAsync.stream
2255  << ")";
2256  break;
2257  case HIP_API_ID_hipFuncGetAttributes:
2258  oss << "hipFuncGetAttributes("
2259  << " attr=" << data->args.hipFuncGetAttributes.attr << ","
2260  << " func=" << data->args.hipFuncGetAttributes.func
2261  << ")";
2262  break;
2263  case HIP_API_ID_hipEventCreateWithFlags:
2264  oss << "hipEventCreateWithFlags("
2265  << " event=" << data->args.hipEventCreateWithFlags.event << ","
2266  << " flags=" << data->args.hipEventCreateWithFlags.flags
2267  << ")";
2268  break;
2269  case HIP_API_ID_hipStreamQuery:
2270  oss << "hipStreamQuery("
2271  << " stream=" << data->args.hipStreamQuery.stream
2272  << ")";
2273  break;
2274  case HIP_API_ID_hipDeviceGetPCIBusId:
2275  oss << "hipDeviceGetPCIBusId("
2276  << " pciBusId=" << data->args.hipDeviceGetPCIBusId.pciBusId << ","
2277  << " len=" << data->args.hipDeviceGetPCIBusId.len << ","
2278  << " device=" << data->args.hipDeviceGetPCIBusId.device
2279  << ")";
2280  break;
2281  case HIP_API_ID_hipMemcpy:
2282  oss << "hipMemcpy("
2283  << " dst=" << data->args.hipMemcpy.dst << ","
2284  << " src=" << data->args.hipMemcpy.src << ","
2285  << " sizeBytes=" << data->args.hipMemcpy.sizeBytes << ","
2286  << " kind=" << data->args.hipMemcpy.kind
2287  << ")";
2288  break;
2289  case HIP_API_ID_hipPeekAtLastError:
2290  oss << "hipPeekAtLastError("
2291  << ")";
2292  break;
2293  case HIP_API_ID_hipHostAlloc:
2294  oss << "hipHostAlloc("
2295  << " ptr=" << data->args.hipHostAlloc.ptr << ","
2296  << " size=" << data->args.hipHostAlloc.size << ","
2297  << " flags=" << data->args.hipHostAlloc.flags
2298  << ")";
2299  break;
2300  case HIP_API_ID_hipStreamAddCallback:
2301  oss << "hipStreamAddCallback("
2302  << " stream=" << data->args.hipStreamAddCallback.stream << ","
2303  << " callback=" << data->args.hipStreamAddCallback.callback << ","
2304  << " userData=" << data->args.hipStreamAddCallback.userData << ","
2305  << " flags=" << data->args.hipStreamAddCallback.flags
2306  << ")";
2307  break;
2308  case HIP_API_ID_hipMemcpyToArray:
2309  oss << "hipMemcpyToArray("
2310  << " dst=" << data->args.hipMemcpyToArray.dst << ","
2311  << " wOffset=" << data->args.hipMemcpyToArray.wOffset << ","
2312  << " hOffset=" << data->args.hipMemcpyToArray.hOffset << ","
2313  << " src=" << data->args.hipMemcpyToArray.src << ","
2314  << " count=" << data->args.hipMemcpyToArray.count << ","
2315  << " kind=" << data->args.hipMemcpyToArray.kind
2316  << ")";
2317  break;
2318  case HIP_API_ID_hipDeviceSynchronize:
2319  oss << "hipDeviceSynchronize("
2320  << ")";
2321  break;
2322  case HIP_API_ID_hipDeviceGetCacheConfig:
2323  oss << "hipDeviceGetCacheConfig("
2324  << " cacheConfig=" << data->args.hipDeviceGetCacheConfig.cacheConfig
2325  << ")";
2326  break;
2327  case HIP_API_ID_hipMalloc3D:
2328  oss << "hipMalloc3D("
2329  << " pitchedDevPtr=" << data->args.hipMalloc3D.pitchedDevPtr << ","
2330  << " extent=" << data->args.hipMalloc3D.extent
2331  << ")";
2332  break;
2333  case HIP_API_ID_hipPointerGetAttributes:
2334  oss << "hipPointerGetAttributes("
2335  << " attributes=" << data->args.hipPointerGetAttributes.attributes << ","
2336  << " ptr=" << data->args.hipPointerGetAttributes.ptr
2337  << ")";
2338  break;
2339  case HIP_API_ID_hipMemsetAsync:
2340  oss << "hipMemsetAsync("
2341  << " dst=" << data->args.hipMemsetAsync.dst << ","
2342  << " value=" << data->args.hipMemsetAsync.value << ","
2343  << " sizeBytes=" << data->args.hipMemsetAsync.sizeBytes << ","
2344  << " stream=" << data->args.hipMemsetAsync.stream
2345  << ")";
2346  break;
2347  case HIP_API_ID_hipMemcpyToSymbol:
2348  oss << "hipMemcpyToSymbol("
2349  << " symbolName=" << data->args.hipMemcpyToSymbol.symbolName << ","
2350  << " src=" << data->args.hipMemcpyToSymbol.src << ","
2351  << " sizeBytes=" << data->args.hipMemcpyToSymbol.sizeBytes << ","
2352  << " offset=" << data->args.hipMemcpyToSymbol.offset << ","
2353  << " kind=" << data->args.hipMemcpyToSymbol.kind
2354  << ")";
2355  break;
2356  case HIP_API_ID_hipCtxPushCurrent:
2357  oss << "hipCtxPushCurrent("
2358  << " ctx=" << data->args.hipCtxPushCurrent.ctx
2359  << ")";
2360  break;
2361  case HIP_API_ID_hipMemcpyPeer:
2362  oss << "hipMemcpyPeer("
2363  << " dst=" << data->args.hipMemcpyPeer.dst << ","
2364  << " dstDeviceId=" << data->args.hipMemcpyPeer.dstDeviceId << ","
2365  << " src=" << data->args.hipMemcpyPeer.src << ","
2366  << " srcDeviceId=" << data->args.hipMemcpyPeer.srcDeviceId << ","
2367  << " sizeBytes=" << data->args.hipMemcpyPeer.sizeBytes
2368  << ")";
2369  break;
2370  case HIP_API_ID_hipEventSynchronize:
2371  oss << "hipEventSynchronize("
2372  << " event=" << data->args.hipEventSynchronize.event
2373  << ")";
2374  break;
2375  case HIP_API_ID_hipMemcpyDtoDAsync:
2376  oss << "hipMemcpyDtoDAsync("
2377  << " dst=" << data->args.hipMemcpyDtoDAsync.dst << ","
2378  << " src=" << data->args.hipMemcpyDtoDAsync.src << ","
2379  << " sizeBytes=" << data->args.hipMemcpyDtoDAsync.sizeBytes << ","
2380  << " stream=" << data->args.hipMemcpyDtoDAsync.stream
2381  << ")";
2382  break;
2383  case HIP_API_ID_hipCtxEnablePeerAccess:
2384  oss << "hipCtxEnablePeerAccess("
2385  << " peerCtx=" << data->args.hipCtxEnablePeerAccess.peerCtx << ","
2386  << " flags=" << data->args.hipCtxEnablePeerAccess.flags
2387  << ")";
2388  break;
2389  case HIP_API_ID_hipMemcpyDtoHAsync:
2390  oss << "hipMemcpyDtoHAsync("
2391  << " dst=" << data->args.hipMemcpyDtoHAsync.dst << ","
2392  << " src=" << data->args.hipMemcpyDtoHAsync.src << ","
2393  << " sizeBytes=" << data->args.hipMemcpyDtoHAsync.sizeBytes << ","
2394  << " stream=" << data->args.hipMemcpyDtoHAsync.stream
2395  << ")";
2396  break;
2397  case HIP_API_ID_hipModuleLaunchKernel:
2398  oss << "hipModuleLaunchKernel("
2399  << " f=" << data->args.hipModuleLaunchKernel.f << ","
2400  << " gridDimX=" << data->args.hipModuleLaunchKernel.gridDimX << ","
2401  << " gridDimY=" << data->args.hipModuleLaunchKernel.gridDimY << ","
2402  << " gridDimZ=" << data->args.hipModuleLaunchKernel.gridDimZ << ","
2403  << " blockDimX=" << data->args.hipModuleLaunchKernel.blockDimX << ","
2404  << " blockDimY=" << data->args.hipModuleLaunchKernel.blockDimY << ","
2405  << " blockDimZ=" << data->args.hipModuleLaunchKernel.blockDimZ << ","
2406  << " sharedMemBytes=" << data->args.hipModuleLaunchKernel.sharedMemBytes << ","
2407  << " stream=" << data->args.hipModuleLaunchKernel.stream << ","
2408  << " kernelParams=" << data->args.hipModuleLaunchKernel.kernelParams << ","
2409  << " extra=" << data->args.hipModuleLaunchKernel.extra
2410  << ")";
2411  break;
2412  case HIP_API_ID_hipHccModuleLaunchKernel:
2413  oss << "hipHccModuleLaunchKernel("
2414  << " f=" << data->args.hipHccModuleLaunchKernel.f << ","
2415  << ")";
2416  break;
2417  case HIP_API_ID_hipModuleGetTexRef:
2418  oss << "hipModuleGetTexRef("
2419  << " texRef=" << data->args.hipModuleGetTexRef.texRef << ","
2420  << " hmod=" << data->args.hipModuleGetTexRef.hmod << ","
2421  << " name=" << data->args.hipModuleGetTexRef.name
2422  << ")";
2423  break;
2424  case HIP_API_ID_hipRemoveActivityCallback:
2425  oss << "hipRemoveActivityCallback("
2426  << " id=" << data->args.hipRemoveActivityCallback.id
2427  << ")";
2428  break;
2429  case HIP_API_ID_hipDeviceGetLimit:
2430  oss << "hipDeviceGetLimit("
2431  << " pValue=" << data->args.hipDeviceGetLimit.pValue << ","
2432  << " limit=" << data->args.hipDeviceGetLimit.limit
2433  << ")";
2434  break;
2435  case HIP_API_ID_hipModuleLoadDataEx:
2436  oss << "hipModuleLoadDataEx("
2437  << " module=" << data->args.hipModuleLoadDataEx.module << ","
2438  << " image=" << data->args.hipModuleLoadDataEx.image << ","
2439  << " numOptions=" << data->args.hipModuleLoadDataEx.numOptions << ","
2440  << " options=" << data->args.hipModuleLoadDataEx.options << ","
2441  << " optionValues=" << data->args.hipModuleLoadDataEx.optionValues
2442  << ")";
2443  break;
2444  case HIP_API_ID_hipRuntimeGetVersion:
2445  oss << "hipRuntimeGetVersion("
2446  << " runtimeVersion=" << data->args.hipRuntimeGetVersion.runtimeVersion
2447  << ")";
2448  break;
2449  case HIP_API_ID_hipGetDeviceProperties:
2450  oss << "hipGetDeviceProperties("
2451  << " prop=" << data->args.hipGetDeviceProperties.prop << ","
2452  << " deviceId=" << data->args.hipGetDeviceProperties.deviceId
2453  << ")";
2454  break;
2455  case HIP_API_ID_hipFreeArray:
2456  oss << "hipFreeArray("
2457  << " array=" << data->args.hipFreeArray.array
2458  << ")";
2459  break;
2460  case HIP_API_ID_hipDevicePrimaryCtxRelease:
2461  oss << "hipDevicePrimaryCtxRelease("
2462  << " dev=" << data->args.hipDevicePrimaryCtxRelease.dev
2463  << ")";
2464  break;
2465  case HIP_API_ID_hipHostGetDevicePointer:
2466  oss << "hipHostGetDevicePointer("
2467  << " devPtr=" << data->args.hipHostGetDevicePointer.devPtr << ","
2468  << " hstPtr=" << data->args.hipHostGetDevicePointer.hstPtr << ","
2469  << " flags=" << data->args.hipHostGetDevicePointer.flags
2470  << ")";
2471  break;
2472  case HIP_API_ID_hipMemcpyParam2D:
2473  oss << "hipMemcpyParam2D("
2474  << " pCopy=" << data->args.hipMemcpyParam2D.pCopy
2475  << ")";
2476  break;
2477  case HIP_API_ID_hipConfigureCall:
2478  oss << "hipConfigureCall("
2479  << " gridDim=" << data->args.hipConfigureCall.gridDim << ","
2480  << " blockDim=" << data->args.hipConfigureCall.blockDim << ","
2481  << " sharedMem=" << data->args.hipConfigureCall.sharedMem << ","
2482  << " stream=" << data->args.hipConfigureCall.stream
2483  << ")";
2484  break;
2485  case HIP_API_ID_hipModuleGetFunction:
2486  oss << "hipModuleGetFunction("
2487  << " function=" << data->args.hipModuleGetFunction.function << ","
2488  << " module=" << data->args.hipModuleGetFunction.module << ","
2489  << " kname=" << data->args.hipModuleGetFunction.kname
2490  << ")";
2491  break;
2492  case HIP_API_ID_hipGetDevice:
2493  oss << "hipGetDevice("
2494  << " deviceId=" << data->args.hipGetDevice.deviceId
2495  << ")";
2496  break;
2497  case HIP_API_ID_hipGetDeviceCount:
2498  oss << "hipGetDeviceCount("
2499  << " count=" << data->args.hipGetDeviceCount.count
2500  << ")";
2501  break;
2502  default: oss << "unknown";
2503  };
2504  return strdup(oss.str().c_str());
2505 };
2506 #endif
2507 
2508 #endif // _HIP_CBSTR
Definition: driver_types.h:232
Definition: hip_runtime_api.h:137
Definition: hip_module.cpp:75
Definition: hip_runtime_api.h:97
Definition: hip_hcc_internal.h:885
Definition: texture_types.h:73
Definition: driver_types.h:70
hipDeviceAttribute_t
Definition: hip_runtime_api.h:259
Definition: hip_runtime_api.h:240
void(* hipStreamCallback_t)(hipStream_t stream, hipError_t status, void *userData)
Definition: hip_runtime_api.h:791
Definition: driver_types.h:245
Definition: driver_types.h:61
Definition: driver_types.h:225
hipFuncCache_t
Definition: hip_runtime_api.h:216
Definition: hip_runtime_api.h:83
hipSharedMemConfig
Definition: hip_runtime_api.h:227
Definition: driver_types.h:38
Definition: hip_hcc_internal.h:705
Definition: hip_hcc_internal.h:524
Definition: driver_types.h:82
Definition: hip_runtime_api.h:82
Definition: hip_hcc_internal.h:373
Definition: hip_prof_str.h:369