Files
colibri-strix/c/tests/test_tier.c
T
ZacharyZcR cbd599024e Unify continuous batching + heterogeneous runtime: decode batching, physical-core planning, disjoint VRAM/RAM placement, topp-policy warning (CPU-validated, CUDA on 6x5090) (#68)
* Fuse CUDA expert MLP execution

* Group CUDA expert transfers by device

* Instrument grouped CUDA expert execution

* Bound grouped CUDA decode scratch

* Execute expert groups across GPUs in parallel

* Release host backing for multi-GPU experts

* Define quality-preserving memory policies

* Overlap cold expert loading with resident compute

* Adapt expert placement with session LFRU

* Fuse q4 expert gate and up dispatch

* Plan CPU work on physical cores

* Batch grouped expert CUDA kernels

* Separate VRAM and RAM expert placement

* Add ragged multi-sequence decode forward

* feat(runtime): add continuous decode scheduler

* Route concurrent API requests through batch scheduler

* Harden multiplex request lifecycle and framing

* Cancel disconnected multiplex requests

* Bind API port before starting the engine

* fix automatic KV slot allocation

* add native int4 Tensor Core grouped GEMM

* add Tensor Core throughput benchmark

* optimize packed int4 low-row kernels

* add asynchronous CUDA staging streams

* document validated six-GPU dense acceleration

* tune six-GPU expert hot set

* raise validated expert hot-set target

* add CUDA MLA absorption core

* fuse grouped expert gate and up projections

* Warn for explicit lossy routing flags
2026-07-13 14:30:36 +02:00

28 lines
1007 B
C

#include <stdio.h>
#include "../tier.h"
static int fail(const char *message){
fprintf(stderr,"tier test failed: %s\n",message);
return 1;
}
int main(void){
uint32_t heat[6]={20,2,8,3,30,1};
int pinned[2]={0,1}, slot=-1, eid=-1; long gain=0;
if(!tier_pick_swap(heat,6,pinned,2,&slot,&eid,&gain)) return fail("hot expert not promoted");
if(slot!=1 || eid!=4 || gain!=28) return fail("wrong promotion candidate");
uint32_t stable[4]={20,18,24,4}; int resident[2]={0,1};
if(tier_pick_swap(stable,4,resident,2,&slot,&eid,&gain)) return fail("hysteresis did not block churn");
tier_decay(heat,6);
if(heat[0]!=10 || heat[1]!=1 || heat[4]!=15) return fail("heat decay");
uint32_t freq[5]={10,10,2,18,18}, last[5]={10,90,95,20,99};
int live[2]={0,1};
if(!tier_pick_lfru(freq,last,100,5,live,2,&slot,&eid,&gain)) return fail("LFRU promotion");
if(slot!=0||eid!=4) return fail("LFRU did not prefer recent ties");
puts("tier tests: ok");
return 0;
}