Fix failure to get global variables

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

Change-Id: I442ab6712e12306c3316f114f5dc42f6daefaad9


[ROCm/hip commit: d432dbfe20]
This commit is contained in:
Tao Sang
2020-03-13 23:05:43 -04:00
parent 27288c9358
commit acff9e29dd
3 changed files with 225 additions and 9 deletions
+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.