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 / api / attn_args.om

22 lines · 506 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note Attention-family launch records: address pairs followed by scalar words.
3fn av_pack p view ulong 32 a edit uint 32 na ulong nw ulong to ulong
4if or gt na 16 or gt nw 32 gt mul na 2 nw
5ret 1
6end
7for i ulong 32
8put a i uint 0
9end
10for i ulong na
11v = get p i
12put a mul i 2 uint and v 4294967295
13put a add mul i 2 1 uint shr v 32
14end
15for i ulong sub nw mul na 2
16v = get p add na i
17v = and v 4294967295
18put a add mul na 2 i uint v
19end
20ret 0
21end
22