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
Is your feature request related to a problem? Please describe.
PyTorch's DataLoader class is used in many DeepLearning training applications to load training data and pre-process the data, before feeding to AI model.
Since PyTorch's DataLoader is running in multi-processes, it is hard to use cuCIM's scikit-image APIs (which makes use of CUDA) in the pre-transformations of the DataLoader due to CUDA context issues.
It would be nice to provide a way/example to use cuCIM with DeepLearning Frameworks such as PyTorch.
Describe the solution you'd like
PyTorch's DataLoader works like this. It would be nice if we have a PyTorch's DataLoader-like utility class in Dask that mimics Pytorch's DataLoader behavior but implemented with Dask (dask-cuda) for the parallelization of data loading (so providing a generator/iterator that gives a batch of processed image data).
Describe alternatives you've considered
To use cuCIM in the training pipeline, we currently move GPU-accelerated pre-transforms from PyTorch DataLoader's transformation(using Compose) to the main thread (place GPU-based batch pre-transformation right before feeding to the AI model, and right after getting CPU-loaded/pre-transformed training data by DataLoader.), to avoid CUDA context issues.
It would be good if we also provide an example with that approach.
NVTabular's pytorch dataloader (which is built on Dask) may be agood reference here. I'll be happy to help advise on this work and clarify what NVTabular is (and isn't) doing.
Unfortunately, I have come across some issues with the cuCIM codebase that are blocking this Dask-based DataLoading solution.
For example, while the array transformation in the cuCIM transform image_rotate_90() should be compatible with a Dask Array input, there is an explicit Type-Check here that throws a TypeError whenever trying to apply cuCIM transforms to a Dask Array.
In order to allow Dask to schedule cuCIM operations - we will likely want to make this "check" more of a duck-type check, that checks for the necessary API interface, as Dask Arrays should be able to pass those checks.
Is your feature request related to a problem? Please describe.
PyTorch's DataLoader class is used in many DeepLearning training applications to load training data and pre-process the data, before feeding to AI model.
Since PyTorch's DataLoader is running in multi-processes, it is hard to use cuCIM's scikit-image APIs (which makes use of CUDA) in the pre-transformations of the DataLoader due to CUDA context issues.
It would be nice to provide a way/example to use cuCIM with DeepLearning Frameworks such as PyTorch.
Describe the solution you'd like
PyTorch's DataLoader works like this. It would be nice if we have a PyTorch's DataLoader-like utility class in Dask that mimics Pytorch's DataLoader behavior but implemented with Dask (dask-cuda) for the parallelization of data loading (so providing a generator/iterator that gives a batch of processed image data).
Describe alternatives you've considered
Additional context
Relevant information regarding CuPy+PyTorch.
With Numba to get cuda context.
The text was updated successfully, but these errors were encountered: