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_gpu_dnn_rows_api.h

34 lines · 1552 bytes Raw Blame History
1/* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */
2#ifndef OMEGA_GPU_DNN_ROWS_API_H
3#define OMEGA_GPU_DNN_ROWS_API_H
4#include <stddef.h>
5#include <stdint.h>
6#include "omega_gpu_dnn_types.h"
7#include "omega_blackwell_codegen.h"
8#ifdef __cplusplus
9extern "C" {
10#endif
11#define OMEGA_GPU_DNN_SOFTMAX 0u
12#define OMEGA_GPU_DNN_LAYERNORM 1u
13#define OMEGA_GPU_DNN_RMSNORM 2u
14#define OMEGA_GPU_DNN_ROWS_OK 0
15#define OMEGA_GPU_DNN_ROWS_REFUSED 1
16#define OMEGA_GPU_DNN_ROWS_BAD_ARGS 2
17#define OMEGA_GPU_DNN_ROWS_CODEGEN 3
18#define OMEGA_GPU_DNN_ROWS_CHIP 4
19/* Contiguous [rows][length], input dtype from omega_gpu_dnn_types.h.
20 * f32 accumulation/output. Pure normalization, no affine transformation.
21 * rows,length 1..65535, at most 1073741824 elements.
22 * Norm epsilon must be positive finite normal f32. Softmax ignores epsilon.
23 * Finite inputs and finite f32 intermediate differences, sums, squares,
24 * variance+epsilon and final output are caller preconditions. Experimental;
25 * host/simulator evidence is not chip qualification. */
26typedef struct { uint32_t rows, length, dtype, op; float epsilon; } OmegaGpuDnnRowsShape;
27int omega_gpu_dnn_rows_codegen(const OmegaGpuDnnRowsShape *shape, BlackwellIRProgram *program, uint8_t *code, size_t capacity, OmegaBlackwellKernel *kernel);
28/* Operator-exclusive GPU window required. Shape/type/size/epsilon refusal
29 * occurs in seeded Omega before any session/device access. */
30int omega_gpu_dnn_rows(const OmegaGpuDnnRowsShape *shape, const void *input, float *output);
31#ifdef __cplusplus
32}
33#endif
34#endif