> ## Documentation Index
> Fetch the complete documentation index at: https://docs.outerproduct.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Hardware

> Request CPUs, memory, and GPUs for each Call.

Each Call declares the hardware it needs through `client.run()`. Hardware is allocated per Call, so different parts of the same application can use different combinations of CPUs, memory, and GPUs.

```python theme={null}
import outerproduct as op

run: op.Run[object] | op.Call[object] = client.run(
    fn=train_model,
    args=(training_data,),
    image=training_image,
    cpu=8,
    memory_bytes=32 * 1024**3,  # 32 GiB
    gpu=1,
    gpu_type="A100-80GB",
)
```

## CPUs

Use `cpu` to specify the number of CPUs assigned to the Call. Requested CPUs are assigned to one worker. The default is one CPU.

```python theme={null}
run: op.Run[object] | op.Call[object] = client.run(
    fn=process_data,
    args=(dataset,),
    image=image,
    cpu=4,
)
```

## Memory

Use `memory_bytes` to set the amount of RAM available to the worker. Memory is specified in bytes. The limit includes temporary shared memory (used by `/dev/shm`). If `memory_bytes` is omitted, OuterProduct provides 2 GiB of memory per requested CPU.

```python theme={null}
run: op.Run[object] | op.Call[object] = client.run(
    fn=process_data,
    args=(dataset,),
    image=image,
    memory_bytes=16 * 1024**3,  # 16 GiB
)
```

## GPUs

Set `gpu_type` to request a particular GPU and `gpu` to specify the count. When `gpu_type` is provided and `gpu` is omitted, OuterProduct assigns one GPU by default.

```python theme={null}
run: op.Run[object] | op.Call[object] = client.run(
    fn=train_model,
    args=(training_data,),
    image=training_image,
    gpu_type="L4",
    gpu=2,
)
```

`gpu=2` assigns two GPUs to the same worker and container. It does not start two workers or divide the function into two Calls. Your code must use a multi-GPU framework such as PyTorch Distributed to take advantage of both GPUs. To run independent work across multiple workers, use `client.map()` to create multiple Calls with one GPU instead.

Your Image must also contain the drivers and libraries required by your application, such as a CUDA-enabled build of PyTorch.

## Supported GPUs

OuterProduct supports several NVIDIA GPU types, including L4, L40S, A10G, A100, and H100. Available GPU models and supported counts depend on the platform’s execution backend and may change over time. The Python API does not currently expose a complete list of supported (`gpu_type`, `gpu`) configurations.

You can inspect the GPU types and per-node counts currently available to your account from the Python API:

```python theme={null}
available_gpus: set[tuple[str, int]] = set()

for node in client.list_nodes():
    resources: op.ComputeResources | None = node.total_resources

    if resources is not None and resources.accelerator:
        available_gpus.add((resources.accelerator, resources.accelerator_count))

print(sorted(available_gpus))
```

This reports currently available nodes, not every configuration supported by the execution backend.

> [!NOTE]
>
> A supported (`gpu_type`, `gpu`) configuration may still take longer to start when capacity is limited. Unsupported configurations return an error.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.