You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go to the folder \texttt{01\_compiling\_kokkos} and follow the instructions in the README file
626
+
Go to the folder \href{https://github.com/CExA-project/cexa-kokkos-tutorials/tree/main/exercises/01_compiling_kokkos}{01\_compiling\_kokkos} and follow the instructions in the README file
606
627
607
628
Goal of this Exercise:
608
629
\begin{itemize}
@@ -694,7 +715,7 @@ \section{Basic concepts of Kokkos}
694
715
695
716
\begin{itemize}
696
717
\item Kokkos propagates its compilation flags to your program
697
-
\item If Kokkos not detected in your paths, use the \texttt{Kokkos\_ROOT} CMake variable to specify the path to Kokkos
718
+
\item If Kokkos is not detected in your paths, use the \texttt{Kokkos\_ROOT} CMake variable to specify the path to Kokkos
698
719
\end{itemize}
699
720
700
721
\small
@@ -715,6 +736,8 @@ \section{Basic concepts of Kokkos}
Go to the folder \href{https://github.com/CExA-project/cexa-kokkos-tutorials/tree/main/exercises/02_first_program}{02\_first\_program} and follow the instructions in the README file
740
+
718
741
Goal of this Exercise:
719
742
720
743
\begin{itemize}
@@ -739,7 +762,7 @@ \section{Basic concepts of Kokkos}
739
762
\begin{itemize}
740
763
\item No need to allocate or deallocate memory by hand
741
764
\item Vendor-specific memory allocation is hidden
742
-
\itemunified semantic and portable memory management (CPU and GPU)
765
+
\itemUnified semantic and portable memory management (CPU and GPU)
@@ -840,7 +863,7 @@ \section{Basic concepts of Kokkos}
840
863
841
864
\begin{itemize}
842
865
\item A View lives in a specific memory space (Host or Device) not both
843
-
\item If Kokkos is compiled with \textbf{a CPU backend only}, the View data is allocated in the \textbf{Host memory} by defaults
866
+
\item If Kokkos is compiled with \highlight{a CPU backend only}, the View data is allocated in the \highlight{Host memory} by defaults
844
867
\end{itemize}
845
868
846
869
\centering
@@ -854,8 +877,8 @@ \section{Basic concepts of Kokkos}
854
877
\frametitle{Where does the data reside?}
855
878
856
879
\begin{itemize}
857
-
\item If Kokkos is compiled with a \textbf{GPU backend}, the View data is allocated in the \textbf{Device memory} by default
858
-
\item We will later how to allocate and copy data between the Host and the Device
880
+
\item If Kokkos is compiled with a \highlight{GPU backend}, the View data is allocated in the \highlight{Device memory} by default
881
+
\item We will later see how to allocate and copy data between the Host and the Device
859
882
\end{itemize}
860
883
861
884
\centering
@@ -876,7 +899,7 @@ \section{Basic concepts of Kokkos}
876
899
\item Allocations only happen when explicitly specified
877
900
\item Copy construction and assignment are shallow. So, you pass Views by value, not by reference. (Python like)
878
901
\item Reference counting is used for automatic deallocation (like shared pointers)
879
-
\item Metadata (rank, extend, etc) is however always accessible on the Host
902
+
\item Metadata (rank, extent, etc) is however always accessible on the Host
880
903
\end{itemize}
881
904
882
905
\begin{alertblock}{}
@@ -934,7 +957,7 @@ \section{Basic concepts of Kokkos}
934
957
\end{itemize}
935
958
936
959
\begin{block}{}
937
-
Go to the exercise \texttt{02\_basic\_view} and follow the instructions in the README file
960
+
Go to the exercise \href{https://github.com/CExA-project/cexa-kokkos-tutorials/tree/main/exercises/03_basic_view}{03\_basic\_view} and follow the instructions in the README file
938
961
\end{block}
939
962
940
963
\end{frame}
@@ -945,7 +968,7 @@ \section{Basic concepts of Kokkos}
945
968
\frametitle{Understand the notion of memory space}
946
969
947
970
\begin{itemize}
948
-
\item Kokkos provides an abstraction of where the data lives: the memory space
971
+
\item Kokkos provides an abstraction of where the data lives: \textbf{the memory space}
949
972
\item A View is always associated with a defined memory space (Host or Device for instance) at compilation time
950
973
\item Default behavior: View data is allocated in the Host memory space if no GPU backend is available, else in the Device memory space
951
974
\end{itemize}
@@ -957,7 +980,7 @@ \section{Basic concepts of Kokkos}
957
980
\frametitle{Understand the notion of memory space}
958
981
959
982
\begin{itemize}
960
-
\item Problem: how to deal with data residing in different memory spaces?
983
+
\item\textbf{Problem:} how to deal with data residing in different memory spaces?
961
984
\end{itemize}
962
985
963
986
\begin{center}
@@ -997,7 +1020,7 @@ \section{Basic concepts of Kokkos}
997
1020
\frametitle{Mirror Views presentation}
998
1021
999
1022
\begin{itemize}
1000
-
\item Solution: we need linked host and device view to access the data on both sides
1023
+
\item\textbf{Solution:} we need linked host and device view to access the data on both sides
1001
1024
\item Kokkos provides the notion of \textbf{mirror views}
1002
1025
\item A mirror view is a view that is a copy of another view but in a different memory space
1003
1026
\item There is a specific function to create a mirror view called \texttt{create\_mirror}
@@ -1011,7 +1034,7 @@ \section{Basic concepts of Kokkos}
1011
1034
\end{minted}
1012
1035
1013
1036
\begin{itemize}
1014
-
\itemMirror views automatically inherit the properties of the original view (extent, layout, etc)
1037
+
\itemA mirror view automatically inherits the properties of the original view (extent, layout, etc)
1015
1038
\end{itemize}
1016
1039
1017
1040
\end{frame}
@@ -1126,7 +1149,7 @@ \section{Basic concepts of Kokkos}
1126
1149
\end{itemize}
1127
1150
1128
1151
\begin{block}{}
1129
-
Go to the exercise \texttt{03\_deep\_copy} and follow the instructions in the README file
1152
+
Go to the exercise \href{https://github.com/CExA-project/cexa-kokkos-tutorials/tree/main/exercises/04_deep_copy}{04\_deep\_copy} and follow the instructions in the README file
1130
1153
\end{block}
1131
1154
1132
1155
\end{frame}
@@ -1215,6 +1238,7 @@ \section{Basic concepts of Kokkos}
1215
1238
});
1216
1239
\end{minted}
1217
1240
1241
+
\normalsize
1218
1242
\begin{itemize}
1219
1243
\item The previous OpenMP version only works on CPUs (need \texttt{target} directive for GPUs)
1220
1244
\item The same Kokkos version works on CPUs and GPUs depending on the compile backend
@@ -1254,6 +1278,7 @@ \section{Basic concepts of Kokkos}
1254
1278
\item If Kokkos is compiled with a GPU backend, the loop is executed on GPU by default
1255
1279
\item Else, the loop is executed on the CPU
1256
1280
\item Non-kokkos C++ code is always executed on the Host
1281
+
\item Kokkos loops can have a name for debugging purpose
1257
1282
\end{itemize}
1258
1283
1259
1284
\end{frame}
@@ -1273,13 +1298,14 @@ \section{Basic concepts of Kokkos}
1273
1298
// Kokkos parallel loop
1274
1299
Kokkos::parallel_for("my_loop", N, KOKKOS_LAMBDA(int i) {...});
1275
1300
1276
-
// Host code
1301
+
// Host code executed during the parallel loop
1302
+
// if Kokkos is compiled with a GPU backend
1277
1303
for (int i = 0; i < N; i++) { ... }
1278
1304
\end{minted}
1279
1305
1280
1306
\normalsize
1281
1307
1282
-
Example: if Kokkos uses a GPU backend, the parallel loop is executed asynchronously on the GPU:
1308
+
1283
1309
\begin{itemize}
1284
1310
\item If Kokkos uses a GPU backend, the parallel loop is executed asynchronously on the GPU
1285
1311
\item\textbf{Problem:} what if I need the results of the parallel loop in the host code?
@@ -1329,7 +1355,7 @@ \section{Basic concepts of Kokkos}
1329
1355
\end{itemize}
1330
1356
1331
1357
\begin{block}{}
1332
-
Go to the exercise \texttt{05\_parallel\_loop} and follow the instructions in the README file
1358
+
Go to the exercise \href{https://github.com/CExA-project/cexa-kokkos-tutorials/tree/main/exercises/05_parallel_loop}{05\_parallel\_loop} and follow the instructions in the README file
1333
1359
\end{block}
1334
1360
1335
1361
\end{frame}
@@ -1354,7 +1380,7 @@ \section{Basic concepts of Kokkos}
1354
1380
1355
1381
\begin{itemize}
1356
1382
\item\texttt{ExecutionSpace} is an optional template parameter that specifies the execution space, by default the execution space is \texttt{DefaultExecutionSpace}.
1357
-
\item\texttt{start\_index} and \texttt{end\_inde<x} are the start and end indexes of the loop
1383
+
\item\texttt{start\_index} and \texttt{end\_index} are the beginning and end of the loop
0 commit comments