Commit 5b9f459d by Peter Yeh Committed by masahi

Enable hipModuleGetGlobal() (#4321)

parent d9b8a6c9
...@@ -122,16 +122,9 @@ class ROCMModuleNode : public runtime::ModuleNode { ...@@ -122,16 +122,9 @@ class ROCMModuleNode : public runtime::ModuleNode {
hipDeviceptr_t global = nullptr; hipDeviceptr_t global = nullptr;
size_t nbytes = 0; size_t nbytes = 0;
hipError_t result = hipSuccess; ROCM_DRIVER_CALL(hipModuleGetGlobal(&global, &nbytes,
// ROCM doesn't support hipModuleGetGlobal yet. module_[device_id], global_name.c_str()));
// hipError_t result = hipModuleGetGlobal(&global, &nbytes,
// module_[device_id], global_name.c_str());
CHECK_EQ(nbytes, expect_nbytes); CHECK_EQ(nbytes, expect_nbytes);
if (result != hipSuccess) {
LOG(FATAL)
<< "ROCMError: hipModuleGetGlobal " << global_name
<< " failed with error: " << hipGetErrorString(result);
}
return global; return global;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment