@@ -119,41 +119,38 @@ void Interface::endTargetDataAlloc(int64_t DeviceId, void *HstPtrBegin,
119
119
endTargetDataOperation ();
120
120
}
121
121
122
- void Interface::beginTargetDataSubmit (int64_t DeviceId , void *TgtPtrBegin ,
123
- void *HstPtrBegin, size_t Size ,
124
- void *Code) {
122
+ void Interface::beginTargetDataSubmit (int64_t SrcDeviceId , void *SrcPtrBegin ,
123
+ int64_t DstDeviceId, void *DstPtrBegin ,
124
+ size_t Size, void *Code) {
125
125
beginTargetDataOperation ();
126
126
if (ompt_callback_target_data_op_emi_fn) {
127
127
// HostOpId will be set by the tool. Invoke the tool supplied data op EMI
128
128
// callback
129
129
ompt_callback_target_data_op_emi_fn (
130
130
ompt_scope_begin, TargetTaskData, &TargetData, &HostOpId,
131
- ompt_target_data_transfer_to_device, HstPtrBegin,
132
- /* SrcDeviceNum=*/ omp_get_initial_device (), TgtPtrBegin, DeviceId, Size,
133
- Code);
131
+ ompt_target_data_transfer_to_device, SrcPtrBegin, SrcDeviceId,
132
+ DstPtrBegin, DstDeviceId, Size, Code);
134
133
} else if (ompt_callback_target_data_op_fn) {
135
134
// HostOpId is set by the runtime
136
135
HostOpId = createOpId ();
137
136
// Invoke the tool supplied data op callback
138
137
ompt_callback_target_data_op_fn (
139
138
TargetData.value , HostOpId, ompt_target_data_transfer_to_device,
140
- HstPtrBegin, /* SrcDeviceNum=*/ omp_get_initial_device (), TgtPtrBegin,
141
- DeviceId, Size, Code);
139
+ SrcPtrBegin, SrcDeviceId, DstPtrBegin, DstDeviceId, Size, Code);
142
140
}
143
141
}
144
142
145
- void Interface::endTargetDataSubmit (int64_t DeviceId , void *TgtPtrBegin ,
146
- void *HstPtrBegin, size_t Size ,
147
- void *Code) {
143
+ void Interface::endTargetDataSubmit (int64_t SrcDeviceId , void *SrcPtrBegin ,
144
+ int64_t DstDeviceId, void *DstPtrBegin ,
145
+ size_t Size, void *Code) {
148
146
// Only EMI callback handles end scope
149
147
if (ompt_callback_target_data_op_emi_fn) {
150
148
// HostOpId will be set by the tool. Invoke the tool supplied data op EMI
151
149
// callback
152
150
ompt_callback_target_data_op_emi_fn (
153
151
ompt_scope_end, TargetTaskData, &TargetData, &HostOpId,
154
- ompt_target_data_transfer_to_device, HstPtrBegin,
155
- /* SrcDeviceNum=*/ omp_get_initial_device (), TgtPtrBegin, DeviceId, Size,
156
- Code);
152
+ ompt_target_data_transfer_to_device, SrcPtrBegin, SrcDeviceId,
153
+ DstPtrBegin, DstDeviceId, Size, Code);
157
154
}
158
155
endTargetDataOperation ();
159
156
}
@@ -193,41 +190,38 @@ void Interface::endTargetDataDelete(int64_t DeviceId, void *TgtPtrBegin,
193
190
endTargetDataOperation ();
194
191
}
195
192
196
- void Interface::beginTargetDataRetrieve (int64_t DeviceId , void *HstPtrBegin ,
197
- void *TgtPtrBegin, size_t Size ,
198
- void *Code) {
193
+ void Interface::beginTargetDataRetrieve (int64_t SrcDeviceId , void *SrcPtrBegin ,
194
+ int64_t DstDeviceId, void *DstPtrBegin ,
195
+ size_t Size, void *Code) {
199
196
beginTargetDataOperation ();
200
197
if (ompt_callback_target_data_op_emi_fn) {
201
198
// HostOpId will be set by the tool. Invoke the tool supplied data op EMI
202
199
// callback
203
200
ompt_callback_target_data_op_emi_fn (
204
201
ompt_scope_begin, TargetTaskData, &TargetData, &HostOpId,
205
- ompt_target_data_transfer_from_device, TgtPtrBegin, DeviceId,
206
- HstPtrBegin,
207
- /* TgtDeviceNum=*/ omp_get_initial_device (), Size, Code);
202
+ ompt_target_data_transfer_from_device, SrcPtrBegin, SrcDeviceId,
203
+ DstPtrBegin, DstDeviceId, Size, Code);
208
204
} else if (ompt_callback_target_data_op_fn) {
209
205
// HostOpId is set by the runtime
210
206
HostOpId = createOpId ();
211
207
// Invoke the tool supplied data op callback
212
208
ompt_callback_target_data_op_fn (
213
209
TargetData.value , HostOpId, ompt_target_data_transfer_from_device,
214
- TgtPtrBegin, DeviceId, HstPtrBegin,
215
- /* TgtDeviceNum=*/ omp_get_initial_device (), Size, Code);
210
+ DstPtrBegin, DstDeviceId, SrcPtrBegin, SrcDeviceId, Size, Code);
216
211
}
217
212
}
218
213
219
- void Interface::endTargetDataRetrieve (int64_t DeviceId , void *HstPtrBegin ,
220
- void *TgtPtrBegin, size_t Size ,
221
- void *Code) {
214
+ void Interface::endTargetDataRetrieve (int64_t SrcDeviceId , void *SrcPtrBegin ,
215
+ int64_t DstDeviceId, void *DstPtrBegin ,
216
+ size_t Size, void *Code) {
222
217
// Only EMI callback handles end scope
223
218
if (ompt_callback_target_data_op_emi_fn) {
224
219
// HostOpId will be set by the tool. Invoke the tool supplied data op EMI
225
220
// callback
226
221
ompt_callback_target_data_op_emi_fn (
227
222
ompt_scope_end, TargetTaskData, &TargetData, &HostOpId,
228
- ompt_target_data_transfer_from_device, TgtPtrBegin, DeviceId,
229
- HstPtrBegin,
230
- /* TgtDeviceNum=*/ omp_get_initial_device (), Size, Code);
223
+ ompt_target_data_transfer_from_device, SrcPtrBegin, SrcDeviceId,
224
+ DstPtrBegin, DstDeviceId, Size, Code);
231
225
}
232
226
endTargetDataOperation ();
233
227
}
0 commit comments