# acceleratorAdapterContract

A accelerator adapter contract record carrying schema, backend, compileTarget, resourceAbi, submission, and related state.

Last updated: 2026-09-09

Package: compute.accelerator | Status: source-declared

Tags: accelerator, compute, compute.accelerator, cpu, method, source-example, thing, yeho

Describe accelerator capabilities and explicit placement boundaries.

```yh
external thing acceleratorAdapterContract
```

- text schema: Stores schema as text.
- text backend: Stores backend as text.
- text compileTarget: Stores compile target as text.
- text resourceAbi: Stores resource abi as text.
- text submission: Stores submission as text.
- text timing: Stores timing as text.
- text diagnostics: Stores diagnostics as text.
- text fallback: Stores fallback as text.
- acceleratorAdapterContract(text schema, text backend, text compileTarget, text resourceAbi, text submission, text timing, text diagnostics, text fallback): Accelerator adapter contract.
- IsReferenceVulkanV1() returns bool: Is reference vulkan v1.
- Describe() returns text: Describe.

## Use acceleratorAdapterContract

A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.

Verification: type checked

```yh
using compute.accelerator

// Describe accelerator capabilities and explicit placement boundaries.
acceleratorAdapterContract sample = acceleratorAdapterContract("schema", "cpu-oracle", "compile Target", "resource Abi", "submission", "timing", "diagnostics", "fallback")
Console.Log(Text.From(sample.schema))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.compute_accelerator__acceleratoradaptercontract"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "compute.accelerator"
version = "0.1.0"
path = "../../../yeho/packages/compute/accelerator"

```

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.accelerator--acceleratorAdapterContract/usage --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## acceleratorAdapterContract.IsReferenceVulkanV1

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using compute.accelerator

// Is reference vulkan v1.
acceleratorAdapterContract instance = acceleratorAdapterContract("schema", "cpu-oracle", "compile Target", "resource Abi", "submission", "timing", "diagnostics", "fallback")
bool result = instance.IsReferenceVulkanV1()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.compute_accelerator__acceleratoradaptercontract"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "compute.accelerator"
version = "0.1.0"
path = "../../../yeho/packages/compute/accelerator"

```

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.accelerator--acceleratorAdapterContract/method-IsReferenceVulkanV1-9 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## acceleratorAdapterContract.Describe

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using compute.accelerator

// Describe.
acceleratorAdapterContract instance = acceleratorAdapterContract("schema", "cpu-oracle", "compile Target", "resource Abi", "submission", "timing", "diagnostics", "fallback")
text result = instance.Describe()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.compute_accelerator__acceleratoradaptercontract"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "compute.accelerator"
version = "0.1.0"
path = "../../../yeho/packages/compute/accelerator"

```

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.accelerator--acceleratorAdapterContract/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/accelerator/accelerator.yh

AI training permission: https://demonhunterlabs.com/ai-use
