From 4681ffc8f6661b188afedeedc67679d86c624f57 Mon Sep 17 00:00:00 2001 From: Vikram Date: Fri, 8 Mar 2024 07:21:10 -0500 Subject: [PATCH] SWDEV-448422 - Fix tests according to latest compiler changes Recent compiler patch https://github.com/llvm/llvm-project/pull/81700/ introduced changes to certain hip external symbols clang emits. This patch makes the tests "16_assembly_to_executable" and "17_llvm_ir_to_executable" follow these changes. I expect comments on whether this is an unintended compiler behaviour that needs fix in compiler or this is the proper fix. Change-Id: I3943f5365600f683a65c98c6d17c14a5e4192351 [ROCm/hip-tests commit: fba826fc3c6afc0deae298ecf0e9f7ee9901d990] --- .../16_assembly_to_executable/hip_obj_gen.mcin | 16 ++++++++++++---- .../17_llvm_ir_to_executable/hip_obj_gen.mcin | 16 ++++++++++++---- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/projects/hip-tests/samples/2_Cookbook/16_assembly_to_executable/hip_obj_gen.mcin b/projects/hip-tests/samples/2_Cookbook/16_assembly_to_executable/hip_obj_gen.mcin index 4551e5a1c4..8153784242 100644 --- a/projects/hip-tests/samples/2_Cookbook/16_assembly_to_executable/hip_obj_gen.mcin +++ b/projects/hip-tests/samples/2_Cookbook/16_assembly_to_executable/hip_obj_gen.mcin @@ -12,9 +12,17 @@ # # Note: log 2 of 4096 is 12. # - .type __hip_fatbin,@object - .section .hip_fatbin,"a",@progbits - .globl __hip_fatbin + .protected __hip_gpubin_handle_ + .type __hip_gpubin_handle_,@object + .section .hip_gpubin_handle,"aw" + .globl __hip_gpubin_handle_ .p2align 12 -__hip_fatbin: +__hip_gpubin_handle_: + .zero 8 + + .type __hip_fatbin_,@object + .section .hip_fatbin,"a",@progbits + .globl __hip_fatbin_ + .p2align 12 +__hip_fatbin_: .incbin "offload_bundle.hipfb" diff --git a/projects/hip-tests/samples/2_Cookbook/17_llvm_ir_to_executable/hip_obj_gen.mcin b/projects/hip-tests/samples/2_Cookbook/17_llvm_ir_to_executable/hip_obj_gen.mcin index 4551e5a1c4..8153784242 100644 --- a/projects/hip-tests/samples/2_Cookbook/17_llvm_ir_to_executable/hip_obj_gen.mcin +++ b/projects/hip-tests/samples/2_Cookbook/17_llvm_ir_to_executable/hip_obj_gen.mcin @@ -12,9 +12,17 @@ # # Note: log 2 of 4096 is 12. # - .type __hip_fatbin,@object - .section .hip_fatbin,"a",@progbits - .globl __hip_fatbin + .protected __hip_gpubin_handle_ + .type __hip_gpubin_handle_,@object + .section .hip_gpubin_handle,"aw" + .globl __hip_gpubin_handle_ .p2align 12 -__hip_fatbin: +__hip_gpubin_handle_: + .zero 8 + + .type __hip_fatbin_,@object + .section .hip_fatbin,"a",@progbits + .globl __hip_fatbin_ + .p2align 12 +__hip_fatbin_: .incbin "offload_bundle.hipfb"