[llvm] [Offload][L0] Remove OMP_INFOTYPE from plugin (PR #227994)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 1 01:38:10 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-offload
Author: Alex Duran (adurang)
<details>
<summary>Changes</summary>
Remove OpenMP specific debug types and unify everithing under ODBG with OL debug types in the Level Zero plugin.
---
Full diff: https://github.com/llvm/llvm-project/pull/227994.diff
2 Files Affected:
- (modified) offload/plugins-nextgen/level_zero/src/L0Device.cpp (+4-5)
- (modified) offload/plugins-nextgen/level_zero/src/L0Kernel.cpp (+16-15)
``````````diff
diff --git a/offload/plugins-nextgen/level_zero/src/L0Device.cpp b/offload/plugins-nextgen/level_zero/src/L0Device.cpp
index e41268d7eb843..201cda7f02589 100644
--- a/offload/plugins-nextgen/level_zero/src/L0Device.cpp
+++ b/offload/plugins-nextgen/level_zero/src/L0Device.cpp
@@ -225,16 +225,15 @@ L0DeviceTy::loadBinaryImpl(std::unique_ptr<MemoryBuffer> &&TgtImage,
return PGM;
}
- INFO(OMP_INFOTYPE_PLUGIN_KERNEL, getDeviceId(),
- "Device %" PRId32 ": Loading binary from " DPxMOD "\n", getDeviceId(),
- DPxPTR(TgtImage->getBufferStart()));
+ ODBG(OLDT_Module) << "Device " << getDeviceId() << ": Loading binary from "
+ << static_cast<const void *>(TgtImage->getBufferStart());
const auto &Options = getPlugin().getOptions();
std::string CompilationOptions(Options.CompilationOptions);
CompilationOptions += " " + Options.UserCompilationOptions;
- INFO(OMP_INFOTYPE_PLUGIN_KERNEL, getDeviceId(),
- "Base L0 module compilation options: %s\n", CompilationOptions.c_str());
+ ODBG(OLDT_Module) << "Base L0 module compilation options: "
+ << CompilationOptions;
CompilationOptions += " ";
CompilationOptions += Options.InternalCompilationOptions;
diff --git a/offload/plugins-nextgen/level_zero/src/L0Kernel.cpp b/offload/plugins-nextgen/level_zero/src/L0Kernel.cpp
index 9c8893ecd9845..52b1d267d05e4 100644
--- a/offload/plugins-nextgen/level_zero/src/L0Kernel.cpp
+++ b/offload/plugins-nextgen/level_zero/src/L0Kernel.cpp
@@ -89,14 +89,14 @@ ze_group_size_t L0KernelTy::createKernelGroups(L0DeviceTy &L0Device,
KEnv.GroupSizes.groupSizeZ = std::min<uint32_t>(MaxGroupSize, NumThreads[2]);
auto DeviceId = L0Device.getDeviceId();
- INFO(OMP_INFOTYPE_PLUGIN_KERNEL, DeviceId,
- "Team sizes = {%" PRIu32 ", %" PRIu32 ", %" PRIu32 "}\n",
- KEnv.GroupSizes.groupSizeX, KEnv.GroupSizes.groupSizeY,
- KEnv.GroupSizes.groupSizeZ);
- INFO(OMP_INFOTYPE_PLUGIN_KERNEL, DeviceId,
- "Number of teams = {%" PRIu32 ", %" PRIu32 ", %" PRIu32 "}\n",
- KEnv.GroupCounts.groupCountX, KEnv.GroupCounts.groupCountY,
- KEnv.GroupCounts.groupCountZ);
+ ODBG(OLDT_Kernel) << "Device " << DeviceId << ": Team sizes = {"
+ << KEnv.GroupSizes.groupSizeX << ", "
+ << KEnv.GroupSizes.groupSizeY << ", "
+ << KEnv.GroupSizes.groupSizeZ << "}";
+ ODBG(OLDT_Kernel) << "Device " << DeviceId << ": Number of teams = {"
+ << KEnv.GroupCounts.groupCountX << ", "
+ << KEnv.GroupCounts.groupCountY << ", "
+ << KEnv.GroupCounts.groupCountZ << "}";
return KEnv.GroupSizes;
}
@@ -135,8 +135,8 @@ Error L0KernelTy::launchImpl(GenericDeviceTy &GenericDevice,
auto zeKernel = getZeKernel();
auto DeviceId = L0Device.getDeviceId();
- INFO(OMP_INFOTYPE_PLUGIN_KERNEL, DeviceId, "Launching kernel " DPxMOD "...\n",
- DPxPTR(zeKernel));
+ ODBG(OLDT_Kernel) << "Device " << DeviceId << ": Launching kernel "
+ << zeKernel << "...";
auto *IdStr = L0Device.getZeIdCStr();
bool IsCooperative = LaunchArgs.Flags.Cooperative;
@@ -178,9 +178,10 @@ Error L0KernelTy::launchImpl(GenericDeviceTy &GenericDevice,
TotalGroupCount, MaxCooperativeGroupCount);
}
- INFO(OMP_INFOTYPE_PLUGIN_KERNEL, DeviceId,
- "Cooperative kernel validated: using %u groups (max: %u)\n",
- TotalGroupCount, MaxCooperativeGroupCount);
+ ODBG(OLDT_Kernel) << "Device " << DeviceId
+ << ": Cooperative kernel validated: using "
+ << TotalGroupCount
+ << " groups (max: " << MaxCooperativeGroupCount << ")";
}
// With pointer-array arguments, zeCommandListAppendLaunchKernelWithArguments
@@ -198,8 +199,8 @@ Error L0KernelTy::launchImpl(GenericDeviceTy &GenericDevice,
// The next call should unlock the KernelLock internally.
if (auto Err = Queue->launchKernel(zeKernel, KEnv))
return Err;
- INFO(OMP_INFOTYPE_PLUGIN_KERNEL, DeviceId,
- "Submitted kernel " DPxMOD " to device %s\n", DPxPTR(zeKernel), IdStr);
+ ODBG(OLDT_Kernel) << "Device " << DeviceId << ": Submitted kernel "
+ << zeKernel << " to device " << IdStr;
return Plugin::success();
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/227994
More information about the llvm-commits
mailing list