Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/CUDApp/blob/main/backend/amd/vadd-gfx1151.s # CUDApp CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `CUDApp / backend / amd / vadd-gfx1151.s` 68 lines · 2336 bytes Raw Blame History 1 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 // vadd-gfx1151.s: ORACLE fixture, not a first-party emitter. FP32 c[gid] = a[gid] + b[gid], gid < n, 3 // assembled by LLVM 18.1.3 llvm-mc and linked by ld.lld 18.1.3 (tests/multitarget/run.sh) to give 4 // backend/targets.om's AMDGPU_HSACO loader a real code object to validate and refuse. The first-party 5 // path is an Omega gfx11 encoder from the AMD RDNA3.5 ISA guide (docs/ARCHITECTURE.md: LLVM is a 6 // verification oracle only). Hardware NOT_RUN: no AMD GPU on this host. 7 // Kernarg layout: a @0, b @8, c @16 (global float pointers), count @24 (uint; "n" alone would parse as YAML false); 64 work-items per group. 8 .amdgcn_target "amdgcn-amd-amdhsa--gfx1151" 9 .text 10 .globl vadd 11 .p2align 8 12 .type vadd,@function 13 vadd: 14 s_load_b128 s[4:7], s[0:1], 0x0 15 s_load_b64 s[8:9], s[0:1], 0x10 16 s_load_b32 s10, s[0:1], 0x18 17 v_and_b32 v0, 0x3ff, v0 18 s_lshl_b32 s11, s2, 6 19 v_add_nc_u32 v1, s11, v0 20 s_waitcnt lgkmcnt(0) 21 v_cmp_gt_u32 vcc_lo, s10, v1 22 s_and_saveexec_b32 s12, vcc_lo 23 s_cbranch_execz .Lend 24 v_lshlrev_b32 v2, 2, v1 25 global_load_b32 v3, v2, s[4:5] 26 global_load_b32 v4, v2, s[6:7] 27 s_waitcnt vmcnt(0) 28 v_add_f32 v3, v3, v4 29 global_store_b32 v2, v3, s[8:9] 30 .Lend: 31 s_endpgm 32 .Lvadd_end: 33 .size vadd, .Lvadd_end-vadd 34 35 .rodata 36 .p2align 6 37 .amdhsa_kernel vadd 38 .amdhsa_user_sgpr_kernarg_segment_ptr 1 39 .amdhsa_system_sgpr_workgroup_id_x 1 40 .amdhsa_system_vgpr_workitem_id 0 41 .amdhsa_kernarg_size 28 42 .amdhsa_next_free_vgpr 5 43 .amdhsa_next_free_sgpr 13 44 .amdhsa_wavefront_size32 1 45 .end_amdhsa_kernel 46 47 .amdgpu_metadata 48 --- 49 amdhsa.version: [ 1, 2 ] 50 amdhsa.target: amdgcn-amd-amdhsa--gfx1151 51 amdhsa.kernels: 52 - .name: vadd 53 .symbol: vadd.kd 54 .kernarg_segment_size: 28 55 .kernarg_segment_align: 8 56 .group_segment_fixed_size: 0 57 .private_segment_fixed_size: 0 58 .wavefront_size: 32 59 .sgpr_count: 13 60 .vgpr_count: 5 61 .max_flat_workgroup_size: 64 62 .args: 63 - { .name: a, .offset: 0, .size: 8, .value_kind: global_buffer, .address_space: global } 64 - { .name: b, .offset: 8, .size: 8, .value_kind: global_buffer, .address_space: global } 65 - { .name: c, .offset: 16, .size: 8, .value_kind: global_buffer, .address_space: global } 66 - { .name: count, .offset: 24, .size: 4, .value_kind: by_value } 67 ... 68 .end_amdgpu_metadata