borch

Notebook

A notebook, nothing installed

JupyterLite in this tab, with pyborch already on its shelf. The kernel is Python (Pyodide) in a worker; import borch_webgpu as torch boots borch.ts on this tab's GPU. No CUDA, no Python on the machine, no account.

Open the notebook → Empty JupyterLab →

The two lines

%pip install pyborch
import borch_webgpu as torch

The same two lines work in any Pyodide — a JupyterLite you host, PyScript, marimo's wasm build — because the wheel carries borch.ts inside it and brings the device up on import. What torch code has to change is on the Python page; it is short.

What a tab cannot do

Measured by tests/browser/lab_probe.py, nightly: opening this notebook and pressing Shift+Enter once, apple / metal-3 sees the learned line 6.3 s later, the wheel's install and borch.ts's boot included.