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 / tools / tilelab_replay.om

87 lines · 1415 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note Concatenate after tools/tilelab_process.om. Usage: DRIVER OUTPUT_PREFIX SHAPES ROUNDS [CFG...]
3note Current replay, not a historical evidence script. Device driver requires operator GPU authorization.
4text trwords "--shapes\n--rounds\n--out\n--cfg\n"
5text trpass "TILELAB_REPLAY PASS\n"
6fn tr_output group ulong to void
7tl_arg 2
8p = get tn 0
9if gt p 4070
10exit 90
11end
12put tb p 46
13p = add p 1
14start = p
15v = group
16while true bound 20
17put tb p uchar add rem v 10 48
18p = add p 1
19v = div v 10
20if eq v 0
21break
22end
23end
24last = sub p 1
25while lt start last bound 20
26x = get tb start
27put tb start get tb last
28put tb last x
29start = add start 1
30last = sub last 1
31end
32put tb p 46
33put tb add p 1 106
34put tb add p 2 115
35put tb add p 3 111
36put tb add p 4 110
37put tn 0 add p 5
38end
39fn main to int
40if lt argcnt 5
41ret 90
42end
43for i ulong len trwords
44put tw i get trwords i
45end
46idx = ulong 5
47group = ulong 0
48while true bound 999999
49tl_clear
50tl_arg 1
51tl_add
52tl_word 0
53tl_add
54tl_arg 3
55tl_add
56tl_word 1
57tl_add
58tl_arg 4
59tl_add
60tl_word 2
61tl_add
62tr_output group
63tl_add
64count = ulong 0
65while and lt idx ulong argcnt lt count 15 bound 15
66tl_word 3
67tl_add
68tl_arg idx
69tl_add
70idx = add idx 1
71count = add count 1
72end
73rc = tl_run
74if ne rc 0
75ret rc
76end
77group = add group 1
78if ge idx ulong argcnt
79break
80end
81end
82r = write 1 trpass 0 len trpass
83if ne r long len trpass
84ret 93
85end
86ret 0
87end