Skip to content

Commit 37ea301

Browse files
sorryhorizonbrycelelbach
authored andcommitted
Fix formatting issues in CuPy documentation
When I was reading python gpu, I found some strange document formats in it, so I fixed it.
1 parent cb0aa6d commit 37ea301

File tree

1 file changed

+9
-21
lines changed

1 file changed

+9
-21
lines changed

Accelerated_Python_User_Guide/notebooks/Chapter_04_Scientific_Computing_with_CuPy.ipynb

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,44 +23,32 @@
2323
"## CuPy Basics\n",
2424
"\n",
2525
"CuPy is a NumPy/SciPy-compatible array library for GPU-accelerated computing with\n",
26-
" Python. CuPy acts as a drop-in replacement to run existing NumPy/SciPy code on N\n",
27-
"VIDIA CUDA or AMD ROCm platforms.\n",
26+
" Python. CuPy acts as a drop-in replacement to run existing NumPy/SciPy code on NVIDIA CUDA or AMD ROCm platforms.\n",
2827
"\n",
29-
"CuPy provides a multidimensional array, sparse matrices, and the associated routi\n",
30-
"nes for GPU devices, all having the same API as NumPy and SciPy.\n",
28+
"CuPy provides a multidimensional array, sparse matrices, and the associated routines for GPU devices, all having the same API as NumPy and SciPy.\n",
3129
"\n",
32-
"The goal of the CuPy project is to provide Python users GPU acceleration capabili\n",
33-
"ties, without the in-depth knowledge of underlying GPU technologies. The CuPy tea\n",
34-
"m focuses on providing:\n",
35-
"- A complete NumPy and SciPy API coverage to become a full drop-in replacement, a\n",
36-
"s well as advanced CUDA features to maximize the performance.\n",
37-
"- Mature and quality library as a fundamental package for all projects needing ac\n",
38-
"celeration, from a lab environment to a large-scale cluster.\n",
30+
"The goal of the CuPy project is to provide Python users GPU acceleration capabilities, without the in-depth knowledge of underlying GPU technologies. The CuPy team focuses on providing:\n",
31+
"- A complete NumPy and SciPy API coverage to become a full drop-in replacement, as well as advanced CUDA features to maximize the performance.\n",
32+
"- Mature and quality library as a fundamental package for all projects needing acceleration, from a lab environment to a large-scale cluster.\n",
3933
"\n",
4034
"### The N-Dimensional Array / Cupy.ndarray data structure\n",
4135
"\n",
4236
"The `cupy.ndarray` is the CuPy counterpart of NumPy `numpy.ndarray`. It provides \n",
4337
"an intuitive interface for a fixed-size multidimensional array which resides in a\n",
4438
" CUDA device. \n",
4539
"\n",
46-
"This class implements a subset of methods of numpy.ndarray. The difference is tha\n",
47-
"t this class allocates the array content on the current GPU device.\n",
40+
"This class implements a subset of methods of numpy.ndarray. The difference is that this class allocates the array content on the current GPU device.\n",
4841
"\n",
4942
"### Memory Management\n",
5043
"\n",
51-
"CuPy uses a memory pool for memory allocation by default. The memory pool signif\n",
52-
"icantly improves the performance by mitigating the overhead of memory allocation \n",
44+
"CuPy uses a memory pool for memory allocation by default. The memory pool significantly improves the performance by mitigating the overhead of memory allocation \n",
5345
"and CPU/GPU synchronization.\n",
5446
"\n",
5547
"There are two different memory pools in CuPy:\n",
5648
"- Device (GPU) memory pool - Used for GPU memory allocation.\n",
57-
"- Pinned (CPU) memory pool - Non-swappable memory used during CPU-to-GPU data tra\n",
58-
"nsfer.\n",
49+
"- Pinned (CPU) memory pool - Non-swappable memory used during CPU-to-GPU data transfer.\n",
5950
"\n",
60-
"In most cases, CuPy users do not need to be aware of the specifics of memory allo\n",
61-
"cation and deallocation, but it’s important to understand this optimization withi\n",
62-
"n CuPy in order to benchmark your application’s performance. You may not see mem\n",
63-
"ory completely deallocated due to caching in the memory pool.\n",
51+
"In most cases, CuPy users do not need to be aware of the specifics of memory allocation and deallocation, but it’s important to understand this optimization within CuPy in order to benchmark your application’s performance. You may not see memory completely deallocated due to caching in the memory pool.\n",
6452
"\n",
6553
"CuPy provides both a high-level API to control this memory as well as a low-level API to CUDA memory management functions. \n",
6654
"\n",

0 commit comments

Comments
 (0)