Skip to content

Commit eedb7e1

Browse files
marcinzmanopapad
andcommitted
Documentation improvements (#502)
* Initial pass * todos.rst * Address comments * Fix warnings * Update product positioning * Add supported platform info * Move all Jupyter instructions to Legate * more warnings * Remove todos --------- Co-authored-by: Manolis Papadakis <[email protected]>
1 parent 2bfdac2 commit eedb7e1

File tree

13 files changed

+38
-146
lines changed

13 files changed

+38
-146
lines changed

cupynumeric/_array/array.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ def flat(self) -> np.flatiter[npt.NDArray[Any]]:
416416
flatten : Return a copy of the array collapsed into one dimension.
417417
418418
Availability
419-
--------
419+
------------
420420
Single CPU
421421
422422
"""

cupynumeric/_ufunc/ufunc.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
numpy.{}
8080
8181
Availability
82-
--------
82+
------------
8383
Multiple GPUs, Multiple CPUs
8484
"""
8585

@@ -117,7 +117,7 @@
117117
numpy.{}
118118
119119
Availability
120-
--------
120+
------------
121121
Multiple GPUs, Multiple CPUs
122122
"""
123123

@@ -155,7 +155,7 @@
155155
numpy.{}
156156
157157
Availability
158-
--------
158+
------------
159159
Multiple GPUs, Multiple CPUs
160160
"""
161161

cupynumeric/fft/fft.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def fft(
104104
numpy.fft.fft
105105
106106
Availability
107-
--------
107+
------------
108108
Multiple GPUs
109109
"""
110110
s = (n,) if n is not None else None

cupynumeric/random/_bitgenerator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __init__(
5353
numpy.random.BitGenerator
5454
5555
Availability
56-
--------
56+
------------
5757
Multiple GPUs, Multiple CPUs
5858
"""
5959
if type(self) is BitGenerator:

cupynumeric/random/_generator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def __init__(self, bit_generator: BitGenerator) -> None:
5757
default_rng : Recommended constructor for `Generator`.
5858
5959
Availability
60-
--------
60+
------------
6161
Multiple GPUs, Multiple CPUs
6262
6363
"""

docs/cupynumeric/source/api/comparison.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ A dot in the cupynumeric column denotes that cuPyNumeric implementation
77
is not provided yet. We welcome contributions for these functions.
88

99
NumPy vs cuPyNumeric APIs
10-
-----------------------
10+
-------------------------
1111

1212
.. comparison-table::

docs/cupynumeric/source/examples/torchswe.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"id": "5be6c57b-7cae-4fc1-b78f-899becabc6ee",
66
"metadata": {},
77
"source": [
8-
"<h1>TorchSWE case study</h1>\n",
8+
"# TorchSWE case study\n",
99
"\n",
1010
"\n",
1111
"[TorchSWE](https://github.com/piyueh/TorchSWE) is a shallow-water solver created by Dr. Pi-Yueh Chuang and Prof. Lorena Barba that solves the vertically averaged Navier-Stokes equations using MPI and CuPy. It can simulate free-surface water flow in rivers, channels, and coastal areas, as well as model flood inundation. Given a topography, TorchSWE can predict flood-prone areas and the height of water inundation, making it a valuable tool for risk mapping.\n",

docs/cupynumeric/source/faqs.rst

+13-16
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Legate offers three different task variants: CPU, OMP, and GPU. A task variant
1111
determines the type of processor Legate chooses to perform the computations.
1212

1313
What is the difference between Legate and cuPyNumeric?
14-
----------------------------------------------------
14+
------------------------------------------------------
1515

1616
Legate is a task-based runtime software stack that enables development of
1717
scalable and composable libraries for distributed and accelerated computing.
@@ -101,14 +101,13 @@ How to handle Out-Of-Memory errors?
101101

102102
.. code-block:: text
103103
104-
[0 - 7fb9fc426000] 0.985000 {5}{cupynumeric.mapper}: Mapper cupynumeric on Node 0 failed to allocate 144000000 bytes on memory 1e00000000000000 (of kind SYSTEM_MEM: Visible to all processors on a node) for region requirement 1 of Task cupynumeric::WhereTask[./script.py:90] (UID 39).
104+
[0 - 7fda18f26000] 0.805182 {5}{cunumeric.mapper}: Failed to allocate 8388608 bytes on memory 1e00000000000000 (of kind SYSTEM_MEM) for region requirement(s) 1 of Task cupynumeric::BinaryOpTask[oom.py:24] (UID 18)
105105
106106
The above error indicates that the application ran out of memory during
107107
execution. More granular details on the type of memory, the task that triggered
108-
the error are provided in the error message, but this usually indicates that
109-
resources (add more cores/threads/ GPUs, or increase the amount of system
110-
memory or framebuffer memory) or decrease the problem size and confirm that you
111-
are able to run the program to completion.
108+
the error, and what was using up the available memory are provided in the error
109+
message. If possible, try increasing the amount of system memory or framebuffer
110+
memory allocated to the program, or decrease the problem size.
112111

113112
Reducing the ``--eager-alloc-percentage`` to, say, 10 or less can also help
114113
since this reduces the amount of available memory available to the eager memory
@@ -151,7 +150,7 @@ Check out the :ref:`benchmarking` section for information on how to accurately
151150
measure cuPyNumeric execution.
152151

153152
Why is cuPyNumeric slower than NumPy on my laptop?
154-
------------------------------------------------
153+
--------------------------------------------------
155154

156155
For small problem sizes, cuPyNumeric might be slower than NumPy. We suggest you
157156
increase the problem size and correspondingly increase the resources needed
@@ -169,7 +168,7 @@ performance :ref:`practices`.
169168
How do I use Jupyter Notebooks?
170169
-------------------------------
171170

172-
Notebooks are useful for experimentation and evaluation on a single node.
171+
See https://docs.nvidia.com/legate/latest/jupyter.html.
173172

174173
How to pass Legion and Realm arguments?
175174
---------------------------------------
@@ -191,19 +190,17 @@ What are the defaults?
191190
The default values for several input arguments to Legate are mentioned in
192191
Legate's documentation.
193192

194-
Are there resources where I can read more about Legate?
195-
-------------------------------------------------------
193+
Where I can read more about cuPyNumeric?
194+
----------------------------------------
196195

197196
Check out this `blog post <https://developer.nvidia.com/blog/accelerating-python-applications-with-cupynumeric-and-legate/>`_
197+
or this `tutorial <https://github.com/NVIDIA/accelerated-computing-hub/blob/main/Accelerated_Python_User_Guide/notebooks/Chapter_X_Distributed_Computing_cuPyNumeric.ipynb>`_
198198
to learn more about cuPyNumeric.
199199

200-
Technical questions?
201-
--------------------
200+
Questions?
201+
----------
202202

203203
For technical questions about cuPyNumeric and Legate-based tools, please visit
204204
the `community discussion forum <https://github.com/nv-legate/discussion>`_.
205205

206-
Other questions?
207-
----------------
208-
209-
Follow us on `GitHub <https://github.com/nv-legate>`_ or reach out to us there.
206+
If you have other questions, please contact us at *[email protected]*.

docs/cupynumeric/source/index.rst

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
:html_theme.sidebar_secondary.remove:
22

33
NVIDIA cuPyNumeric
4-
================
4+
==================
55

6-
cuPyNumeric is a `Legate`_ library that aims to provide a distributed and
7-
accelerated drop-in replacement for the `NumPy API`_ on top of the `Legion`_
8-
runtime.
6+
With cuPyNumeric you can write code productively in Python, using the familiar
7+
`NumPy API`_, and have your program scale with no code changes from single-CPU
8+
computers to multi-node-multi-GPU clusters.
99

10-
Using cuPyNumeric you do things like run the final example of the
11-
`Python CFD course`_ completely unmodified on 2048 A100 GPUs in a
12-
`DGX SuperPOD`_ and achieve good weak scaling.
10+
For example, you can run the final example of the `Python CFD course`_
11+
completely unmodified on 2048 A100 GPUs in a `DGX SuperPOD`_ and achieve
12+
good weak scaling.
1313

1414
.. toctree::
1515
:maxdepth: 1
@@ -30,7 +30,5 @@ Indices and tables
3030
* :ref:`search`
3131

3232
.. _DGX SuperPOD: https://www.nvidia.com/en-us/data-center/dgx-superpod/
33-
.. _Legate: https://github.com/nv-legate/legate.core
34-
.. _Legion: https://legion.stanford.edu/
3533
.. _Numpy API: https://numpy.org/doc/stable/reference/
3634
.. _Python CFD course: https://github.com/barbagroup/CFDPython/blob/master/lessons/15_Step_12.ipynb

docs/cupynumeric/source/installation.rst

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ Installation
44
Default conda install
55
---------------------
66

7+
cuPyNumeric supports the
8+
`same platforms as Legate <https://docs.nvidia.com/legate/latest/installation.html#support-matrix>`_.
9+
710
cuPyNumeric is available from
811
`conda <https://docs.conda.io/projects/conda/en/latest/index.html>`_
912
on the `legate channel <https://anaconda.org/legate/cupynumeric>`_.
@@ -33,7 +36,9 @@ environment, use environment variable ``CONDA_OVERRIDE_CUDA``:
3336
conda install -c conda-forge -c legate cupynumeric
3437
3538
Once installed, you can verify the installation by running one of the examples
36-
from the cuPyNumeric repository, for instance:
39+
from the
40+
`cuPyNumeric repository <https://github.com/nv-legate/cunumeric/tree/HEAD/examples>`_,
41+
for instance:
3742

3843
.. code-block:: sh
3944

docs/cupynumeric/source/user/howtos/index.rst

-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ Howtos
66

77
measuring
88
benchmarking
9-
jupyter
109
patching

docs/cupynumeric/source/user/howtos/jupyter.rst

-107
This file was deleted.

docs/cupynumeric/source/user/practices.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ etc.) is noted in the docstring of the API. This would be useful to know while
1717
designing the application since it can impact the scalability.
1818

1919
Guidelines on using cuPyNumeric APIs
20-
----------------------------------
20+
------------------------------------
2121

2222
Use cuPyNumeric or NumPy arrays, AVOID native lists
23-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2424

2525
Create a cuPyNumeric array from data structures native to Python like lists,
2626
tuples, etc., and operate on the cuPyNumeric array, as shown in the example
@@ -232,7 +232,7 @@ Faster I/O Routines
232232
As of 23.07, we recommend using `h5py <https://github.com/h5py/h5py>`_ to perform I/O.
233233

234234
Guidelines on designing cuPyNumeric applications
235-
----------------------------------------------
235+
------------------------------------------------
236236

237237
Use output arguments to reduce memory allocation
238238
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)