REQ-INFER-018: Same-prefix batch generation is gated, per-request-constrained and seq-safe¶
What it requires
- Given N sequences, Then batch_shared_prefix_len returns the common prefix capped one below the shortest and 0 for <2 sequences, any empty sequence, a single-token shortest, or no common first token.
- Given each viability condition individually violated (hybrid, n<2, no shared prefix, n > n_parallel, suffixes over n_batch), Then batch_is_viable is false.
- Given an empty pool, Then successive allocate_temp_seq_id calls return distinct ids and released ids are reused.
- Given a real batch, Then the batched decode step count is about the longest output, not the serial sum; on a hybrid arch it falls back to serial.
- tier
- NOT_RUN
How it is met
Implemented by
entropic_inference_statesrc/inference/inference_c_api.cpp:297entropic_run_batchsrc/facade/entropic.cpp:2671plan_batch_kvsrc/inference/batch_kv_util.h:69
Tests (5)
Reached through calls
5 tests: 5 absent
| test | result | linked by | implementers exercised | calls away |
|---|---|---|---|---|
entropic_inference_state returns COLD for NULL handle | absent | inferred | 1 of 3: entropic_inference_state | 1 |
entropic_inference_state returns the backend's state enum | absent | inferred | 1 of 3: entropic_inference_state | 1 |
gh#158: a batch never clears the whole KV cache | absent | inferred | 1 of 3: plan_batch_kv | 1 |
gh#158: a batch never writes a sequence a session owns | absent | inferred | 1 of 3: plan_batch_kv | 1 |
gh#158: the single-session default is unchanged | absent | inferred | 1 of 3: plan_batch_kv | 1 |