[Openmp-commits] [llvm] [openmp] [Offload] Allow to record kernel launch stack traces (PR #100472)
Joseph Huber via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jul 30 14:56:09 PDT 2024
================
@@ -216,6 +216,90 @@ class ErrorReporter {
getAllocTyName(ATI->Kind).data(), DevicePtr);
#undef DEALLOCATION_ERROR
}
+
+ /// Report that a kernel encountered a trap instruction.
+ static void reportTrapInKernel(
+ GenericDeviceTy &Device, KernelTraceInfoRecordTy &KTIR,
+ std::function<bool(__tgt_async_info &)> AsyncInfoWrapperMatcher) {
+ assert(AsyncInfoWrapperMatcher && "A matcher is required");
+
+ uint32_t Idx = 0;
+ for (uint32_t I = 0, E = KTIR.size(); I < E; ++I) {
+ auto KTI = KTIR.getKernelTraceInfo(I);
----------------
jhuber6 wrote:
Does `llvm::enumerate` work here?
https://github.com/llvm/llvm-project/pull/100472
More information about the Openmp-commits
mailing list