Skip to content

Commit

Permalink
Enable hipModuleGetGlobal()
Browse files Browse the repository at this point in the history
  • Loading branch information
petrex committed Nov 12, 2019
1 parent 03a29da commit 8aea238
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/runtime/rocm/rocm_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,9 @@ class ROCMModuleNode : public runtime::ModuleNode {
hipDeviceptr_t global = nullptr;
size_t nbytes = 0;

hipError_t result = hipSuccess;
// ROCM doesn't support hipModuleGetGlobal yet.
// hipError_t result = hipModuleGetGlobal(&global, &nbytes,
// module_[device_id], global_name.c_str());
ROCM_DRIVER_CALL(hipModuleGetGlobal(&global, &nbytes,
module_[device_id], global_name.c_str()));
CHECK_EQ(nbytes, expect_nbytes);
if (result != hipSuccess) {
LOG(FATAL)
<< "ROCMError: hipModuleGetGlobal " << global_name
<< " failed with error: " << hipGetErrorString(result);
}
return global;
}

Expand Down

0 comments on commit 8aea238

Please sign in to comment.