Unverified Commit 35d4ce90 authored by Tom Benson's avatar Tom Benson Committed by GitHub
Browse files

Handle hipErrorFileNotFound gracefully in ROCm 7 (#5303)

parent fc21fd19
......@@ -589,6 +589,16 @@ hipModule_t HipContext::createModule(const string source, const map<string, stri
loadedModules.push_back(module);
return module;
}
else {
// Need to call hipGetLastError to clear the error code
hipError_t last_error = hipGetLastError();
if (last_error != hipErrorFileNotFound) {
std::ostringstream msg;
msg << "Detected HIP error: " << hipGetErrorString(last_error)
<< "(" << last_error << ") at " << __FILE__ << ":" << __LINE__;
throw OpenMMException(msg.str());
}
}
// Select names for the various temporary files.
......
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