interplane.Get Omega
Read in your language

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

branch main Branches Tags History

CUDApp / om / graph / experts.om

74 lines · 1179 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note Prefill experts: routed and shared GEMMs are separate launches. cfg15 is routed-segment count; v60..63 are shared segment/maps.
3fn mg_exp c view ulong 16 v view ulong 64 d edit ulong 64 p ulong to ulong
4for i ulong 64
5put d i 0
6end
7if eq p 0
8put d 0 34
9ret gr_bperm c v d
10end
11if eq p 3
12put d 0 36
13ret gr_bwire c v d
14end
15if eq p 4
16put d 0 37
17ret gr_bperm c v d
18end
19if ge p 7
20if ne add get c 6 1 get c 7
21if gt get v 30 1
22if ne get c 1 0
23if eq p 7
24put d 0 39
25ret gr_bwire c v d
26end
27put d 0 255
28ret 1
29end
30end
31end
32t = sub p 7
33if eq add get c 6 1 get c 7
34t = add t sub get v 30 1
35end
36if ge t get v 30
37put d 0 255
38ret 1
39end
40put d 0 40
41put d 20 t
42ret gr_bwire c v d
43end
44put d 7 mul get v 30 sub get c 14 1
45put d 8 get c 15
46put d 10 get v 40
47put d 11 get v 44
48put d 12 get v 45
49put d 13 get v 42
50put d 14 get v 43
51put d 0 35
52if eq p 2
53put d 7 get v 30
54put d 8 1
55put d 10 get v 60
56put d 13 get v 62
57put d 14 get v 63
58end
59if ge p 5
60put d 0 38
61put d 10 get v 41
62put d 11 get v 47
63put d 12 get v 48
64put d 13 get v 43
65if eq p 6
66put d 7 get v 30
67put d 8 1
68put d 10 get v 61
69put d 13 get v 63
70put d 14 get v 63
71end
72end
73ret 1
74end