@@ -456,7 +456,7 @@ AsyncInfoWrapperTy::AsyncInfoWrapperTy(GenericDeviceTy &Device,
456
456
__tgt_async_info *AsyncInfoPtr)
457
457
: Device(Device),
458
458
AsyncInfoPtr(AsyncInfoPtr ? AsyncInfoPtr : &LocalAsyncInfo) {
459
- LocalAsyncInfo.OmptEventInfo = nullptr ;
459
+ LocalAsyncInfo.ProfilerData = nullptr ;
460
460
}
461
461
462
462
void AsyncInfoWrapperTy::finalize (Error &Err) {
@@ -525,7 +525,7 @@ Error GenericKernelTy::init(GenericDeviceTy &GenericDevice,
525
525
} else {
526
526
// Check that the retrieved execution mode is valid.
527
527
if (!GenericKernelTy::isValidExecutionMode (ExecModeGlobal.getValue ()))
528
- return Plugin::error (ErrorCode::UNKNOWN,
528
+ return Plugin::error (ErrorCode::UNKNOWN,
529
529
" Invalid execution mode %d for '%s'" ,
530
530
ExecModeGlobal.getValue (), getName ());
531
531
ExecutionMode = ExecModeGlobal.getValue ();
@@ -613,22 +613,22 @@ GenericKernelTy::getKernelLaunchEnvironment(
613
613
DPxPTR (&LocalKLE), DPxPTR (*AllocOrErr),
614
614
sizeof (KernelLaunchEnvironmentTy));
615
615
616
- // The OmptEventInfo at this point will have a callback for a kernel launch,
616
+ // The ProfilerData at this point will have a callback for a kernel launch,
617
617
// not a data-op. This is due to the "external" operation being a kernel
618
618
// launch and the data submit here being an implementation detail. We
619
- // temporarily set the OmptEventInfo to nullptr, such that we disable the
619
+ // temporarily set the ProfilerData to nullptr, such that we disable the
620
620
// timing etc further down to not trigger assertions or report implementation
621
621
// detail.
622
622
__tgt_async_info *AI = AsyncInfoWrapper;
623
- if (AI && AI->OmptEventInfo ) {
624
- auto LocalOEI = AI->OmptEventInfo ;
625
- AI->OmptEventInfo = nullptr ;
623
+ if (AI && AI->ProfilerData ) {
624
+ auto LocalOEI = AI->ProfilerData ;
625
+ AI->ProfilerData = nullptr ;
626
626
auto Err = GenericDevice.dataSubmit (*AllocOrErr, &LocalKLE,
627
627
sizeof (KernelLaunchEnvironmentTy),
628
628
AsyncInfoWrapper);
629
629
if (Err)
630
630
return Err;
631
- AI->OmptEventInfo = LocalOEI;
631
+ AI->ProfilerData = LocalOEI;
632
632
return static_cast <KernelLaunchEnvironmentTy *>(*AllocOrErr);
633
633
}
634
634
@@ -783,10 +783,11 @@ Error GenericKernelTy::launch(GenericDeviceTy &GenericDevice, void **ArgPtrs,
783
783
OMPT_IF_TRACING_ENABLED (if (llvm::omp::target::ompt::isTracedDevice (
784
784
getDeviceId (&GenericDevice))) {
785
785
__tgt_async_info *AI = AsyncInfoWrapper;
786
- if (AI->OmptEventInfo != nullptr ) {
786
+ if (AI->ProfilerData != nullptr ) {
787
787
// Set number of granted teams for OMPT
788
788
setOmptGrantedNumTeams (NumBlocks[0 ]);
789
- AI->OmptEventInfo ->NumTeams = NumBlocks[0 ];
789
+ reinterpret_cast <OmptEventInfoTy *>(AI->ProfilerData )->NumTeams =
790
+ NumBlocks[0 ];
790
791
}
791
792
});
792
793
0 commit comments