Skip to content

Implement batched GPU transforms #232

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

Open
ziw-liu opened this issue Mar 27, 2025 · 1 comment
Open

Implement batched GPU transforms #232

ziw-liu opened this issue Mar 27, 2025 · 1 comment
Labels
enhancement New feature or request representation Representation learning (SSL) translation Image translation (VS)
Milestone

Comments

@ziw-liu
Copy link
Collaborator

ziw-liu commented Mar 27, 2025

          > This might be because MONAI transforms are not batched (executed in a loop), and CPU/GPU sync could be taking much longer than the actual compute.

Benchmark of 3D random affine in 6a88ec4 (10 runs, milliseconds):

Device MONAI (sequential) Kornia (batched) Relative
Zen 2 CPU (1 thread) 9160 3800 2.4
Zen 2 CPU (16 threads) 7320 556 13.2
A40 GPU 2620 210 12.5

Originally posted by @ziw-liu in #218 (comment)

@ziw-liu
Copy link
Collaborator Author

ziw-liu commented Mar 27, 2025

See also Project-MONAI/MONAI#8302

@ziw-liu ziw-liu added enhancement New feature or request translation Image translation (VS) representation Representation learning (SSL) labels Mar 27, 2025
@ziw-liu ziw-liu added this to the v0.4.0 milestone Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request representation Representation learning (SSL) translation Image translation (VS)
Projects
None yet
Development

No branches or pull requests

1 participant