Skip to content

Commit 7f945d2

Browse files
authored
docs: RNTuple GPU reading (#1595)
* Added documenation on using GPU reading of RNTuple data. * Update KVIKIO_NTHREADS to num_threads in docs
1 parent 4f9d4fd commit 7f945d2

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs-sphinx/basic.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -965,6 +965,28 @@ Note that for the last input we used the ``filter_field`` argument instead of ``
965965
966966
There are still significant work required to achieve feature-parity with TTrees, but all the basic functionality is already implemented. We will continue to make the transition to RNTuples as seamless as possible.
967967
968+
GPU reading with CUDA support
969+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
970+
Uproot supports GPU-based reading and processing of payload data on CUDA-capable GPUs for CUDA major versions 12 and 13. On systems that support GPU Direct Storage (GDS), raw payload data can be transferred directly from storage into GPU memory without a CPU bounce buffer. File metadata is still read by the CPU in both cases. GPU reading over HTTP is not supported.
971+
972+
For GPU reading of RNTuple data, the values ``backend="cuda"`` and ``interpreter="gpu"`` must be passed to ``RNTuple.arrays()``.
973+
974+
.. code-block:: python
975+
976+
>>> rntuple = uproot.open("ntpl001_staff_rntuple_v1-0-0-0.root:Staff")
977+
>>> rntuple["Age"].array(backend="cuda", interpreter="gpu")
978+
<Array [58, 63, 56, 61, 52, 60, ..., 51, 25, 35, 28, 43] type='3354 * int32'>
979+
>>> rntuple.arrays(["Age", "Cost", "Nation"], backend="cuda", interpreter="gpu")
980+
<Array [{Age: 58, Cost: 11975, ...}, ...] type='3354 * {Age: int32, Cost: i...'>
981+
982+
Uproot uses the ``kvikio`` library to perform GPU-efficient I/O using CuFile and POSIX APIs. ``kvikio`` provides runtime settings that can be configured, documented `here <https://docs.rapids.ai/api/kvikio/stable/runtime_settings/#>`__.
983+
984+
By default, ``KVIKIO_NTHREADS`` is 1. Increasing this value can improve I/O performance by allowing multiple threads to perform I/O concurrently (up to a system-dependent limit).
985+
986+
.. code-block:: python
987+
988+
>>> kvikio.defaults.set({"num_threads": 5})
989+
968990
Opening a file for writing
969991
--------------------------
970992

0 commit comments

Comments
 (0)