[Openmp-commits] [PATCH] D102378: [libomptarget][amdgpu] Convert an assert to print and offload_fail
Jon Chesterfield via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu May 13 09:31:58 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb049870d3b47: [libomptarget][amdgpu] Convert an assert to print and offload_fail (authored by JonChesterfield).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102378/new/
https://reviews.llvm.org/D102378
Files:
openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
Index: openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
===================================================================
--- openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
+++ openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
@@ -1764,11 +1764,15 @@
KernelTy *KernelInfo = (KernelTy *)tgt_entry_ptr;
std::string kernel_name = std::string(KernelInfo->Name);
+ if (KernelInfoTable[device_id].find(kernel_name) ==
+ KernelInfoTable[device_id].end()) {
+ DP("Kernel %s not found\n", kernel_name.c_str());
+ return OFFLOAD_FAIL;
+ }
+
uint32_t sgpr_count, vgpr_count, sgpr_spill_count, vgpr_spill_count;
{
- assert(KernelInfoTable[device_id].find(kernel_name) !=
- KernelInfoTable[device_id].end());
auto it = KernelInfoTable[device_id][kernel_name];
sgpr_count = it.sgpr_count;
vgpr_count = it.vgpr_count;
@@ -1832,8 +1836,6 @@
packet->completion_signal = {0}; // may want a pool of signals
{
- assert(KernelInfoTable[device_id].find(kernel_name) !=
- KernelInfoTable[device_id].end());
auto it = KernelInfoTable[device_id][kernel_name];
packet->kernel_object = it.kernel_object;
packet->private_segment_size = it.private_segment_size;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102378.345186.patch
Type: text/x-patch
Size: 1237 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210513/a9c7c4a7/attachment.bin>
More information about the Openmp-commits
mailing list