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 / src / omega_ampere_codegen.h

22 lines · 1080 bytes Raw Blame History
1/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */
2#ifndef OMEGA_AMPERE_CODEGEN_H
3#define OMEGA_AMPERE_CODEGEN_H
4#include "omega_blackwell_codegen.h"
5#ifdef __cplusplus
6extern "C" {
7#endif
8/* Explicit target; never guesses from the host or a GPU. 121 preserves the existing
9 * encoder. 86 lowers solved IR to Ampere, including parameter-bank offsets.
10 * Native FP8 QMMA, E4M3 PACK, and every opcode past MUFU.LG2 are refused.
11 * Those opcodes are the training R5 entries (SHFL.BFLY, F2FP.BF16.F32.PACK_AB,
12 * ATOMG.E.ADD.F32.STRONG.SYS, ATOMG.E.ADD.F32.STRONG.GPU): SM86 has no instruction
13 * for them (om/encoder/ampere_enc_sm86.om, valid: op > 59).
14 * 0 success, -1 invalid arguments/capacity, -2 unsupported target/IR/native trap.
15 * Refusal writes no code bytes and sets *out_len=0. No driver access occurs. */
16#define OMEGA_GPU_ENCODE_UNSUPPORTED (-2)
17int omega_gpu_encode_program_target(const BlackwellIRProgram *prog, uint32_t target_sm,
18 uint8_t *code_buf, size_t max_len, size_t *out_len);
19#ifdef __cplusplus
20}
21#endif
22#endif