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