Skip to content

Execution Backends

The soromox.execution package defines the backend names and optional tuning parameters used by supported system classes. The user-facing workflow is described in Execution Devices and Backends.

Use the system methods in normal applications

Most users should not call classes or functions in this package directly. Construct GVS, PCS, or PlanarPCS with backend="auto", "jax", or "warp", then call the public kinematics and dynamics methods. The lower-level interfaces below primarily support typed configuration and external integration packages.

Public configuration

ExecutionBackend is the accepted backend-name type. GVSBackendParams and PCSBackendParams group family-specific launch tuning rather than adding backend-specific keywords to each system constructor.

from soromox.execution import PCSBackendParams
from soromox.systems import PCS

robot = PCS.from_links(
    links,
    backend="auto",
    backend_params=PCSBackendParams(warp_block_dim=256),
)

soromox.execution

Execution backends for accelerated system operations.

This public package defines backend selection and transformation semantics used by supported Soromox system classes. Most users only need the backend constructor argument; :class:ExecutionBackend names its accepted values and the family-specific backend parameter objects provide optional advanced tuning.

Integrations that need direct Warp execution can import stable family-specific building blocks from :mod:soromox.execution.warp. Importing this module does not import the optional warp-lang dependency; Warp is loaded only when an integration explicitly enters that namespace or selects a Warp executor.

ExecutionBackend module-attribute

ExecutionBackend = Literal['auto', 'jax', 'warp']

DEFAULT_GVS_BLOCK_DIM module-attribute

DEFAULT_GVS_BLOCK_DIM = 128

DEFAULT_GVS_LARGE_BLOCK_DIM module-attribute

DEFAULT_GVS_LARGE_BLOCK_DIM = 192

DEFAULT_PLANAR_PCS_BLOCK_DIM module-attribute

DEFAULT_PLANAR_PCS_BLOCK_DIM = 128

DEFAULT_PCS_BLOCK_DIM module-attribute

DEFAULT_PCS_BLOCK_DIM = 192

GVSBackendParams dataclass

GVSBackendParams(warp_block_dim: int)

Tune execution of the optional GVS Warp kernels.

Attributes:

Name Type Description
warp_block_dim int

CUDA threads per persistent dynamics and body-state recurrence block. It must be a multiple of 32 between 32 and 1024. Models with at most 64 active coordinates default to 128 threads; larger models default to 192.

__post_init__

__post_init__() -> None

Validate the immutable launch configuration.

Returns:

Type Description
None

None.

Raises:

Type Description
TypeError

If :attr:warp_block_dim is not an integer.

ValueError

If :attr:warp_block_dim is not a supported CUDA block dimension.

PCSBackendParams dataclass

PCSBackendParams(warp_block_dim: int)

Tune execution of the optional PlanarPCS and PCS Warp kernels.

Backend parameters are intentionally separate from the backend choice: backend selects "auto", "jax", or "warp", whereas this object configures the selected PCS implementation. Keeping the options in one typed object allows future tuning parameters to be added without expanding the system constructors with backend-specific keywords.

Attributes:

Name Type Description
warp_block_dim int

CUDA threads per persistent dynamics block. It must be a multiple of 32 between 32 and 1024. The recommended defaults are 128 for :class:~soromox.systems.pcs.PlanarPCS and 192 for :class:~soromox.systems.pcs.PCS.

__post_init__

__post_init__() -> None

Validate the immutable launch configuration.

Returns:

Type Description
None

None.

Raises:

Type Description
TypeError

If :attr:warp_block_dim is not an integer.

ValueError

If :attr:warp_block_dim is not a supported CUDA block dimension.

Child modules

Backend dispatch, transformation rules, lazy loading, and family executors are private implementation modules. Their names and call contracts may change without notice and are intentionally excluded from the public API reference.