From 5c98daeb8e730a248857393cf82c06b54f8a2d94 Mon Sep 17 00:00:00 2001 From: Andrew Woloszyn Date: Mon, 4 Nov 2024 11:10:11 -0500 Subject: [PATCH] Re-add the change from #18997 Signed-off-by: Andrew Woloszyn --- .../iree/hal/drivers/hip/native_executable.c | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/runtime/src/iree/hal/drivers/hip/native_executable.c b/runtime/src/iree/hal/drivers/hip/native_executable.c index e9d3d2be53e32..a303134debdc8 100644 --- a/runtime/src/iree/hal/drivers/hip/native_executable.c +++ b/runtime/src/iree/hal/drivers/hip/native_executable.c @@ -316,10 +316,8 @@ iree_status_t iree_hal_hip_native_executable_create( (export_count * sizeof(ned->exports[0]))); ned->export_count = export_count; IREE_TRACE( - iree_hal_debug_export_info_t* export_infos = - (iree_hal_debug_export_info_t*)((uint8_t*)ned->modules + - module_count * - sizeof(ned->modules[0]))); + uint8_t* export_info_ptr = + ((uint8_t*)ned->modules + module_count * sizeof(ned->modules[0]))); // Publish any embedded source files to the tracing infrastructure. iree_hal_debug_publish_source_files( @@ -424,14 +422,14 @@ iree_status_t iree_hal_hip_native_executable_create( iree_hal_hip_BindingBits_vec_len(binding_flags_vec); IREE_TRACE({ - iree_hal_debug_copy_export_info( - iree_hal_hip_ExportDef_debug_info_get(export_def), - &export_infos[i]); - kernel_info->debug_info.function_name = - export_infos[i].function_name; + iree_hal_debug_export_info_t* export_info = + (iree_hal_debug_export_info_t*)export_info_ptr; + export_info_ptr += iree_hal_debug_copy_export_info( + iree_hal_hip_ExportDef_debug_info_get(export_def), export_info); + kernel_info->debug_info.function_name = export_info->function_name; kernel_info->debug_info.source_filename = - export_infos[i].source_filename; - kernel_info->debug_info.source_line = export_infos[i].source_line; + export_info->source_filename; + kernel_info->debug_info.source_line = export_info->source_line; }); } }