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 / dnn-activations / plan.om

22 lines · 437 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note Plan words: input bytes, output bytes, CTA count, threads, reserved zero.
3fn da_plan n ulong op ulong dtype ulong p edit ulong 8 to ulong
4for i ulong 8
5put p i 0
6end
7if or eq n 0 gt n 4294967295
8ret 1
9end
10if or gt op 3 gt dtype 2
11ret 1
12end
13bytes = ulong 4
14if ne dtype 0
15bytes = ulong 2
16end
17put p 0 mul n bytes
18put p 1 mul n 4
19put p 2 div add n 31 32
20put p 3 32
21ret 0
22end