okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
c7d11f789
main
1// src/prefill/mmq_absent.cpp - see include/strata/prefill/moe_mmq.hpp. P4-SPLIT: an engine built without llama.cpp's MMQ prompt kernels 2// (-DSTRATA_MMQ=OFF) keeps Strata's own (strata_pf_own: the fused experts and moe_helpers.cu); this file answers the MMQ half of the 3// interface for it. Every query says "no MMQ", so the prompt path never plans an MMQ product; the calls that would launch one cannot be 4// reached from there and stop the process with a plain message instead of leaving garbage in a buffer. 5#include "strata/prefill/moe_mmq.hpp" 6 7#include <cstdio> 8#include <cstdlib> 9 10namespace strata::prefill::mmq { 11namespace { 12[[noreturn ]]void absent (const char * what ) { 13 std::fprintf (stderr ,"strata: internal error: %s was called, but this engine was built without llama.cpp's MMQ prompt kernels\n" ,what ); 14 std::fflush (stderr ); 15 std::abort (); 16} 17}// namespace 18 19bool built () {return false; } 20bool supported (int ) {return false; } 21bool fits (int ,int64_t ) {return false; } 22Nvfp4Mode nvfp4_mode () {return Nvfp4Mode ::FP16 ; } 23bool fp4_activations (int ) {return false; } 24void quantize (const float * ,const int32_t * ,void * ,int ,int64_t ,int64_t ,int64_t ,void * ,float * ) {absent ("mmq::quantize" ); } 25void quantize_scatter (const float * ,const int32_t * ,const int32_t * ,void * ,int ,int64_t ,int64_t ,int64_t ,int ,void * ) { 26absent ("mmq::quantize_scatter" ); 27} 28void scale_gu_rows (float * ,int64_t ,int64_t ,const int32_t * ,int ,const float * ,int64_t ,int64_t ,void * ) {absent ("mmq::scale_gu_rows" ); } 29void scale_down_rows (float * ,int64_t ,const int32_t * ,int ,const float * ,int64_t ,void * ) {absent ("mmq::scale_down_rows" ); } 30// (a Context is made where the prompt path sets up; with no MMQ product planned it is never run) 31Context ::Context () {} 32Context ::~Context () {} 33void Context ::run (const Product & ,void * ) {absent ("mmq::Context::run" ); } 34bool swiglu_quant_ok (int ) {return false; } 35void swiglu_quant (const float * ,void * ,int64_t ,bool ,void * ) {absent ("mmq::swiglu_quant" ); } 36void f16_to_f32 (const uint16_t * ,float * ,int64_t ,void * ) {absent ("mmq::f16_to_f32" ); } 37void set_bounds (int32_t * ,int32_t ,void * ) {absent ("mmq::set_bounds" ); } 38bool tab_built () {return false; } 39bool tab_fits (int ,int64_t ) {return false; } 40size_t overread_bytes (int ,int64_t ) {return 0 ; } 41bool whole_tiles (int ,int64_t ,int ) {return false; } 42bool launch_splits_k (int ,int64_t ,int64_t ,int ) {return false; } 43int direct_mode () {return 0 ; } 44size_t direct_slot_guard () {return 0 ; } 45void prep_group (const GuardTab & ,size_t ,void * ,void * ,size_t ,void * ) {absent ("mmq::prep_group" ); } 46 47}// namespace strata::prefill::mmq