Contents

class

SushiRuntime::Runtime

Entry point of the fluent API: owns hardware and hands out graphs.

Declared in
include/SushiRuntime/api/runtime/runtime.hpp

Create one with Runtime::create(), then call graph() to build work. The runtime owns the RuntimeContext (hardware, queues, engine); graphs borrow it, so the Runtime must outlive every graph it produces.

Static public member functions

static Runtime create(const Topology::HardwareFilterConfig &config={}, const RuntimeConfig &runtime_config={})

Creates a runtime with default device selection.

Parameters

config

Device-class filter passed to hardware discovery.

runtime_config

Runtime-wide settings; defaults to the simulation profile.

Exceptions

SushiException

If no device satisfies config.

Public member functions

Graph graph()

Starts a new, empty graph bound to this runtime.

Returns

A fluent Graph; add tasks, then run() or try_run().

DynamicGraph dynamic_graph()

Starts a new dynamic, region-partitioned graph.

See also

include/SushiRuntime/api/runtime/README.md

template <typename T>
Buffer< T > buffer(std::size_t count, DeviceIndex device_index=DeviceIndex{0}, Residency residency=Residency::Shared)

Allocates a typed shared-USM buffer owned by this runtime.

Precondition

The buffer does not outlive the Runtime.

See also

include/SushiRuntime/api/runtime/README.md

template <typename T>
State< T > state(std::size_t count, DeviceIndex device_index=DeviceIndex{0}, Residency residency=Residency::Shared)

Allocates a double-buffered, time-evolving State field.

Precondition

The State does not outlive the Runtime.

See also

include/SushiRuntime/api/runtime/README.md

Runtime & rebalancer(bool enabled)

Enables or disables the background thermal rebalancer; safe to call between runs.

See also

include/SushiRuntime/api/runtime/README.md

AdvancedControls advanced() noexcept

A narrow, supported view of runtime-internal state.

Returns

An AdvancedControls borrowing this runtime's context.

Interop interop() const noexcept

Provides the SYCL/Vulkan interop facade for this runtime's context.

Returns

An Interop bound to this runtime's context.

Execution::RuntimeContext & unsafe_context() noexcept

Returns the full runtime context, a non-public type that may break across versions.

See also

include/SushiRuntime/api/runtime/README.md