---
title: "ClikaRT::io::LoadPolicy"
sidebar_label: "LoadPolicy"
description: "How a policy-taking loader materializes tensors."
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--struct">struct</span>

**Header:** `ClikaRT/io/tensors_container.h`

How a policy-taking loader materializes tensors.

## Data members

### device {#device}

<div class="api-signature">

[`StreamOrDevice`](../StreamOrDevice.md) **`device`** `= {}`

</div>

Where materialized tensors live: a device (uploads ride the calling thread's async transfer lane on it; a bare device states placement, never a lane) or a caller stream the uploads ride. Unset ⇒ CPU.

<div class="api-declared">

Declared in `ClikaRT/io/tensors_container.h`, line 42

</div>

### sticky {#sticky}

<div class="api-signature">

`bool` **`sticky`** `= false`

</div>

Keep the lineage on disk: op outputs derived from these tensors are backed by disk-spill storage (at/above the runtime's spill threshold), so they can be evicted and re-faulted like the weights themselves. Opt-in per load.

<div class="api-declared">

Declared in `ClikaRT/io/tensors_container.h`, line 47

</div>

### map\_payload {#map_payload}

<div class="api-signature">

`std::optional<bool>` **`map_payload`**

</div>

Read the checkpoint through a file mapping (true), or read each tensor from the file only when it is asked for (false): with the mapping off, the header is read once, no tensor is read ahead, and one tensor's bytes are resident at a time, the form for a checkpoint larger than the memory it loads into. Unset, the loader decides at the open from the checkpoint's size against the available memory.

<div class="api-declared">

Declared in `ClikaRT/io/tensors_container.h`, line 54

</div>
