sdkruntimepybind module documented in the SdkRuntime API Reference.
Imports
The classes and enums documented on this page live incerebras.sdk.runtime.sdkruntimepybind. The canonical import block for an
SdkLayout-based host program is:
SdkLayout with SdkRuntime (the typical case),
import SdkRuntime and SdkCompileArtifacts from the same module:
CodeRegion
Bases: object
Specifies a code region.
Color
Bases: object
Represents a color with an optional user-specified physical value. Objects of this class can be
used for routing and can also be used to set microcode parameter values. If a physical value is
not provided, then a physical value will be allocated automatically by the compiler.
Edge
Bases: Enum
Represents edge positions along the boundary of a code region.
Values:
- TOP
- BOTTOM
- LEFT
- RIGHT
EdgeRouteInfo
Bases: object
For a given code region, represents the routing positions in one of the region’s four edges.
FP16TYPE
Bases: Enum
Specifies the 16-bit floating point format for compilation.
Values:
- F16: IEEE 754 half-precision (
f16)- BF16: Brain floating point (
bf16)- CB16: Cerebras 16-bit floating point (
cb16)
SdkLayout
Bases: object
Specifies a program layout. This API allows you to define rectangular code regions, define
color routing and switching, automatically allocate colors, and automatically route between code
regions.
PortHandle
Bases: object
Handle to a program input or output data port.
Route
Bases: Enum
Represents route directions.
Values:
- RAMP
- EAST
- WEST
- NORTH
- SOUTH
RoutingPosition
Bases: object
Represents a single routing position, which can consist of one or more route values
for input and one or more route values for output.
get_edge_routing
Construct an edge routing info object from a given edge and routing positions.
- Returns: Object containing edge routing info.
- Return type:
EdgeRouteInfo
Geometry
IntRectangle
Bases: object
Defines a rectangle of values.
IntVector
Bases: object
Wraps a tuple of two integer values, often used to specify coordinates or offsets.