From 8c4d3fc62fff338d364b9444043ecb570d6eeaf5 Mon Sep 17 00:00:00 2001 From: Mythreya Date: Tue, 6 Feb 2024 23:38:53 -0800 Subject: [PATCH] Fix ToolsApiTable versioning ToolsApiTable's version was incorrectly default initialized to 0. Fixes error in commit fc889669 Change-Id: I41e9301a9c33b119ee50f6164d21ddf11dc188c4 [ROCm/ROCR-Runtime commit: 8e312471dc270a3e1d3b28ab3e5ed788001601db] --- .../runtime/hsa-runtime/core/runtime/hsa_api_trace.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/hsa_api_trace.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/hsa_api_trace.cpp index d26b1c99a5..0c3ba59a7b 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/hsa_api_trace.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/hsa_api_trace.cpp @@ -121,6 +121,7 @@ void HsaApiTable::Init() { hsa_api.finalizer_ext_ = NULL; hsa_api.image_ext_ = NULL; + UpdateTools(); hsa_api.tools_ = &tools_api; } @@ -447,6 +448,10 @@ void HsaApiTable::UpdateAmdExts() { } void HsaApiTable::UpdateTools() { + tools_api.version.major_id = HSA_TOOLS_API_TABLE_MAJOR_VERSION; + tools_api.version.minor_id = sizeof(::ToolsApiTable); + tools_api.version.step_id = HSA_TOOLS_API_TABLE_STEP_VERSION; + tools_api.hsa_amd_tool_scratch_event_alloc_start_fn = nullptr; tools_api.hsa_amd_tool_scratch_event_alloc_end_fn = nullptr; tools_api.hsa_amd_tool_scratch_event_free_start_fn = nullptr;