Skip to content
Merged
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
4 changes: 2 additions & 2 deletions crates/uv-distribution-types/src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ pub struct Index {
/// ```toml
/// [[tool.uv.index]]
/// name = "pytorch"
/// url = "https://download.pytorch.org/whl/cu121"
/// url = "https://download.pytorch.org/whl/cu130"
///
/// [tool.uv.sources]
/// torch = { index = "pytorch" }
Expand All @@ -154,7 +154,7 @@ pub struct Index {
/// ```toml
/// [[tool.uv.index]]
/// name = "pytorch"
/// url = "https://download.pytorch.org/whl/cu121"
/// url = "https://download.pytorch.org/whl/cu130"
/// explicit = true
///
/// [tool.uv.sources]
Expand Down
4 changes: 2 additions & 2 deletions crates/uv-resolver/src/resolver/indexes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ use uv_normalize::PackageName;
/// ```toml
/// [[tool.uv.index]]
/// name = "pytorch"
/// url = "https://download.pytorch.org/whl/cu121"
/// url = "https://download.pytorch.org/whl/cu130"
///
/// [tool.uv.sources]
/// torch = { index = "pytorch" }
/// ```
///
/// [`Indexes`] would contain a single entry mapping `torch` to `https://download.pytorch.org/whl/cu121`.
/// [`Indexes`] would contain a single entry mapping `torch` to `https://download.pytorch.org/whl/cu130`.
#[derive(Debug, Default, Clone)]
pub(crate) struct Indexes(ForkMap<IndexMetadata>);

Expand Down
4 changes: 2 additions & 2 deletions crates/uv-settings/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ pub struct ResolverInstallerSchema {
/// ```toml
/// [[tool.uv.index]]
/// name = "pytorch"
/// url = "https://download.pytorch.org/whl/cu121"
/// url = "https://download.pytorch.org/whl/cu130"
/// explicit = true
///
/// [tool.uv.sources]
Expand All @@ -684,7 +684,7 @@ pub struct ResolverInstallerSchema {
example = r#"
[[tool.uv.index]]
name = "pytorch"
url = "https://download.pytorch.org/whl/cu121"
url = "https://download.pytorch.org/whl/cu130"
"#
)]
pub index: Option<Vec<Index>>,
Expand Down
4 changes: 4 additions & 0 deletions crates/uv-torch/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ impl TorchStrategy {
| "torchtune"
| "torchvision"
| "triton"
| "triton-rocm"
| "triton-xpu"
| "xformers"
)
}
Expand Down Expand Up @@ -379,6 +381,8 @@ impl TorchStrategy {
| "torchtune"
| "torchvision"
| "triton"
| "triton-rocm"
| "triton-xpu"
| "vllm"
| "xformers"
)
Expand Down
4 changes: 2 additions & 2 deletions crates/uv-workspace/src/pyproject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ pub struct ToolUv {
/// ```toml
/// [[tool.uv.index]]
/// name = "pytorch"
/// url = "https://download.pytorch.org/whl/cu121"
/// url = "https://download.pytorch.org/whl/cu130"
/// explicit = true
///
/// [tool.uv.sources]
Expand All @@ -365,7 +365,7 @@ pub struct ToolUv {
example = r#"
[[tool.uv.index]]
name = "pytorch"
url = "https://download.pytorch.org/whl/cu121"
url = "https://download.pytorch.org/whl/cu130"
"#
)]
#[serde(deserialize_with = "deserialize_index_vec", default)]
Expand Down
12 changes: 6 additions & 6 deletions docs/concepts/indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,17 @@ dependencies = ["torch"]

[tool.uv.sources]
torch = [
{ index = "pytorch-cu118", marker = "sys_platform == 'darwin'"},
{ index = "pytorch-cu124", marker = "sys_platform != 'darwin'"},
{ index = "pytorch-cpu", marker = "sys_platform == 'darwin'"},
{ index = "pytorch-cu130", marker = "sys_platform != 'darwin'"},
]

[[tool.uv.index]]
name = "pytorch-cu118"
url = "https://download.pytorch.org/whl/cu118"
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"

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

An index can be marked as `explicit = true` to prevent packages from being installed from that index
Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/projects/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ explicit = true

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

Expand Down Expand Up @@ -630,7 +630,7 @@ url = "https://download.pytorch.org/whl/cpu"

[[tool.uv.index]]
name = "torch-gpu"
url = "https://download.pytorch.org/whl/cu124"
url = "https://download.pytorch.org/whl/cu130"
```

## Development dependencies
Expand Down
Loading
Loading