Fix failure to get global variables

Implement _ihipGetGlobalVar() and ihipGetGlobalVar() to
get global variables.

Change-Id: I442ab6712e12306c3316f114f5dc42f6daefaad9


[ROCm/clr commit: 8e9e6a44a4]
This commit is contained in:
Tao Sang committed 2020-03-17 16:14:16 -04:00
1 parent 80c688d9f5
commit 7a171f28c7
3 files changed
+225 -9

No files matched your search

+6 -1
View File
@@ -879,7 +879,12 @@ namespace hip_impl {
hipError_t agent_globals::read_agent_global_from_process(hipDeviceptr_t* dptr, size_t* bytes,
const char* name) {
return impl->read_agent_global_from_process(dptr, bytes, name);
hipError_t result = impl->read_agent_global_from_process(dptr, bytes, name);
if(result != hipSuccess) {
// For Clang Compiler + Hcc Rt
result = ihipGetGlobalVar(dptr, bytes, name);
}
return result;
}
} // Namespace hip_impl.