Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/CUDApp/blob/main/src/omega_gpu_attention_mirror.h # 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 Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `CUDApp / src / omega_gpu_attention_mirror.h` 27 lines · 1265 bytes Raw Blame History 1 /* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ 2 #ifndef OMEGA_GPU_ATTENTION_MIRROR_H 3 #define OMEGA_GPU_ATTENTION_MIRROR_H 4 #include "omega_gpu_prefill_attn256_api.h" 5 #ifdef __cplusplus 6 extern "C" { 7 #endif 8 9 /* Experimental per-call 27B attention history placement. No global setting. 10 * mode 0: ordinary path; 1: mirror every supported call; 2: mirror when Omega 11 * admits the proposed 1024-row threshold. Other values/shapes are refused. 12 * One GPU-private buffer is reused. Complete original K/V, including tail slack, 13 * is copied after PREP completes and before ATTEND. The CPU never reads the 14 * mirror; original cache stays authoritative for decode and saved state. 15 * copy_ns, when non-NULL, receives copy chip time (zero for bypass). It is 16 * separate from info.elapsed_ns; info.call_ns includes allocation and copy. 17 * Release uses omega_gpu_prefill_attn256_release or session close. 18 * Existing host, device and recorded entry points retain their behavior. 19 */ 20 int omega_gpu_prefill_attn256_scoped(OmegaGpuDecodeAttn256Cache *c, uint32_t layer, 21 uint32_t pos0, uint32_t m, const float *qkv, float eps, float out_scale, 22 float *out, OmegaGpuPrefillAttn256Info *info, uint32_t mode, uint64_t *copy_ns); 23 24 #ifdef __cplusplus 25 } 26 #endif 27 #endif