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