CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
127 lines
3.5 KiB
ArmAsm
127 lines
3.5 KiB
ArmAsm
// RUN: llvm-mc -triple=amdgcn-amd-amdhsa -mcpu=gfx900 -filetype=asm %s | FileCheck --check-prefix=ASM %s
|
|
// RUN: llvm-mc -triple=amdgcn-amd-amdhsa -mcpu=gfx900 -filetype=obj %s | llvm-readobj -r --sections --section-data --string-dump=.amdgpu.strtab - | FileCheck --check-prefix=OBJ %s
|
|
|
|
// Test that .amdgpu_info directives round-trip through the assembler (asm and
|
|
// object emission) and produce the correct TLV-encoded .amdgpu.info section.
|
|
|
|
.text
|
|
.globl my_kernel
|
|
.p2align 8
|
|
.type my_kernel,@function
|
|
my_kernel:
|
|
s_endpgm
|
|
.Lfunc_end0:
|
|
.size my_kernel, .Lfunc_end0-my_kernel
|
|
|
|
.globl helper
|
|
.p2align 2
|
|
.type helper,@function
|
|
helper:
|
|
s_setpc_b64 s[30:31]
|
|
.Lfunc_end1:
|
|
.size helper, .Lfunc_end1-helper
|
|
|
|
.globl addr_taken_func
|
|
.p2align 2
|
|
.type addr_taken_func,@function
|
|
addr_taken_func:
|
|
s_setpc_b64 s[30:31]
|
|
.Lfunc_end2:
|
|
.size addr_taken_func, .Lfunc_end2-addr_taken_func
|
|
|
|
.globl extern_func
|
|
|
|
// COM: Kernel: flags=7 (KERNEL|VCC|FLAT_SCRATCH), resources, call edge, use
|
|
// COM: edge, indirect call, and type ID. Non-zero AGPR to verify conditional
|
|
// COM: emission.
|
|
.amdgpu_info my_kernel
|
|
.amdgpu_flags 7
|
|
.amdgpu_num_sgpr 33
|
|
.amdgpu_num_vgpr 32
|
|
.amdgpu_num_agpr 4
|
|
.amdgpu_private_segment_size 0
|
|
.amdgpu_use lds_var
|
|
.amdgpu_call helper
|
|
.amdgpu_indirect_call "vi"
|
|
.end_amdgpu_info
|
|
|
|
// COM: Device function: flags=2 (VCC), call edge to external. Zero AGPR values
|
|
// COM: are omitted from the input; the parser defaults them to 0 and the
|
|
// COM: emitter skips them.
|
|
.amdgpu_info helper
|
|
.amdgpu_flags 2
|
|
.amdgpu_num_sgpr 8
|
|
.amdgpu_num_vgpr 10
|
|
.amdgpu_private_segment_size 16
|
|
.amdgpu_call extern_func
|
|
.end_amdgpu_info
|
|
|
|
// Address-taken function with type ID. Zero AGPR omitted.
|
|
.amdgpu_info addr_taken_func
|
|
.amdgpu_flags 0
|
|
.amdgpu_num_sgpr 2
|
|
.amdgpu_num_vgpr 4
|
|
.amdgpu_private_segment_size 0
|
|
.amdgpu_typeid "vi"
|
|
.end_amdgpu_info
|
|
|
|
// ASM: .amdgpu_info my_kernel
|
|
// ASM: .amdgpu_flags 7
|
|
// ASM: .amdgpu_num_sgpr 33
|
|
// ASM: .amdgpu_num_vgpr 32
|
|
// ASM: .amdgpu_num_agpr 4
|
|
// ASM: .amdgpu_private_segment_size 0
|
|
// ASM: .amdgpu_use lds_var
|
|
// ASM: .amdgpu_call helper
|
|
// ASM: .amdgpu_indirect_call "vi"
|
|
// ASM: .end_amdgpu_info
|
|
|
|
// ASM: .amdgpu_info helper
|
|
// ASM: .amdgpu_flags 2
|
|
// ASM: .amdgpu_num_sgpr 8
|
|
// ASM: .amdgpu_num_vgpr 10
|
|
// ASM-NOT: .amdgpu_num_agpr
|
|
// ASM: .amdgpu_private_segment_size 16
|
|
// ASM: .amdgpu_call extern_func
|
|
// ASM: .end_amdgpu_info
|
|
|
|
// ASM: .amdgpu_info addr_taken_func
|
|
// ASM: .amdgpu_flags 0
|
|
// ASM: .amdgpu_num_sgpr 2
|
|
// ASM: .amdgpu_num_vgpr 4
|
|
// ASM-NOT: .amdgpu_num_agpr
|
|
// ASM: .amdgpu_private_segment_size 0
|
|
// ASM: .amdgpu_typeid "vi"
|
|
// ASM: .end_amdgpu_info
|
|
|
|
// OBJ: Section {
|
|
// OBJ: Name: .amdgpu.info
|
|
// OBJ: Type: SHT_PROGBITS
|
|
// OBJ: Flags [
|
|
// OBJ: SHF_EXCLUDE
|
|
// OBJ: ]
|
|
// OBJ: }
|
|
|
|
// The string pool backs INFO_INDIRECT_CALL / INFO_TYPEID payloads. It is an
|
|
// ELF-convention SHT_STRTAB with a leading null byte at offset 0 and string
|
|
// deduplication -- both directives above reference the same "vi" TypeID, so
|
|
// it must appear exactly once starting at offset 1.
|
|
// OBJ: Section {
|
|
// OBJ: Name: .amdgpu.strtab
|
|
// OBJ: Type: SHT_STRTAB
|
|
// OBJ: Flags [
|
|
// OBJ: SHF_EXCLUDE
|
|
// OBJ: ]
|
|
// OBJ: }
|
|
|
|
// Relocations in .amdgpu.info should reference defined and external symbols.
|
|
// OBJ-DAG: R_AMDGPU_ABS64 my_kernel
|
|
// OBJ-DAG: R_AMDGPU_ABS64 helper
|
|
// OBJ-DAG: R_AMDGPU_ABS64 addr_taken_func
|
|
// OBJ-DAG: R_AMDGPU_ABS64 extern_func
|
|
// OBJ-DAG: R_AMDGPU_ABS64 lds_var
|
|
|
|
// OBJ: String dump of section '.amdgpu.strtab':
|
|
// OBJ-NEXT: [{{ +}}1] vi
|
|
// OBJ-NOT: ] vi
|