diff --git a/runtime/hsa-runtime/libamdhsacode/amd_core_dump.cpp b/runtime/hsa-runtime/libamdhsacode/amd_core_dump.cpp index 079da9438f..8f3700bf70 100644 --- a/runtime/hsa-runtime/libamdhsacode/amd_core_dump.cpp +++ b/runtime/hsa-runtime/libamdhsacode/amd_core_dump.cpp @@ -127,6 +127,7 @@ struct NoteSegmentBuilder : public SegmentBuilder { std::unique_ptr runtime_info(runtime_ptr, std::free); if (HSAKMT_CALL(hsaKmtGetVersion(&versionInfo))) { + HSAKMT_CALL(hsaKmtDbgDisable()); fprintf(stderr, "Failed to fetch driver ABI version.\n"); return HSA_STATUS_ERROR; } @@ -140,6 +141,7 @@ struct NoteSegmentBuilder : public SegmentBuilder { note_package_builder_.Write(runtime_size); if (HSAKMT_CALL(hsaKmtDbgGetDeviceData(&agents_ptr, &n_entries, &entry_size))) { + HSAKMT_CALL(hsaKmtDbgDisable()); fprintf(stderr, "Failed to fetch agents snapshot.\n"); return HSA_STATUS_ERROR; } @@ -151,6 +153,7 @@ struct NoteSegmentBuilder : public SegmentBuilder { note_package_builder_.Write(entry_size); if (HSAKMT_CALL(hsaKmtDbgGetQueueData(&queues_ptr, &n_entries, &entry_size, true))) { + HSAKMT_CALL(hsaKmtDbgDisable()); fprintf(stderr, "Failed to fetch queues snapshot.\n"); return HSA_STATUS_ERROR; }