IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Mojo struct

KVCacheCopyPagesD2H

struct KVCacheCopyPagesD2H

Registers the mo.kv_cache.copy_pages_d2h graph op with the graph compiler.

Implemented traitsโ€‹

AnyType, ImplicitlyDeletable

Methodsโ€‹

executeโ€‹

static def execute[dtype: DType, //, target: StringSlice[ImmStaticOrigin]](device_kv_blocks: ManagedTensorSlice[IOSpec[_, _].MutableInput, static_spec=device_kv_blocks.static_spec], host_kv_blocks: ManagedTensorSlice[IOSpec[_, _].MutableInput, static_spec=host_kv_blocks.static_spec], src_page_ids: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=src_page_ids.static_spec], dst_page_ids: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=dst_page_ids.static_spec], layer_idx: UInt32, ctx: DeviceContext)