Skip to content

Commit 5a54352

Browse files
authored
Merge pull request #83 from AdaCore/review_tutorial
Review tutorial
2 parents 0b14610 + cc8570e commit 5a54352

File tree

6 files changed

+9
-7
lines changed

6 files changed

+9
-7
lines changed

doc/tutorial.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Some Expensive Computation
88
Remember that before compiling any you will need to have sourced env.sh
99
in your environment::
1010

11-
Open the cuda/tutorial directory under your CUDA application. You will see
11+
Open the ``tutorial`` directory found at the root of this CUDA repository. You will see
1212
there a typical CUDA project structure. In particular, ``device.gpr`` will build
1313
the code running on the device, ``host.gpr`` the code on the host. The Makefile
1414
is responsible to build both project, note that it's using the standard Makefile.build
@@ -17,7 +17,7 @@ structure. If you open cuda/Makefile.build, you'll see both build commands:
1717
.. code-block:: Makefile
1818
1919
gprbuild -Xcuda_host=$(CUDA_HOST) -P device
20-
gprbuild -Xcuda_host=$(CUDA_HOST) -P host -largs $(CURDIR)/lib/*.fatbin.o
20+
gprbuild -Xcuda_host=$(CUDA_HOST) -P host -largs $(CURDIR)/lib/*.fatbin.o
2121
2222
The argument ``-Xcuda_host=$(CUDA_HOST)`` is here to allow to build for cross
2323
platform such as ARM Linux. In this tutorial, we're only going to build for native
@@ -124,7 +124,7 @@ of the function:
124124
This kernel will be be called in parallel, once per index in the array to
125125
compute. Within a kernel, it's possible to index a given call using the
126126
thread number (``Thread_IDx``) and the block number (``Block_IDx``). You
127-
can also retreive the number of thread in a block that have been scheduled
127+
can also retrieve the number of thread in a block that have been scheduled
128128
(``Block_Dim``) and the number of blocks in the grid (``Grid_Dim``). These
129129
are 3 dimension values, indexed by x, y and z. In this example, we're only
130130
going to use the x dimension.
@@ -183,7 +183,7 @@ additional cost of device computation, this allocation will be taken into accoun
183183
in the total time reported. Indeed, data copy can be a critical limiting factor
184184
of GPU performance enhancements.
185185

186-
Indentify the portion of the body marked ``-- INSERT HERE DEVICE CALL``. Introduce
186+
Identify the portion of the body marked ``-- INSERT HERE DEVICE CALL``. Introduce
187187
here two array allocations and copies for H_A and H_B to D_A and D_B respectively.
188188
Also allocate one array to D_C to be the size of H_C:
189189

-798 KB
Binary file not shown.
-1.05 MB
Binary file not shown.
2.29 MB
Binary file not shown.
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
The noisy_lena.png image is only convenience for you to see. This demo imports/exports QOI image format only.
1+
The noisy_miners_bathing.qoi image is only convenience for you to see. This demo imports/exports QOI image format only.
22
To view such QOI image format, you can install any tool/plugin found here: https://github.com/phoboslab/qoi
3-
If you are in a rush, use this online viewer: https://floooh.github.io/qoiview/qoiview.html
3+
If you are in a rush, use this online viewer: https://floooh.github.io/qoiview/qoiview.html
4+
5+
source : https://en.wikipedia.org/wiki/File:Noisy_Miners_bathing.jpg

examples/image_filtering/src/host/main.adb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ exception
9999
when Msg : GLP.Bad_Command =>
100100
AIO.Put_Line (File => AIO.Standard_Error,
101101
Item => "Bad command line: " & E.Exception_Message (Msg));
102-
AIO.Put_Line ("Try: ./main in=./data/noisy_lena.qoi kernel=bilateral spatial_stdev=3.4 color_dist_stdev=100.0 device=gpu");
102+
AIO.Put_Line ("Try: ./main in=./data/noisy_miners_bathing.qoi kernel=bilateral spatial_stdev=8.0 color_dist_stdev=80.0 device=gpu");
103103
Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure);
104104
when I.Bad_filename =>
105105
AIO.Put_Line ("Input file does not exists.");

0 commit comments

Comments
 (0)