0d9fc34957
GitOrigin-RevId: 5ed481943351e9fd354aeb557679624224de38d5
18 lines
761 B
Diff
18 lines
761 B
Diff
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
|