You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compatibility with PyTorch >= 2.8 for Future Hardware (e.g., RTX 50 series) #8507
I just wanted to share a successful workaround for installing MONAI on a system with an RTX 50 series GPU (5070 Ti), which requires a newer PyTorch version (2.8 preview in my case) than what is currently allowed by the pip package dependencies (torch<=2.6).
My Setup:
Ubuntu 24.04 (WSL2)
RTX 5070 Ti
CUDA 12.9
PyTorch 2.8.0 (preview)
After these steps, both MONAI 1.5.0 and PyTorch 2.8.0 are co-existing happily in my environment.
This seems to be a dependency constraint issue in setup.py. While my method is a bit of a hack, it does work. Hope this helps anyone else with next-gen hardware!
MONAI has now been updated to support 2.7. @unumbrela thanks for looking into this, if there's anything that needs to be changed to support 2.8 please do make a PR and we'll consider it. 2.8 will be released soon and we want to support it then, though we lack 50 series hardware for testing purposes.
I can confirm that installing the monai-weekly solves the problem and works well with uv installations.
I did not observe any issues, but I will run further tests today. monai-weekly
To do that, I run the ./runtests.sh -u -q inside the container using the main branch and branch 6327a86, which I believe is the version deployed at monai-weekly (please confirm).
Basically, the tests fail with monai 1.5.0, and most of the tests pass with monai-weekly. There are a couple of issues with the former as well, but I don't think they are critical.
Please, let me know if you want me to run any other tests.
Thanks @garciadias! The hash for weekly was probably b5bc69d but yours is close enough. I think we're sure enough that it's working with 50 series now. We'll return the question of testing hardware later.
Thanks @garciadias! The hash for weekly was probably b5bc69d but yours is close enough. I think we're sure enough that it's working with 50 series now. We'll return the question of testing hardware later.
Thank you, @ericspod . I will try that and use --net --coverage and let you know.
I added the report to my previous comment. There are some errors, but nothing seems to be related to GPU, CUDA, or Torch.
I observed many tests running with substantial GPU load. So, yes, I think monai-weekly is working fine with the 50 series.
Activity
pcanas commentedon Jul 16, 2025
It would be great if we could update monai in order to support Pytorch >= 2.6. Is this plan anytime soon?
ericspod commentedon Jul 24, 2025
MONAI has now been updated to support 2.7. @unumbrela thanks for looking into this, if there's anything that needs to be changed to support 2.8 please do make a PR and we'll consider it. 2.8 will be released soon and we want to support it then, though we lack 50 series hardware for testing purposes.
ogencoglu commentedon Aug 23, 2025
Any updates to support newer torch versions?
uvgives:Because monai==1.5.0 depends on torch>=2.4.1,<2.7.0jamesobutler commentedon Sep 5, 2025
With cafc1fe adding PyTorch 2.8 support @ericspod will there soon be a new published monai version to PyPI to then be able to use PyTorch 2.7 and 2.8?
ericspod commentedon Sep 12, 2025
Yes, we plan on a release soon to include support along with a number of fixes.
garciadias commentedon Sep 19, 2025
I can confirm that installing the
monai-weeklysolves the problem and works well withuvinstallations.I did not observe any issues, but I will run further tests today. monai-weekly
garciadias commentedon Sep 19, 2025
Hi @ericspod,
I further tested this by using docker image nvcr.io/nvidia/pytorch:25.08-py3 .
To do that, I run the
./runtests.sh -u -qinside the container using themainbranch and branch6327a86, which I believe is the version deployed at monai-weekly (please confirm).These are the results:
results_weekly.txt
results_main.txt
results_weekly_net.txt
Basically, the tests fail with monai 1.5.0, and most of the tests pass with monai-weekly. There are a couple of issues with the former as well, but I don't think they are critical.
Please, let me know if you want me to run any other tests.
ericspod commentedon Sep 19, 2025
Thanks @garciadias! The hash for weekly was probably b5bc69d but yours is close enough. I think we're sure enough that it's working with 50 series now. We'll return the question of testing hardware later.
garciadias commentedon Sep 19, 2025
Thank you, @ericspod . I will try that and use --net --coverage and let you know.
garciadias commentedon Sep 20, 2025
I added the report to my previous comment. There are some errors, but nothing seems to be related to GPU, CUDA, or Torch.
I observed many tests running with substantial GPU load. So, yes, I think
monai-weeklyis working fine with the 50 series.ericspod commentedon Sep 26, 2025
With the release of MONAI 1.5.1 I think we can close this issue as addressed.