# pllm.kernels Python API

Public objects, practical usage, and research context for pllm.kernels.

[View canonical HTML](https://pllm.run/sdk/reference/python/pllm/kernels/)

Document ID: `pllm.docs.reference.python.pllm.kernels`  
Release: `0.1.0`

Kernel components select bounded matrix implementations while preserving the compiler's numeric and placement contracts. Presence documents API availability, not complete model, security, or deployment coverage; check [implementation status](/sdk/reference/status/) before relying on a path.

## Research context

This API is project infrastructure rather than an implementation of one specific paper. Relevant method pages link their primary sources separately.

## Python SDK example

The example performs a bounded offline task and checks an observable result. It does not download a checkpoint or contact a provider.

```python
import pllm.kernels as kernels

backend = kernels.Cpu(threads=2)
assert backend.get_params() == {"threads": 2}
```

API: [`pllm.kernels`](/sdk/reference/python/pllm/kernels/#objects-and-signatures)

## Objects and signatures

### `Cpu`

Selects component `pllm/cpu` during `compilation`; it provides `cpu` for roles client, preparation, inference.

- Canonical object: `pllm.kernels.Cpu`
- Kind: `class`
- Signature/type: `__init__(self, *, threads: int=1) -> None`
- Public exports: `pllm.Cpu`, `pllm.kernels.Cpu`
- Public members: `descriptor: ComponentDescriptor`; `__init__(self, *, threads: int=1) -> None`; `classmethod describe(cls) -> ComponentDescriptor`

### `KernelBackend`

Immutable `KernelBackend` record carrying `component`, `params` for the workflow where kernel components select bounded matrix implementations while preserving the compiler's numeric and placement contracts.

- Canonical object: `pllm.kernels.KernelBackend`
- Kind: `class`
- Signature/type: `constructor not exposed`
- Public exports: `pllm.kernels.KernelBackend`
