vortex_torch.indexer.context¶
Functions
|
Classes
|
Mutable, single-instance context; populate later via .create(...). |
- class vortex_torch.indexer.context.Context[source]¶
Bases:
ContextBaseMutable, single-instance context; populate later via .create(…).
- dense_kv_indices: torch.Tensor¶
Dense KV index tensor for mapping keys/values.
- sparse_kv_indices: torch.Tensor¶
Sparse KV index tensor for irregular KV layout.
- dense_kv_indptr: torch.Tensor¶
CSR-style indptr for dense KV segments.
- sparse_kv_indptr: torch.Tensor¶
CSR-style indptr for sparse KV segments.
- winfo_q_indices: torch.Tensor¶
Query indices used in workload scheduling.
- winfo_kv_offsets: torch.Tensor¶
KV offsets per workload.
- winfo_kv_lens: torch.Tensor¶
KV lengths per workload.
- indexer_dtype: torch.dtype¶
Dtype used by indexer operations.
- create(parent, model_runner, *, overwrite=False)[source]¶
Populate this instance once (no locking). Set overwrite=True to allow re-init. NOTE: Without locking, concurrent callers may race; call from a single thread.
- mode: Literal['profile', 'execute']¶
Current operating mode.