-
Notifications
You must be signed in to change notification settings - Fork 796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installing torch+xpu on Windows #9409
Comments
Actually, the dependency of I think adding the following constraint will make the packages installed by
As for writing a cross-platform compatible pyproject.toml file, I don't have the time to help with that right now. |
Did you read the PyTorch guide? https://docs.astral.sh/uv/guides/integration/pytorch/ |
Yes, I read the guide, but it did not help. Neither adding a marker in the source nor setting # pyproject.toml
[project]
name = "torch-test-xpu"
version = "0.1.0"
requires-python = ">=3.12"
dependencies = ["torch>=2.5.0"]
[tool.uv]
environments = ["platform_system == 'Windows'"]
[tool.uv.sources]
torch = [{ index = "pytorch-test-xpu" }]
[[tool.uv.index]]
name = "pytorch-test-xpu"
url = "https://download.pytorch.org/whl/test/xpu"
explicit = true
⬇️ But I still have some questions. These versions are from the XPU index, so I assume you did not set ⬇️ And this still happens, so I cannot install the exact versions like yours.
Details
To sum up, it works fine with setting For the |
Environment
Description
I want to configure
torch+xpu
on Windows 11. It can be installed usinguv pip install
but not withuv sync
oruv add
.Reproduction Steps
In an empty directory, create a virtual environment with
uv venv
. Use the following command to install dependencies.Here is my pyproject.toml.
Plan 1
With or without
explicit = true
, runninguv pip install -r pyproject.toml -v
works, but there is a difference in the versions installed.Details
explicit = true
Plan 2
With
explicit = true
and runninguv sync -v
, it fails.It seems the reason is that
pytorch-triton-xpu
only supports Linux, but it is not required on Windows. Why does uv not skip it?Details
Plan 3
Removing
explicit = true
and tryinguv sync -v
, it still fails.It should fall back to
markupsafe
2.1.5 likeuv pip install
withoutexplicit = true
does.markupsafe
3.0.2 has a Windows wheel on the PyPI index but only has a Linux wheel on the XPU index.If I manually change the version of
markupsafe
to 2.1.5 in the lock file, thenuv sync
works without errors.Stanley5249/torch-test-xpu@50a2409
Details
Question
I am not sure what causes the error, but I am certain that
torch>=2.5.0
supports the Windows platform as the PyTorch documentation states. The error only occurs with uv. Can you help me identify and resolve the issue? Thanks in advance!The text was updated successfully, but these errors were encountered: