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
CUDApp / om / codegen / cg_matmul_params.om
| 1 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 2 | note Refuse nonrepresentable controls before packing; no invalid input may alias a valid tile. |
| 3 | fn cg_par grid ulong u ulong r ulong c ulong mutant long to ulong |
| 4 | if or gt u 15 gt r 15 |
| 5 | ret 18446744073709551615 |
| 6 | end |
| 7 | if gt c 15 |
| 8 | ret 18446744073709551615 |
| 9 | end |
| 10 | p = or grid shl u 32 |
| 11 | p = or p shl r 36 |
| 12 | p = or p shl c 40 |
| 13 | if ne mutant 0 |
| 14 | p = or p shl ulong 1 44 |
| 15 | end |
| 16 | ret p |
| 17 | end |