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

enable gpu load nifti #8188

Merged

Conversation

yiheng-wang-nv
Copy link
Contributor

@yiheng-wang-nv yiheng-wang-nv commented Nov 2, 2024

Related to #8241 .

Description

A few sentences describing the changes proposed in this pull request.

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

Signed-off-by: Yiheng Wang <[email protected]>
Signed-off-by: Yiheng Wang <[email protected]>
@yiheng-wang-nv yiheng-wang-nv force-pushed the add-gds-support-on-niftireader branch from ed1de7e to ca1cfb8 Compare November 2, 2024 00:35
pre-commit-ci bot and others added 8 commits November 2, 2024 00:35
Signed-off-by: Yiheng Wang <[email protected]>
Signed-off-by: Yiheng Wang <[email protected]>
Signed-off-by: Yiheng Wang <[email protected]>
Signed-off-by: Yiheng Wang <[email protected]>
Signed-off-by: Yiheng Wang <[email protected]>
Signed-off-by: Yiheng Wang <[email protected]>
Signed-off-by: Yiheng Wang <[email protected]>
@yiheng-wang-nv
Copy link
Contributor Author

related topic in: nipy/nibabel#1385

Will modify my draft PR accordingly.

@yiheng-wang-nv yiheng-wang-nv marked this pull request as ready for review December 13, 2024 06:20
Signed-off-by: Yiheng Wang <[email protected]>
@KumoLiu
Copy link
Contributor

KumoLiu commented Dec 13, 2024

Thank you for your contribution!

I have a question about this enhancement: Will it load NIfTI/DICOM files to the GPU faster compared to caching all the data on the GPU? If not, does this option use less GPU memory since the metadata is stored on the CPU? Thanks.

@yiheng-wang-nv
Copy link
Contributor Author

yiheng-wang-nv commented Dec 13, 2024

Thank you for your contribution!

I have a question about this enhancement: Will it load NIfTI/DICOM files to the GPU faster compared to caching all the data on the GPU? If not, does this option use less GPU memory since the metadata is stored on the CPU? Thanks.

Hi @KumoLiu , these are two different things. The enhanced reader can load nii images from disk to GPU directly (the old way is to load from disk to cpu, and then convert from cpu to gpu), and the loaded data can do other things, like cache as you mentioned.

@yiheng-wang-nv
Copy link
Contributor Author

Hi @KumoLiu , do you know what is the root cause of the doc error: https://github.com/Project-MONAI/MONAI/actions/runs/12311294929/job/34361260922?pr=8188#step:7:247
cupy and kvikio are only imported optionally, I'm not sure why we have the error. Do I need to modify some other places?

@KumoLiu
Copy link
Contributor

KumoLiu commented Dec 13, 2024

Hi @KumoLiu , do you know what is the root cause of the doc error: https://github.com/Project-MONAI/MONAI/actions/runs/12311294929/job/34361260922?pr=8188#step:7:247 cupy and kvikio are only imported optionally, I'm not sure why we have the error. Do I need to modify some other places?

Yes, you may need include cupy here: https://github.com/Project-MONAI/MONAI/blob/dev/docs/requirements.txt

monai/data/image_reader.py Show resolved Hide resolved
monai/data/image_reader.py Show resolved Hide resolved
yiheng-wang-nv and others added 4 commits December 16, 2024 15:08
Co-authored-by: Eric Kerfoot <[email protected]>
Signed-off-by: Yiheng Wang <[email protected]>
Signed-off-by: Yiheng Wang <[email protected]>
Signed-off-by: Yiheng Wang <[email protected]>
Signed-off-by: Yiheng Wang <[email protected]>
yiheng-wang-nv and others added 4 commits December 19, 2024 12:44
Co-authored-by: Eric Kerfoot <[email protected]>
Signed-off-by: Yiheng Wang <[email protected]>
Co-authored-by: Eric Kerfoot <[email protected]>
Signed-off-by: Yiheng Wang <[email protected]>
Co-authored-by: Eric Kerfoot <[email protected]>
Signed-off-by: Yiheng Wang <[email protected]>
@KumoLiu
Copy link
Contributor

KumoLiu commented Dec 19, 2024

/build

monai/data/meta_tensor.py Outdated Show resolved Hide resolved
@KumoLiu
Copy link
Contributor

KumoLiu commented Dec 21, 2024

/build

@KumoLiu KumoLiu merged commit d36f0c8 into Project-MONAI:dev Dec 23, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants