vortex_torch.indexer.save_load

Classes

Load()

Read back a per-page value persisted by Save (the read side of the cross-decode-step persistent-state pattern).

Save()

Persist a per-page indexer value across decode steps (paired with Load) by copying it into a preallocated cache field.

class Save[source]

Bases: vOp

Persist a per-page indexer value across decode steps (paired with Load) by copying it into a preallocated cache field.

Math:
\[O \leftarrow X\]

(a format/layout copy RAGGEDPAGED; no arithmetic).

__init__:

Save() — no arguments.

__call__:

op(x, o, ctx=ctx)x [S, D_0, D_1] (RAGGED) is written in place into the preallocated o (PAGED, matching D_0 / D_1). Returns nothing.

Note:

write side of the persistent-state pattern; a flow that uses Save requires the engine to set disable_radix_cache=True.

class Load[source]

Bases: vOp

Read back a per-page value persisted by Save (the read side of the cross-decode-step persistent-state pattern).

Math:
\[Y \leftarrow X\]

(a format/layout copy PAGEDRAGGED; no arithmetic).

__init__:

Load() — no arguments.

__call__:

y = op(x, ctx=ctx)x [S, D_0, D_1] (PAGED); returns a freshly-allocated RAGGED view of the same inner shape.

Note:

read side of the persistent-state pattern (see Save).