Skip to content

Update PyTorch documentation for PyTorch 2.11#19095

Merged
charliermarsh merged 1 commit intomainfrom
charlie/torch-docs
Apr 21, 2026
Merged

Update PyTorch documentation for PyTorch 2.11#19095
charliermarsh merged 1 commit intomainfrom
charlie/torch-docs

Conversation

@charliermarsh
Copy link
Copy Markdown
Member

Summary

Motivated by: #10712 (comment).

@charliermarsh charliermarsh added the documentation Improvements or additions to documentation label Apr 21, 2026
@charliermarsh charliermarsh marked this pull request as ready for review April 21, 2026 17:50
@charliermarsh charliermarsh requested a review from konstin April 21, 2026 17:50
@charliermarsh charliermarsh merged commit b8b3073 into main Apr 21, 2026
55 checks passed
@charliermarsh charliermarsh deleted the charlie/torch-docs branch April 21, 2026 18:02
@Cloud0310
Copy link
Copy Markdown

Hello, I originally opened this issue, but I realized my previous explanation was incomplete. Here is the full context:

During my installation debugging process, I first attempted to install pytorch-triton-rocm. This package implicitly depends on triton-rocm, which uv rejects during resolution because it is not declared as an optional dependency.

To work around this, I replaced pytorch-triton-rocm with triton-rocm as an optional dependency in pyproject.toml. However, I did this without recreating the environment. As a result, the environment appeared to work and triton seemed to be installed, but in reality it only contained the platform-specific ROCm stubs without the actual implementation.

When I later tried to use Triton, this setup failed.

Based on this, the correct configuration should explicitly include both packages, like this:

[project.optional-dependencies]
cpu = ["torch>=2.6.0", "torchvision"]
cuda = [
  "torch>=2.6.0 ; sys_platform != 'darwin'",
  "torchvision ; sys_platform != 'darwin'"
]
rocm = [
  "torch>=2.6.0",
  "torchvision",
  # provides Triton
  "pytorch-triton-rocm ; sys_platform == 'linux'",
  # required dependency providing platform-specific components
  "triton-rocm ; sys_platform == 'linux'",
]
[tool.uv.sources]
torch = [
  { index = "pytorch-cpu", extra = "cpu" },
  { index = "pytorch-cu130", extra = "cuda", marker = "platform_system != 'Darwin'" },
  { index = "pytorch-rocm", extra = "rocm", marker = "platform_system == 'Linux'" },
]
torchvision = [
  { index = "pytorch-cpu", extra = "cpu" },
  { index = "pytorch-cu130", extra = "cuda", marker = "platform_system != 'Darwin'" },
  { index = "pytorch-rocm", extra = "rocm", marker = "platform_system == 'Linux'" },
]
triton-rocm = [
  { index = "pytorch-rocm", extra = "rocm", marker = "sys_platform == 'linux'" },
]

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

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

[[tool.uv.index]]
name = "pytorch-rocm"
url = "https://download.pytorch.org/whl/rocm7.2"
explicit = true

@Cloud0310
Copy link
Copy Markdown

I am really sorry for not investigating further with this dependency problem here, as it's complicated to dealing with this rightly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants