forked from zarr-developers/zarr-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into return-scalar-for-zero-dim-indexing
# Conflicts: # src/zarr/api/synchronous.py
- Loading branch information
Showing
37 changed files
with
958 additions
and
555 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
.. _user-guide-gpu: | ||
|
||
Using GPUs with Zarr | ||
==================== | ||
|
||
Zarr can use GPUs to accelerate your workload by running | ||
:meth:`zarr.config.enable_gpu`. | ||
|
||
.. note:: | ||
|
||
`zarr-python` currently supports reading the ndarray data into device (GPU) | ||
memory as the final stage of the codec pipeline. Data will still be read into | ||
or copied to host (CPU) memory for encoding and decoding. | ||
|
||
In the future, codecs will be available compressing and decompressing data on | ||
the GPU, avoiding the need to move data between the host and device for | ||
compression and decompression. | ||
|
||
Reading data into device memory | ||
------------------------------- | ||
|
||
:meth:`zarr.config.enable_gpu` configures Zarr to use GPU memory for the data | ||
buffers used internally by Zarr. | ||
|
||
.. code-block:: python | ||
>>> import zarr | ||
>>> import cupy as cp # doctest: +SKIP | ||
>>> zarr.config.enable_gpu() # doctest: +SKIP | ||
>>> store = zarr.storage.MemoryStore() # doctest: +SKIP | ||
>>> z = zarr.create_array( # doctest: +SKIP | ||
... store=store, shape=(100, 100), chunks=(10, 10), dtype="float32", | ||
... ) | ||
>>> type(z[:10, :10]) # doctest: +SKIP | ||
cupy.ndarray | ||
Note that the output type is a ``cupy.ndarray`` rather than a NumPy array. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ Advanced Topics | |
performance | ||
consolidated_metadata | ||
extending | ||
gpu | ||
|
||
|
||
.. Coming soon | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.