Skip to content

platforms: ATOM batcher poisons itself when kv_blocks == lanes + 1 with prefix cache #172

Closed

Description

@gspark-etri

Problem

The constructor accepts kv_blocks == lanes + 1. With prefix cache on and all lanes busy, a request sharing a prefix with the only cache entry calls _take(keep=src), finds no victim and raises "no KV block available"; step() then poisons the batcher.

Evidence and reproduction

opt_prime/opt_prime/accel/platforms/atom/batching.py:79-82,122-123,167-172. Ran: batch=1, blocks=2, the same prompt twice fails with that error.

Environment

optimus-rm @253be20; Python 3.10, torch 2.10.0+cu128, transformers 5.1.0; RNGD+A100 host (CPU / one A100 for the checks).

Scope

atom/batching.py.

Done when

That configuration either works (reuse the source block) or is rejected at construction; a test covers it.

Owner

@gspark-etri

Activity

  1. gspark-etri commented on Oct 23, 2026

    @gspark-etri
    CollaboratorAuthor

    Fixed by #181, squash-merged into optimus-rm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions