depot/third_party/nixpkgs/pkgs/development/compilers/llvm/rocm/0000-fix-openmp.patch

19 lines
761 B
Diff
Raw Normal View History

diff --git a/libomptarget/plugins/amdgpu/impl/impl.cpp b/libomptarget/plugins/amdgpu/impl/impl.cpp
index 80e024789..3a14e0889 100644
--- a/libomptarget/plugins/amdgpu/impl/impl.cpp
+++ b/libomptarget/plugins/amdgpu/impl/impl.cpp
@@ -21,10 +21,11 @@ bool is_locked(void *ptr, hsa_status_t *err_p, void **agentBaseAddress) {
info.size = sizeof(hsa_amd_pointer_info_t);
err = hsa_amd_pointer_info(ptr, &info, nullptr, nullptr, nullptr);
- if (err != HSA_STATUS_SUCCESS)
+ if (err != HSA_STATUS_SUCCESS) {
DP("Error when getting pointer info\n");
- else
+ } else {
is_locked = (info.type == HSA_EXT_POINTER_TYPE_LOCKED);
+ }
if (is_locked && agentBaseAddress != nullptr) {
// When user passes in a basePtr+offset we need to fix the