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 / moe / moe_admit_wide.om

64 lines · 1862 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note moe_admit with moe_group_wide: admits the 9-slot (256 experts) and 11-slot (512) profiles.
3note Concatenate moe_group_wide.om immediately before this unit.
4note Concatenate exact Quant/Composer/Cache/Pipeline units before this unit.
5note Trusted owner first runs pl_realcheck on immutable canonical records; no serializer here.
6note Existing session lock spans validation, selection and record pin acquisition.
7note Applicability binds router/routing/shape/layout closure. No receipt is authenticated here.
8note Return76 wrong family, Pipeline status unchanged,80+GROUP refusal.
9note Success lease uses existing kc_acquire/retire/unpin cmdlist lifecycle.
10fn mwa_clear lease edit ulong 16 to void
11for i ulong 16
12put lease i 0
13end
14end
15fn mwa_req r view ulong 16 q view ulong 64 p view ulong 528 words edit uchar 64 to long
16rq = new ulong 16 0
17for i ulong 16
18put rq i get r i
19end
20put rq 12 get q 3
21put rq 13 get p 1
22note This shape helper's admitted bit is internal; pl_pin remains mandatory before publication.
23put rq 14 1
24rc = moe_group_wide view rq words
25if ne rc 0
26ret long add rc 80
27end
28ret 0
29end
30fn mwa_family sel view ulong 16 p edit ulong 528 lease edit ulong 16 to int
31if eq get sel 2 3
32ret 0
33end
34rc = kc_unpin p get lease 1 get lease 2 get lease 3
35mwa_clear lease
36if ne rc 0
37ret 75
38end
39ret 76
40end
41fn mwa_copy src view uchar 64 dst edit uchar 64 to void
42for i ulong 64
43put dst i get src i
44end
45end
46fn moe_admit_wide r view ulong 16 q view ulong 64 a view ulong 1024 p edit ulong 528 o edit uchar 64 lease edit ulong 16 to long
47words = new uchar 64 0
48sel = new ulong 16 0
49mwa_clear lease
50rc = mwa_req r q p edit words
51if ne rc 0
52ret rc
53end
54rc = long pl_pin q a p edit sel lease
55if ne rc 0
56ret rc
57end
58rc = long mwa_family view sel p lease
59if ne rc 0
60ret rc
61end
62mwa_copy view words o
63ret 0
64end