From 816b46868a21b8bd45209fc88849d3aa39fe8cb0 Mon Sep 17 00:00:00 2001 From: Alex Sierra Date: Mon, 18 Dec 2023 17:29:27 -0600 Subject: [PATCH] Revert "core dump: Generates a core dump from a fault event" This reverts commit 9aa39b0979c324fed8db751c0ce80fa68a630b5c. This commit disables core dump feature. Apparently, gfx1101 SA1 waves can not enter the trap handler because they receive an invalid address. However, core dump at the debugger has been moved to rocm 6.2. Signed-off-by: Alex Sierra Change-Id: I7915caf58118658e5e7f435f91a0a6216d2fdb42 [ROCm/ROCR-Runtime commit: 5e3be9c28a0bd731080919c9b773416fe3ab5335] --- .../hsa-runtime/core/runtime/amd_aql_queue.cpp | 12 ------------ .../runtime/hsa-runtime/core/runtime/runtime.cpp | 8 -------- 2 files changed, 20 deletions(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_aql_queue.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_aql_queue.cpp index fa9fc19df0..211535ab10 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_aql_queue.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_aql_queue.cpp @@ -67,7 +67,6 @@ #include "core/inc/default_signal.h" #include "core/inc/hsa_ext_amd_impl.h" #include "core/inc/amd_gpu_pm4.h" -#include "core/inc/amd_core_dump.hpp" namespace rocr { namespace AMD { @@ -1232,17 +1231,6 @@ bool AqlQueue::ExceptionHandler(hsa_signal_value_t error_code, void* arg) { return false; } - // Fallback if KFD does not support GPU core dump. In this case, there core dump is - // generated by hsa-runtime. - if (!core::Runtime::runtime_singleton_->KfdVersion().supports_core_dump) { - if (amd::coredump::dump_gpu_core()) - debug_print("GPU core dump failed\n"); - // supports_core_dump flag is overwritten to avoid generate core dump file again - // caught by a different exception handler. Such as VMFaultHandler. - core::Runtime::runtime_singleton_->KfdVersion( - core::Runtime::runtime_singleton_->KfdVersion().supports_exception_debugging, true); - } - for (auto& error : QueueErrors) { if (error_code & (1 << (error.code - 1))) { errorCode = error.status; diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp index 23bf7332e7..61eabbd8e1 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp @@ -70,7 +70,6 @@ #include "core/util/os.h" #include "core/inc/exceptions.h" #include "inc/hsa_ven_amd_aqlprofile.h" -#include "core/inc/amd_core_dump.hpp" #ifndef HSA_VERSION_MAJOR #define HSA_VERSION_MAJOR 1 @@ -1367,13 +1366,6 @@ bool Runtime::VMFaultHandler(hsa_signal_value_t val, void* arg) { HsaMemoryAccessFault& fault = vm_fault_event->EventData.EventData.MemoryAccessFault; - // Fallback if KFD does not support GPU core dump. In this case, there core dump is - // generated by hsa-runtime. - if (!runtime_singleton_->KfdVersion().supports_core_dump) { - if (amd::coredump::dump_gpu_core()) - debug_print("GPU core dump failed\n"); - } - hsa_status_t custom_handler_status = HSA_STATUS_ERROR; auto system_event_handlers = runtime_singleton_->GetSystemEventHandlers(); // If custom handler is registered, pack the fault info and call the handler