# autotuningCandidate

A autotuning candidate record carrying localSizeX, parityPassed, medianKernelUs, minimumKernelUs, maximumKernelUs, 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 autotuningCandidate
```

- int localSizeX: Stores local size x as int.
- bool parityPassed: Stores parity passed as bool.
- int medianKernelUs: Stores median kernel us as int.
- int minimumKernelUs: Stores minimum kernel us as int.
- int maximumKernelUs: Stores maximum kernel us as int.
- int sampleCount: Stores sample count as int.
- text rejection: Stores rejection as text.
- autotuningCandidate(int localSizeX, bool parityPassed, int medianKernelUs, int minimumKernelUs, int maximumKernelUs, int sampleCount, text rejection): Autotuning candidate.
- IsAdmissible(int requiredSamples, int budgetUs) returns bool: Is admissible.
- SpreadUs() returns int: Spread us.

## Use autotuningCandidate

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.
autotuningCandidate sample = autotuningCandidate(1, true, 1, 1, 1, 1, "rejection")
Console.Log(Text.From(sample.localSizeX))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.compute_accelerator__autotuningcandidate"
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--autotuningCandidate/usage --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## autotuningCandidate.IsAdmissible

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 admissible.
autotuningCandidate instance = autotuningCandidate(1, true, 1, 1, 1, 1, "rejection")
int argument_requiredSamples = 1
int argument_budgetUs = 1
bool result = instance.IsAdmissible(argument_requiredSamples, argument_budgetUs)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.compute_accelerator__autotuningcandidate"
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--autotuningCandidate/method-IsAdmissible-8 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## autotuningCandidate.SpreadUs

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using compute.accelerator

// Spread us.
autotuningCandidate instance = autotuningCandidate(1, true, 1, 1, 1, 1, "rejection")
int result = instance.SpreadUs()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.compute_accelerator__autotuningcandidate"
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--autotuningCandidate/method-SpreadUs-9 --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
