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

Multi-GPU setup and python/zarr api #651

Open
merrysailor opened this issue Feb 27, 2025 · 0 comments
Open

Multi-GPU setup and python/zarr api #651

merrysailor opened this issue Feb 27, 2025 · 0 comments

Comments

@merrysailor
Copy link

Hi,

First, the project is excellent, very helpful even in my setup which uses the posix fallback.

Second, I want to highlight that having a zarr decompress directly to the desired device_id is a bit baroque, as the device_ordinal used during compression is used by default unless overwritten explicitly:

zarr.open_array(
    kvikio.zarr.GDSStore(
        path=f,
        decompressor_config_overwrite=kvikio.zarr.Snappy(device_ordinal=1).get_config()
    ),
    mode='r',
    meta_array=cupy.empty(()),
)[...]

Btw, I confirm that with the above the cupy array ends up in the correct device. But wanted to double check that indeed the above works as expected all the way, i.e., the compressed data move and decompression indeed happen on the specified device?

Third, the above fails when multiple python threads are involved. Not familiar with CUDA, but appears that streams are thread specific? When trying to use the above in a multi-threaded setup (have a threaded data loader):

File "libnvcomp.pyx", line 246, in kvikio._lib.libnvcomp._SnappyManager.__cinit__
RuntimeError: nvCOMP error: Stream 0 is not associated with device 1

Thank you.

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

No branches or pull requests

1 participant