Skip to content

Commit

Permalink
Fix examples according to latest compiler changes (#144)
Browse files Browse the repository at this point in the history
Addresses internal ticket - SWDEV-468634 

Co-authored-by: Jaydeep Patel <jaydeepkumar.patel@amd.com>
  • Loading branch information
dgaliffiAMD and jaydeeppatel1111 authored Jul 19, 2024
1 parent 91943eb commit 7d558fa
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 20 deletions.
24 changes: 14 additions & 10 deletions HIP-Basic/assembly_to_executable/hip_obj_gen.mcin
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@
# Input: Bundled Object file .hipfb file
# Output: Host Bundled Object File .o

.type __hip_fatbin,@object
# Tell the assembler to place the offload bundle in the appropriate section.
.section .hip_fatbin,"a",@progbits
# Make the symbol that addresses the binary public.
.globl __hip_fatbin
# Give the bundle the required alignment of 4096 (2 ^ 12).
.p2align 12
__hip_fatbin:
# Include the offload bundle.
.incbin "offload_bundle.hipfb"
.protected __hip_gpubin_handle_
.type __hip_gpubin_handle_,@object
.section .hip_gpubin_handle,"aw"
.globl __hip_gpubin_handle_
.p2align 12
__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"
24 changes: 14 additions & 10 deletions HIP-Basic/llvm_ir_to_executable/hip_obj_gen.mcin
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@
# Input: Bundled Object file .hipfb file
# Output: Host Bundled Object File .o

.type __hip_fatbin,@object
# Tell the assembler to place the offload bundle in the appropriate section.
.section .hip_fatbin,"a",@progbits
# Make the symbol that addresses the binary public.
.globl __hip_fatbin
# Give the bundle the required alignment of 4096 (2 ^ 12).
.p2align 12
__hip_fatbin:
# Include the offload bundle.
.incbin "offload_bundle.hipfb"
.protected __hip_gpubin_handle_
.type __hip_gpubin_handle_,@object
.section .hip_gpubin_handle,"aw"
.globl __hip_gpubin_handle_
.p2align 12
__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"

0 comments on commit 7d558fa

Please sign in to comment.