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/gpu-head-to-head/blob/main/coldstart/vecadd.ptx # gpu-head-to-head aien-dev/gpu-head-to-head 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 `gpu-head-to-head / coldstart / vecadd.ptx` 51 lines ยท 1142 bytes Raw Blame History 1 // 2 // Generated by NVIDIA NVVM Compiler 3 // 4 // Compiler Build ID: CL-`36424714` 5 // Cuda compilation tools, release 13.0, V13.0.88 6 // Based on NVVM 20.0.0 7 // 8 9 .version 9.0 10 .target sm_121 11 .address_size 64 12 13 // .globl vecadd 14 15 .visible .entry vecadd( 16 .param .u64 .ptr .align 1 vecadd_param_0, 17 .param .u64 .ptr .align 1 vecadd_param_1, 18 .param .u64 .ptr .align 1 vecadd_param_2, 19 .param .u32 vecadd_param_3 20 ) 21 { 22 .reg .pred %p<2>; 23 .reg .b32 %r<6>; 24 .reg .b32 %f<4>; 25 .reg .b64 %rd<11>; 26 27 ld.param.u64 %rd1, [vecadd_param_0]; 28 ld.param.u64 %rd2, [vecadd_param_1]; 29 ld.param.u64 %rd3, [vecadd_param_2]; 30 ld.param.u32 %r2, [vecadd_param_3]; 31 mov.u32 %r3, %ctaid.x; 32 mov.u32 %r4, %ntid.x; 33 mov.u32 %r5, %tid.x; 34 mad.lo.s32 %r1, %r3, %r4, %r5; 35 setp.ge.u32 %p1, %r1, %r2; 36 @%p1 bra $L__BB0_2; 37 cvta.to.global.u64 %rd4, %rd1; 38 cvta.to.global.u64 %rd5, %rd2; 39 cvta.to.global.u64 %rd6, %rd3; 40 mul.wide.u32 %rd7, %r1, 4; 41 add.s64 %rd8, %rd4, %rd7; 42 ld.global.f32 %f1, [%rd8]; 43 add.s64 %rd9, %rd5, %rd7; 44 ld.global.f32 %f2, [%rd9]; 45 add.f32 %f3, %f1, %f2; 46 add.s64 %rd10, %rd6, %rd7; 47 st.global.f32 [%rd10], %f3; 48 $L__BB0_2: 49 ret; 50 51 }