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_pfhost.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_pfhost.h` 38 lines · 2227 bytes Raw Blame History 1 /* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ 2 #ifndef OMEGA_GPU_PFHOST_H 3 #define OMEGA_GPU_PFHOST_H 4 /* 5 * omega_gpu_pfhost (OWN-30B W-L1G-D, 2026-10-14): the whole-prompt prefill's router logits and MoE combine on the chip. New file. 6 * Kernels and their exact semantics: omega_blackwell_codegen_pfhost.h (bit-identical to the Rust driver's host loops). 7 * Buffers are omega_gpu_prefill.h buffers (DEVICE or HOST, by VA); every call takes the session lock and is synchronous. 8 * 9 * uint32_t omega_gpu_pf_router_rows(void); 10 * Rows per CTA of the router-logits launch (t). x must have ceil(rows / t) * t readable rows; logits gets that many rows. 11 * size_t omega_gpu_pf_router_packed_bytes(uint32_t e, uint32_t k); 12 * void omega_gpu_pf_router_pack(uint32_t e, uint32_t k, const float *w, float *wq); 13 * w: f32 [e][k] (row ex = expert ex); wq: the packed layout R4 plus the pad group (zeros), packed_bytes bytes. 14 * int omega_gpu_pf_router_logits(uint32_t k, uint32_t e, uint32_t rows, uint64_t x_va, uint64_t wq_va, uint64_t logits_va, uint64_t *ns); 15 * int omega_gpu_pf_moe_combine(uint32_t h, uint32_t top_k, uint32_t rows, uint64_t down_va, uint64_t inv_va, uint64_t wt_va, 16 * uint64_t out_va, uint64_t *ns); 17 * Return codes OMEGA_GPU_PF_*; *ns (when given) gains the chip nanoseconds. 18 */ 19 #include 20 #include 21 #include "omega_gpu_prefill.h" 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 uint32_t omega_gpu_pf_router_rows(void); 27 size_t omega_gpu_pf_router_packed_bytes(uint32_t e, uint32_t k); 28 void omega_gpu_pf_router_pack(uint32_t e, uint32_t k, const float *w, float *wq); 29 int omega_gpu_pf_router_logits(uint32_t k, uint32_t e, uint32_t rows, uint64_t x_va, uint64_t wq_va, uint64_t logits_va, uint64_t *ns); 30 int omega_gpu_pf_moe_combine(uint32_t h, uint32_t top_k, uint32_t rows, uint64_t down_va, uint64_t inv_va, uint64_t wt_va, uint64_t out_va, uint64_t *ns); 31 /* tests only: kernel mutants (0 restores) and the router's rows per CTA (0 = default 16) */ 32 void omega_gpu_pf_router_test_set_mutant(int m); 33 void omega_gpu_pf_combine_test_set_mutant(int m); 34 void omega_gpu_pf_router_set_rows(uint32_t t); 35 #ifdef __cplusplus 36 } 37 #endif 38 #endif