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 / src / omega_gpu_dnn_activations_api.h
| 1 | /* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ |
| 2 | #ifndef OMEGA_GPU_DNN_ACTIVATIONS_API_H |
| 3 | #define OMEGA_GPU_DNN_ACTIVATIONS_API_H |
| 4 | #include "omega_gpu_dnn_types.h" |
| 5 | #include "omega_blackwell_codegen.h" |
| 6 | #ifdef __cplusplus |
| 7 | extern "C" { |
| 8 | #endif |
| 9 | #define OMEGA_GPU_DNN_RELU 0u |
| 10 | #define OMEGA_GPU_DNN_GELU_ERF 1u |
| 11 | #define OMEGA_GPU_DNN_GELU_TANH 2u |
| 12 | #define OMEGA_GPU_DNN_SILU 3u |
| 13 | typedef struct { uint64_t elements; uint32_t operation, dtype; } OmegaGpuDnnActivationsShape; |
| 14 | enum { OMEGA_GPU_DNN_ACTIVATIONS_OK=0, OMEGA_GPU_DNN_ACTIVATIONS_BAD_ARGS=1, |
| 15 | OMEGA_GPU_DNN_ACTIVATIONS_REFUSED=2, OMEGA_GPU_DNN_ACTIVATIONS_CODEGEN=3, |
| 16 | OMEGA_GPU_DNN_ACTIVATIONS_CHIP=4 }; |
| 17 | /* Contiguous finite inputs; f32 output. Nonempty count <= UINT32_MAX. |
| 18 | * The caller supplies enough readable input and writable output storage. |
| 19 | * Codegen is host-only; the execution entry requires an authorized GPU window. */ |
| 20 | int omega_gpu_dnn_activations_codegen(const OmegaGpuDnnActivationsShape *shape, BlackwellIRProgram *program, uint8_t *code, size_t capacity, OmegaBlackwellKernel *kernel); |
| 21 | int omega_gpu_dnn_activations(const OmegaGpuDnnActivationsShape *shape, const void *input, float *output); |
| 22 | #ifdef __cplusplus |
| 23 | } |
| 24 | #endif |
| 25 | #endif |