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

Make Monai (Random) Transforms work in a multi-threaded environment #7582

Open
johnzielke opened this issue Mar 26, 2024 · 0 comments
Open
Labels
enhancement New feature or request Feature request

Comments

@johnzielke
Copy link
Contributor

johnzielke commented Mar 26, 2024

With PEP 703 being accepted and implementation of it underway python/cpython#108219 I think it would be great to prepare the Monai transforms early for execution on multiple threads. Especially with the large tensor sizes and the advantages of running transforms on GPU, I'm hoping for free-threading to have a big benefit in (3D) medical imaging AI.

I think the biggest issue here would be the Randomizable transforms, which currently can't be executed inside a threaded environment.

AFAIK, the free-threading is pushed by Meta, and I'm therefore expecting pytorch to be compatible with it relatively early, since one of the talks on no-gil python talked about testing it with a pytorch DL project internally at Meta.

This might be a great opportunity to work on #6854 as well, which might eventually require breaking changes in the Randomizable API as well.

@johnzielke johnzielke changed the title Make Monai (Random) Transform work in a multi-threaded environment Make Monai (Random) Transforms work in a multi-threaded environment Mar 27, 2024
@KumoLiu KumoLiu added enhancement New feature or request Feature request labels Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Feature request
Projects
None yet
Development

No branches or pull requests

2 participants