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

Support for GPUDirectStorage #1630

Open
gdkrmr opened this issue Oct 18, 2022 · 11 comments
Open

Support for GPUDirectStorage #1630

gdkrmr opened this issue Oct 18, 2022 · 11 comments
Labels
cuda libraries Stuff about CUDA library wrappers. enhancement New feature or request help wanted Extra attention is needed

Comments

@gdkrmr
Copy link

gdkrmr commented Oct 18, 2022

We are using compressed disk array storage (Zarr.jl [1]). In Python there is kvikIO [2], which allows loading Zarr arrays directly into GPU memory. There are two steps, one is loading a chunk of the Zarr array into memory and the second one is to decompress it.

What would it take to implement this in Julia?

@Sonicious @meggart @felixcremer

[1] https://github.com/JuliaIO/Zarr.jl
[2] https://docs.rapids.ai/api/kvikio/stable/

@gdkrmr gdkrmr added the enhancement New feature or request label Oct 18, 2022
@maleadt
Copy link
Member

maleadt commented Oct 19, 2022

What would it take to implement this in Julia?

I don't know, it was never clear to me what exactly consists the GPUDirectStorage APIs or libraries. I did have a look at cuFile, #1235, but it was completely unusable (requiring an extremely peculiar software setup down to specific OS versions and filesystem mount options) so I didn't continue that effort.

@gdkrmr
Copy link
Author

gdkrmr commented Oct 19, 2022

Microsoft included this into DIrectX recently, so I thought this would be easier. Thanks for the info!

@maleadt maleadt added help wanted Extra attention is needed cuda libraries Stuff about CUDA library wrappers. labels Oct 19, 2022
@gitsd
Copy link

gitsd commented Oct 19, 2022

you can do integration and testing without requiring MOFED.

@jakirkham
Copy link

FWIW KvikIO also has a C++ layer. It also has fallbacks if run on a system that doesn't support GDS. So maybe that would be an easier entry point.

cc @madsbk

@madsbk
Copy link

madsbk commented Oct 24, 2022

Yes, please let's know if you need any help with KvikIO.
The C++ API is header-only and only requires the CUDA Toolkit installed.
I guess the first step would be to implement Julia bindings?

@maleadt
Copy link
Member

maleadt commented Oct 24, 2022

@madsbk Do you have a pointer to the API docs?
Julia only really supports C APIs though, C++ FFI isn't great.

@madsbk
Copy link

madsbk commented Oct 24, 2022

The API docs and a C++ example.
What about using something like https://github.com/JuliaInterop/CxxWrap.jl?

@maleadt
Copy link
Member

maleadt commented Oct 24, 2022

The API docs and a C++ example.

I didn't mean the Python/RAPIDS API, but the underlying CUDA one. So I guess this is built on top of cuFile?

@madsbk
Copy link

madsbk commented Oct 24, 2022

Yes, KvikIO is built on top of cuFile and will work even on systems that doesn't support or have cuFile installed.

cuFile doc: https://docs.nvidia.com/gpudirect-storage/api-reference-guide/index.html

@maleadt maleadt changed the title GPUDirectStorage Support for GPUDirectStorage Oct 26, 2022
@maleadt
Copy link
Member

maleadt commented Oct 26, 2022

cuFile supposedly also doesn't need a compatible set-up and should just work.

In any case, there's already a proof-of-concept in #1235, so that should be easy for anybody to pick up. I probably won't; this is very low on my TODO list, in part because I never managed to set-up GDS on my workstation (Arch Linux).

Support for KvikIO is much harder (since it requires C++), and doesn't need to happen in CUDA.jl, but can just live in an external package instead.

@Moelf
Copy link

Moelf commented Feb 28, 2023

this could be very useful, for our use case, we need something that can load bytes onto GPU directly given (file handler, offset, N bytes), which should be the most basic API?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda libraries Stuff about CUDA library wrappers. enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants