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
Specifies a code region.
Color
class cerebras.sdk.runtime.sdkruntimepybind.Color(name: str, value: Optional[int] = None)
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
Represents edge positions along the boundary of a code region.
Values:
- TOP
- BOTTOM
- LEFT
- RIGHT
EdgeRouteInfo
For a given code region, represents the routing positions in one of the region’s four edges.
FP16TYPE
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 the user to define rectangular code regions, define
color routing and switching, automatically allocate colors, and automatically route between code
regions.
PortHandle
Handle to a program input or output data port.
Route
Represents route directions.
Values:
- RAMP
- EAST
- WEST
- NORTH
- SOUTH
RoutingPosition
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
cerebras.sdk.runtime.sdkruntimepybind.get_edge_routing(edge: Edge, routes: List[RoutingPosition]) → EdgeRouteInfo
Construct an edge routing info object from a given edge and routing positions.
- Returns: Object containing edge routing info.
- Return type:
EdgeRouteInfo
Geometry
IntRectangle
Defines a rectangle of values.
IntVector
Wraps a tuple of two integer values, often used to specify coordinates or offsets.