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 / pipeline / seal_reuse.om

54 lines · 1315 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note Private command-list memo. Zero-initialized cache is owned by the caller under the session lock.
3note No authority is cached: exact normalized bytes must match before their prior SHA256 is reused.
4note Cache0 valid,1 argument count,32..63 digest,64..1855 normalized image. Other cells unused.
5note Ownership, epoch, revision, admission, and submit-time intent checks still run separately.
6fn native_mcreseal bank view uchar 1024 qmd view uchar 1024 n ulong cache edit uchar 2048 out edit uchar 32 to long
7mc_clear edit out
8if or eq n 0 gt n 32
9ret -1
10end
11b = new uchar 16384 0
12off = add ulong 896 mul n 4
13for i ulong off
14put b i get bank i
15end
16for i ulong 384
17v = get qmd i
18if or and ge i 40 lt i 44 and ge i 48 lt i 52
19v = 0
20end
21put b add off i v
22end
23off = add off 384
24for i ulong 384
25put b add off i get qmd add 512 i
26end
27size = add off 384
28same = and eq get cache 0 1 eq ulong get cache 1 n
29for i ulong size
30if ne get b i get cache add 64 i
31same = false
32end
33end
34if same
35for i ulong 32
36put out i get cache add 32 i
37end
38ret 0
39end
40put cache 0 0
41if ne kc_codesha b size edit out 0
42mc_clear edit out
43ret -1
44end
45for i ulong size
46put cache add 64 i get b i
47end
48for i ulong 32
49put cache add 32 i get out i
50end
51put cache 1 uchar n
52put cache 0 1
53ret 0
54end