# tensorSerializationMetadata

A tensor serialization metadata record carrying schema, schemaVersion, dtype, dimensions, strides, and related state.

Last updated: 2026-09-09

Package: compute.tensor | Status: source-declared

Tags: compute, compute.tensor, cpu, method, source-example, tensor, thing, yeho

Represent tensor shapes, layouts, and numerical storage contracts.

```yh
external thing tensorSerializationMetadata
```

- text schema: Stores schema as text.
- int schemaVersion: Stores schema version as int.
- text dtype: Stores dtype as text.
- list of int dimensions: Stores dimensions as list of int.
- list of int strides: Stores strides as list of int.
- text byteOrder: Stores byte order as text.
- text logicalLayout: Stores logical layout as text.
- text payloadEncoding: Stores payload encoding as text.
- tensorSerializationMetadata(text schema, int schemaVersion, text dtype, list of int dimensions, list of int strides, text byteOrder, text logicalLayout, text payloadEncoding): Tensor serialization metadata.
- CacheKey() returns text: Cache key.
- Describe() returns text: Describe.

## Use tensorSerializationMetadata

A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.

Verification: type checked

```yh
using compute.tensor

// Represent tensor shapes, layouts, and numerical storage contracts.
tensorSerializationMetadata sample = tensorSerializationMetadata("schema", 1, "int", [], [], "byte Order", "logical Layout", "payload Encoding")
Console.Log(Text.From(sample.schema))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.compute_tensor__tensorserializationmetadata"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "compute.tensor"
version = "0.1.0"
path = "../../../yeho/packages/compute/tensor"

[[dependencies]]
package = "console"
version = "0.1.0"
path = "../../../yeho/packages/console"

[[dependencies]]
package = "diagnostics"
version = "0.1.0"
path = "../../../yeho/packages/diagnostics"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/compute.tensor--tensorSerializationMetadata/usage --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## tensorSerializationMetadata.CacheKey

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using compute.tensor

// Cache key.
tensorSerializationMetadata instance = tensorSerializationMetadata("schema", 1, "int", [], [], "byte Order", "logical Layout", "payload Encoding")
text result = instance.CacheKey()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.compute_tensor__tensorserializationmetadata"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "compute.tensor"
version = "0.1.0"
path = "../../../yeho/packages/compute/tensor"

[[dependencies]]
package = "console"
version = "0.1.0"
path = "../../../yeho/packages/console"

[[dependencies]]
package = "diagnostics"
version = "0.1.0"
path = "../../../yeho/packages/diagnostics"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/compute.tensor--tensorSerializationMetadata/method-CacheKey-9 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## tensorSerializationMetadata.Describe

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using compute.tensor

// Describe.
tensorSerializationMetadata instance = tensorSerializationMetadata("schema", 1, "int", [], [], "byte Order", "logical Layout", "payload Encoding")
text result = instance.Describe()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.compute_tensor__tensorserializationmetadata"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "compute.tensor"
version = "0.1.0"
path = "../../../yeho/packages/compute/tensor"

[[dependencies]]
package = "console"
version = "0.1.0"
path = "../../../yeho/packages/console"

[[dependencies]]
package = "diagnostics"
version = "0.1.0"
path = "../../../yeho/packages/diagnostics"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/compute.tensor--tensorSerializationMetadata/method-Describe-10 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup.

Source: yeho/packages/compute/tensor/contracts.yh

AI training permission: https://demonhunterlabs.com/ai-use
