Skip to main content

Documentation Index

Fetch the complete documentation index at: https://sdk.cerebras.ai/llms.txt

Use this file to discover all available pages before exploring further.

This section presents the SdkLayout program layout specification Python API. Note that this API is part of the sdkruntimepybind module documented in SdkRuntime API Reference.

CodeRegion

class cerebras.sdk.runtime.sdkruntimepybind.CodeRegion
Bases: object
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

class cerebras.sdk.runtime.sdkruntimepybind.Edge
Bases: Enum
Represents edge positions along the boundary of a code region.
Values:
  • TOP
  • BOTTOM
  • LEFT
  • RIGHT

EdgeRouteInfo

class cerebras.sdk.runtime.sdkruntimepybind.EdgeRouteInfo
Bases: object
For a given code region, represents the routing positions in one of the region’s four edges.

FP16TYPE

class cerebras.sdk.runtime.sdkruntimepybind.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

class cerebras.sdk.runtime.sdkruntimepybind.SdkLayout(platform: SdkExecutionPlatform, **kwargs)
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

class cerebras.sdk.runtime.sdkruntimepybind.PortHandle
Bases: object
Handle to a program input or output data port.

Route

class cerebras.sdk.runtime.sdkruntimepybind.Route
Bases: Enum
Represents route directions.
Values:
  • RAMP
  • EAST
  • WEST
  • NORTH
  • SOUTH

RoutingPosition

class cerebras.sdk.runtime.sdkruntimepybind.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

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

class cerebras.geometry.geometry.IntRectangle(origin: IntVector, dims: IntVector)
Bases: object
Defines a rectangle of values.

IntVector

class cerebras.geometry.geometry.IntVector(x: int, y: int)
Bases: object
Wraps a tuple of two integer values, often used to specify coordinates or offsets.