Skip to content
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

Poetry install failure of TensorRT 9.3.0.post12.dev1 when installing on Windows #3864

Open
araza008 opened this issue May 14, 2024 · 3 comments
Assignees
Labels
triaged Issue has been triaged by maintainers

Comments

@araza008
Copy link

araza008 commented May 14, 2024

Description

I came across this error when installing tensorrt_llm==0.9.0 using poetry on windows. I referred to issue#3050 which described the same failure but was resolved by individually adding modules using poetry. The same steps fail on windows when installing as the dependency manager is unable to find a suitable installation candidate for nvidia-cudnn-cu12. With torch=2.2.0+cu121 already installed, running the following command:
poetry add --source pyindex-nvidia tensorrt-libs==9.3.0.post12.dev1
raises an error:
`Package operations: 3 installs, 0 updates, 0 removals

  • Installing nvidia-cuda-runtime-cu12 (12.1.105): Installing...
  • Installing nvidia-cudnn-cu12 (8.9.2.26): Failed
  • Installing nvidia-cuda-runtime-cu12 (12.1.105)
  • Installing nvidia-cudnn-cu12 (8.9.2.26): Failed

RuntimeError

Unable to find installation candidates for nvidia-cudnn-cu12 (8.9.2.26)

at C:\Program Files\Python310\lib\site-packages\poetry\installation\chooser.py:74 in choose_for
70│
71│ links.append(link)
72│
73│ if not links:
→ 74│ raise RuntimeError(f"Unable to find installation candidates for {package}")
75│
76│ # Get the best link
77│ chosen = max(links, key=lambda link: self._sort_key(package, link))
78│

Cannot install nvidia-cudnn-cu12.`

As far as I looked, there is no nvidia-cuda-cu12(8.9.2.26) for windows platform on nvidia and pytorch indexes.

Environment

TensorRT Version: 9.3.0.post12.dev1

NVIDIA GPU: RTX 4090

NVIDIA Driver Version: 551.52

CUDA Version: V12.2.140

CUDNN Version:

Operating System: Windows OS Build 27552

Python Version (if applicable): 3.10.11

Tensorflow Version (if applicable):

PyTorch Version (if applicable): 2.2.0+cu121

Baremetal or Container (if so, version):

Steps To Reproduce

poetry source add --priority=explicit pytorch-gpu-src https://download.pytorch.org/whl/cu121
poetry add --source pytorch-gpu-src torch==2.2.0+cu121
poetry source add --priority=explicit pyindex-nvidia https://pypi.nvidia.com
poetry add --source pyindex-nvidia tensorrt-libs==9.3.0.post12.dev1
@zeroepoch
Copy link
Contributor

Using the command pip install --extra-index-url https://download.pytorch.org/whl/cu121 torch==2.2.0+cu121 on Linux (I know not Windows) I see as a dependency it installs nvidia-cudnn-cu12==8.9.2.26. This looks like a direct dependency of torch. Since we don't have a Windows build of cuDNN 8.9.2.26 available I'm not sure how this particular version of Torch would be installable on Windows.

I checked the METADATA file and it shows a platform specific condition (Linux x86)

$ grep nvidia-cudnn torch-2.2.0+cu121.dist-info/METADATA 
Requires-Dist: nvidia-cudnn-cu12 (==8.9.2.26) ; platform_system == "Linux" and platform_machine == "x86_64"

I'm not too familiar with Torch's dependencies, but I'm wondering if on Windows they are expecting you to install these libraries manually. Is Poetry maybe disregarding these platform hints?

I will need to repeat this on a Windows machine when I get an opportunity but wanted to provide some debug information to get started.

@zerollzeng zerollzeng added the triaged Issue has been triaged by maintainers label May 17, 2024
@araza008
Copy link
Author

Hi @zeroepoch. Were you able to repro the issue on Windows platform? When is this expected to be resolved?

@zeroepoch
Copy link
Contributor

@araza008 the solution to this issue is to not use Poetry. PyTorch is essentially not compatible with Poetry on Windows from what I can see. Since it doesn't consider the platform conditions in the requirements there doesn't appear to be a way to resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged Issue has been triaged by maintainers
Projects
None yet
Development

No branches or pull requests

3 participants