Project-MONAI / Project-MONAI/MONAI

Make Transforms smarter when device memory is not enough to fit in

Open
#6,916 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature request
Dominant language
Python
Stars
8.7k
Forks
1.6k
Avg merge
5d 1h
Merged PRs (30d)
20

Description

We can make our transforms smarter to decide if input (image) fits into the available device.
Every device comes with a max memory size.

If I have an image which doesn't fit into the GPU then I would rather run it on CPU.
Some of transforms can help to determine if we need to fallback or can continue to run on GPU.

In many cases, users see OOM because at some transform it fails due to input not able to fit enough into the available device/GPU.
Then for that sample he either has to pick a new device with larger memory or have to disable gpu

We need an auto-fallback feature in very simple cases.
(As first step, I am even ok if do based on max memory size of device vs current available memory)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by locating the transform implementations and the existing device-selection and memory-handling logic, then clarify which simple cases should fall back from GPU to CPU and how completion will be verified without out-of-memory failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.