Update PyTorch documentation for PyTorch 2.11#19095
Conversation
d7febeb to
e2203f9
Compare
e2203f9 to
490122d
Compare
|
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 |
|
I am really sorry for not investigating further with this dependency problem here, as it's complicated to dealing with this rightly. |
Summary
Motivated by: #10712 (comment).