Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions browsers/gpu-acceleration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,62 @@ func main() {

You can also enable GPU acceleration in the dashboard when deploying a browser under **Advanced Configuration**.

## Large GPU browsers

A standard GPU browser runs with 4 vCPUs, 6 GiB of memory, and a 2 GiB vGPU frame buffer. For graphics-heavy pages, request the large GPU browser by setting `memory` to `12GiB`. It doubles CPU, memory, and frame buffer: 8 vCPUs, 12 GiB of memory, and a 4 GiB frame buffer.

<CodeGroup>
```typescript Typescript/Javascript
import Kernel from '@onkernel/sdk';

const kernel = new Kernel();

const kernelBrowser = await kernel.browsers.create({
gpu: true,
memory: '12GiB',
});
```

```python Python
from kernel import Kernel

kernel = Kernel()

kernel_browser = kernel.browsers.create(
gpu=True,
memory="12GiB",
)
```

```go Go
package main

import (
"context"

"github.com/kernel/kernel-go-sdk"
)

func main() {
ctx := context.Background()
client := kernel.NewClient()

kernelBrowser, err := client.Browsers.New(ctx, kernel.BrowserNewParams{
GPU: kernel.Bool(true),
Memory: "12GiB",
})
if err != nil {
panic(err)
}
_ = kernelBrowser
}
```
</CodeGroup>

`12GiB` is the only `memory` value accepted together with `gpu: true`; omit `memory` to get the standard GPU browser. The `memory` field on the browser response reports the allocation you received.

Large GPU browsers come from their own capacity. When none is available, creation fails with HTTP 529 and the `no_gpu_browsers_available` code rather than falling back to a standard GPU browser, so retry later or omit `memory` to get a standard GPU browser instead.

## Use cases

GPU acceleration is useful for:
Expand Down
2 changes: 1 addition & 1 deletion browsers/process-execution.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ Kernel doesn't expose a per-session memory metric in the API, CLI, or dashboard

### Read whole-session memory

`free` reports the memory allocated to your browser. A headless browser gets 1 GiB; a headful, non-GPU browser gets 8 GiB by default and 16 GiB when you set `memory` on [create](/api-reference/browsers/create-a-browser-session).
`free` reports the memory allocated to your browser. A headless browser gets 1 GiB; a headful, non-GPU browser gets 8 GiB by default and 16 GiB when you set `memory` on [create](/api-reference/browsers/create-a-browser-session). A GPU browser gets 6 GiB, or 12 GiB as a [large GPU browser](/browsers/gpu-acceleration#large-gpu-browsers).

<CodeGroup>
```typescript Typescript/Javascript
Expand Down
Loading