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
92 lines
2.8 KiB
ArmAsm
92 lines
2.8 KiB
ArmAsm
// COM: A `global_prefetch_b8 v0, s[0:1] scope:SCOPE_SE; v_nop` prologue (llvm/llvm-project#208467) already carries
|
|
// COM: the workaround, so HotSwap skips its entry trampoline; a kernel without
|
|
// COM: it still gets one.
|
|
|
|
// RUN: %clang -target amdgcn-amd-amdhsa -mcpu=gfx1250 -nostdlib %s -o %t.elf
|
|
|
|
// RUN: hotswap-rewrite %t.elf \
|
|
// RUN: amdgcn-amd-amdhsa--gfx1250 amdgcn-amd-amdhsa--gfx1250 \
|
|
// RUN: --entry-trampolines --output %t.out.elf \
|
|
// RUN: | %FileCheck --check-prefix=API %s
|
|
// API: RESULT: SUCCESS
|
|
|
|
// COM: Direct displacement creates no appended-stub symbols.
|
|
// RUN: %llvm-readelf -s %t.out.elf | %FileCheck --check-prefix=SYMS %s
|
|
// SYMS-NOT: plain_kernel.stub
|
|
|
|
// RUN: %llvm-readelf -s %t.out.elf | %FileCheck --check-prefix=NO-WA-STUB %s
|
|
// NO-WA-STUB-NOT: precompiled_wa_kernel.stub
|
|
|
|
// COM: The pre-fixed kernel keeps its in-place workaround, not a redirect stub.
|
|
// RUN: %llvm-objdump -d %t.out.elf | %FileCheck --check-prefix=DISASM %s
|
|
// DISASM-LABEL: <precompiled_wa_kernel>:
|
|
// DISASM-NEXT: global_prefetch_b8 v0, s[0:1] scope:SCOPE_SE
|
|
// DISASM-NEXT: v_nop
|
|
// DISASM-NEXT: s_endpgm
|
|
// DISASM-LABEL: <plain_kernel>:
|
|
// DISASM-NEXT: global_prefetch_b8 v0, s[0:1] scope:SCOPE_SE
|
|
// DISASM-NEXT: v_nop
|
|
// DISASM-NEXT: s_setreg_imm32_b32
|
|
|
|
.amdgcn_target "amdgcn-amd-amdhsa--gfx1250"
|
|
.text
|
|
// Prologue already carries the workaround: expect no trampoline.
|
|
.globl precompiled_wa_kernel
|
|
.p2align 8
|
|
.type precompiled_wa_kernel,@function
|
|
precompiled_wa_kernel:
|
|
global_prefetch_b8 v0, s[0:1] scope:SCOPE_SE
|
|
v_nop
|
|
s_endpgm
|
|
.Lprecompiled_wa_kernel_end:
|
|
.size precompiled_wa_kernel, .Lprecompiled_wa_kernel_end-precompiled_wa_kernel
|
|
|
|
// No workaround: expect a trampoline.
|
|
.globl plain_kernel
|
|
.p2align 8
|
|
.type plain_kernel,@function
|
|
plain_kernel:
|
|
s_setreg_imm32_b32 hwreg(HW_REG_WAVE_SCHED_MODE, 0, 2), 2
|
|
s_endpgm
|
|
.Lplain_kernel_end:
|
|
.size plain_kernel, .Lplain_kernel_end-plain_kernel
|
|
|
|
.rodata
|
|
.p2align 8
|
|
.amdhsa_kernel precompiled_wa_kernel
|
|
.amdhsa_next_free_vgpr 1
|
|
.amdhsa_next_free_sgpr 1
|
|
.end_amdhsa_kernel
|
|
|
|
.amdhsa_kernel plain_kernel
|
|
.amdhsa_next_free_vgpr 1
|
|
.amdhsa_next_free_sgpr 1
|
|
.end_amdhsa_kernel
|
|
|
|
.amdgpu_metadata
|
|
amdhsa.version:
|
|
- 3
|
|
- 0
|
|
amdhsa.kernels:
|
|
- .name: precompiled_wa_kernel
|
|
.symbol: precompiled_wa_kernel.kd
|
|
.sgpr_count: 8
|
|
.vgpr_count: 1
|
|
.kernarg_segment_size: 0
|
|
.group_segment_fixed_size: 0
|
|
.private_segment_fixed_size: 0
|
|
.kernarg_segment_align: 8
|
|
.wavefront_size: 64
|
|
.max_flat_workgroup_size: 256
|
|
- .name: plain_kernel
|
|
.symbol: plain_kernel.kd
|
|
.sgpr_count: 8
|
|
.vgpr_count: 1
|
|
.kernarg_segment_size: 0
|
|
.group_segment_fixed_size: 0
|
|
.private_segment_fixed_size: 0
|
|
.kernarg_segment_align: 8
|
|
.wavefront_size: 64
|
|
.max_flat_workgroup_size: 256
|
|
.end_amdgpu_metadata
|