interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / seed / ng / tests / ir / a-kernel.oir

45 lines · 1050 bytes Raw Blame History
1omegair 1
2type %t32 = array f32 256
3type %t33 = ref edit shared %t32
4type %t34 = array f16 256
5type %t35 = ref edit shared %t34
6type %t36 = frag a 16 8 16 f16
7type %t37 = frag b 16 8 16 f16
8type %t38 = frag c 16 8 16 f32
9type %t39 = vec f32 4
10kernel @f0 flags 0 threads 256 1 1 subgroup 32 %1:u32 -> void
11block ^0
12%2 = shared %t33
13%3 = shared %t35
14%4 = gpu.id u32 0
15%5 = conv u64 0 %4
16%6 = const u64 1
17%7 = chk.bounds 3 %0 %2 %5 %6
18%8 = conv f32 0 %1
19%9 = store %7 %2 %5 %8
20%10 = sync %9
21%11 = load f32 %10 %2 %5
22%12 = const u32 16
23%13 = shfl f32 1 %11 %12
24%14 = const u64 0
25%15 = const u64 16
26%16 = const u64 256
27%17 = chk.bounds 3 %10 %3 %14 %16
28%18 = mmald %t36 0 %17 %3 %14 %15 %16
29%19 = mmald %t37 0 %17 %3 %14 %15 %16
30%20 = chk.bounds 3 %17 %2 %14 %16
31%21 = mmald %t38 0 %20 %2 %14 %15 %16
32%22 = mma %t38 0 %18 %19 %21
33%23 = mmast 0 %20 %2 %14 %15 %16 %22
34%24 = add f32 %13 %11
35%25 = vsplat %t39 %24
36ret %23
37end
38export @f1 flags 0 -> i32
39block ^0
40%1 = const u32 1
41%2 = const u32 7
42%3 = launch %0 @f0 %1 %1 %1 %2
43%4 = const i32 0
44retv %3 %4
45end