[Openmp-commits] [PATCH] D127769: [Libomptarget] Add checks for AMDGPU TargetID using new image info

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Aug 30 11:33:55 PDT 2022


JonChesterfield added inline comments.


================
Comment at: openmp/libomptarget/plugins/amdgpu/src/rtl.cpp:2068
   hsa_status_t Err;
 
   // this is per device id init
----------------
@saiislam the commit in the repo doesn't match this diff, any guesses?

https://github.com/llvm/llvm-project/commit/4075a811ad99b7e263b8b99954cef8c96b042e22


```
-  hsa_status_t Err;
-
+  hsa_status_t Err = hsa_init();
+  if (Err != HSA_STATUS_SUCCESS) {
+    DP("HSA Initialization Failed.\n");
+    return HSA_STATUS_ERROR;
+  }
```

That doesn't have a matching hsa_shutdown. Found this while chasing a segfault, didn't expect to see multiple calls to hsa_init from the debugger.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127769/new/

https://reviews.llvm.org/D127769



More information about the Openmp-commits mailing list