Skip to content
Merged
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
26 changes: 13 additions & 13 deletions docs/guides/integration/pytorch.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,21 @@ In such cases, the first step is to add the relevant PyTorch index to your `pypr
explicit = true
```

=== "CUDA 12.1"
=== "CUDA 12.6"

```toml
[[tool.uv.index]]
name = "pytorch-cu121"
url = "https://download.pytorch.org/whl/cu121"
name = "pytorch-cu126"
url = "https://download.pytorch.org/whl/cu126"
explicit = true
```

=== "CUDA 12.4"
=== "CUDA 12.8"

```toml
[[tool.uv.index]]
name = "pytorch-cu124"
url = "https://download.pytorch.org/whl/cu124"
name = "pytorch-cu128"
url = "https://download.pytorch.org/whl/cu128"
explicit = true
```

Expand All @@ -108,7 +108,7 @@ In such cases, the first step is to add the relevant PyTorch index to your `pypr
```toml
[[tool.uv.index]]
name = "pytorch-rocm"
url = "https://download.pytorch.org/whl/rocm6.2"
url = "https://download.pytorch.org/whl/rocm6.3"
explicit = true
```

Expand Down Expand Up @@ -154,33 +154,33 @@ Next, update the `pyproject.toml` to point `torch` and `torchvision` to the desi
]
```

=== "CUDA 12.1"
=== "CUDA 12.6"

PyTorch doesn't publish CUDA builds for macOS. As such, we gate on `sys_platform` to instruct uv to limit
the PyTorch index to Linux and Windows, falling back to PyPI on macOS:

```toml
[tool.uv.sources]
torch = [
{ index = "pytorch-cu121", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
{ index = "pytorch-cu126", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
]
torchvision = [
{ index = "pytorch-cu121", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
{ index = "pytorch-cu126", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
]
```

=== "CUDA 12.4"
=== "CUDA 12.8"

PyTorch doesn't publish CUDA builds for macOS. As such, we gate on `sys_platform` to instruct uv to limit
the PyTorch index to Linux and Windows, falling back to PyPI on macOS:

```toml
[tool.uv.sources]
torch = [
{ index = "pytorch-cu124", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
{ index = "pytorch-cu128", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
]
torchvision = [
{ index = "pytorch-cu124", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
{ index = "pytorch-cu128", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
]
```

Expand Down
Loading