rocr: skip exception_signal_ handling on exit

if .supports_exception_debugging is not enabled.

Change-Id: I944fe7aa4f3068964f47e23f5259c3802d1e9556
Signed-off-by: Flora Cui <flora.cui@amd.com>


[ROCm/ROCR-Runtime commit: ac64c54d74]
Этот коммит содержится в:
Flora Cui
2024-08-28 17:56:01 +08:00
коммит произвёл Flora Cui
родитель 6c592fa29e
Коммит 6a3d0e6412
+8 -6
Просмотреть файл
@@ -363,13 +363,15 @@ AqlQueue::~AqlQueue() {
}
// Remove kfd exception handler
exceptionState |= ERROR_HANDLER_TERMINATE;
while ((exceptionState & ERROR_HANDLER_DONE) != ERROR_HANDLER_DONE) {
const uint64_t timeout_ms = 5000;
if (core::Runtime::runtime_singleton_->KfdVersion().supports_exception_debugging) {
exceptionState |= ERROR_HANDLER_TERMINATE;
while ((exceptionState & ERROR_HANDLER_DONE) != ERROR_HANDLER_DONE) {
const uint64_t timeout_ms = 5000;
exception_signal_->StoreRelease(-1ull);
exception_signal_->WaitRelaxed(HSA_SIGNAL_CONDITION_NE, -1ull, timeout_ms,
HSA_WAIT_STATE_BLOCKED);
exception_signal_->StoreRelease(-1ull);
exception_signal_->WaitRelaxed(HSA_SIGNAL_CONDITION_NE, -1ull, timeout_ms,
HSA_WAIT_STATE_BLOCKED);
}
}
Inactivate();