Close KFD when failing due to debugger state.

Change-Id: I6a6890fd9e86d27f87ae96de1c47c89d40a4e010


[ROCm/ROCR-Runtime commit: 234ef77e32]
This commit is contained in:
Sean Keely
2021-09-30 03:03:45 -05:00
bovenliggende e0ebcb9cc3
commit 94352f3e24
@@ -372,6 +372,7 @@ bool Load() {
if (hsaKmtOpenKFD() != HSAKMT_STATUS_SUCCESS) {
return false;
}
MAKE_NAMED_SCOPE_GUARD(kfd, [&]() { hsaKmtCloseKFD(); });
// Register runtime and optionally enable the debugger
HSAKMT_STATUS err =
@@ -382,6 +383,7 @@ bool Load() {
// Build topology table.
BuildTopology();
kfd.Dismiss();
return true;
}