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 / codegen / cg_matmul_params.om

17 lines · 423 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note Refuse nonrepresentable controls before packing; no invalid input may alias a valid tile.
3fn cg_par grid ulong u ulong r ulong c ulong mutant long to ulong
4if or gt u 15 gt r 15
5ret 18446744073709551615
6end
7if gt c 15
8ret 18446744073709551615
9end
10p = or grid shl u 32
11p = or p shl r 36
12p = or p shl c 40
13if ne mutant 0
14p = or p shl ulong 1 44
15end
16ret p
17end