X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/book_gpu.git/blobdiff_plain/4f8020b1c6324b056b53b4325cd80d59bb7cf19f..cf0ee588a0ef05623f955938e81be1aa96c33f46:/BookGPU/Chapters/chapter5/figures/GPU2GPU.tikz?ds=sidebyside diff --git a/BookGPU/Chapters/chapter5/figures/GPU2GPU.tikz b/BookGPU/Chapters/chapter5/figures/GPU2GPU.tikz index 96ba97d..31a6fed 100644 --- a/BookGPU/Chapters/chapter5/figures/GPU2GPU.tikz +++ b/BookGPU/Chapters/chapter5/figures/GPU2GPU.tikz @@ -1,16 +1,21 @@ -\tikzstyle{iblock}=[rectangle, draw=black, rounded corners, top color=white, bottom color=black!50, drop shadow, text centered, anchor=north, text width=3cm] - -\begin{tikzpicture}[->,>=stealth',shorten >=1pt,thick] - -\node (GPU1mem) [iblock] { Device memory }; -\node (GPU2mem) [iblock,right=2.0cm of GPU1mem] { Device memory }; -\node (CPU1mem) [iblock,below=2.0cm of GPU1mem] { Host memory }; -\node (CPU2mem) [iblock,right=2.0cm of CPU1mem] { Host memory }; - -\draw[->,loop left] (GPU1mem.west) to node {kernel} (GPU1mem.west); -\draw[->,loop right] (GPU2mem.east) to node {kernel} (GPU2mem.east); -\draw[->] (GPU1mem.south) to node[auto] {PCIe} (CPU1mem.north); -\draw[->] (CPU1mem.east) to node[auto] {MPI} (CPU2mem.west); -\draw[->] (CPU2mem.north) to node[auto] {PCIe} (GPU2mem.south); - -\end{tikzpicture} +\tikzstyle{iblock}=[rectangle, draw=black, rounded corners, top color=white, bottom color=black!50, drop shadow, text centered, anchor=north, text width=3cm] +\newcommand*{\gridscale}{0.85\linewidth} +\resizebox{\gridscale}{!}{ + +\begin{tikzpicture}[->,>=stealth',shorten >=1pt,thick] + +\node (GPU1mem) [iblock] { Device memory }; +\node (GPU2mem) [iblock,right=2.0cm of GPU1mem] { Device memory }; +\node (CPU1mem) [iblock,below=2.0cm of GPU1mem] { Host memory }; +\node (CPU2mem) [iblock,right=2.0cm of CPU1mem] { Host memory }; + +\draw[->,loop left] (GPU1mem.west) to node {kernel} (GPU1mem.west); +\draw[->,loop right] (GPU2mem.east) to node {kernel} (GPU2mem.east); +\draw[->] (GPU1mem.south) to node[left] {PCIe} (CPU1mem.north); +\draw[->] (CPU1mem.east) to node[auto] {Network} (CPU2mem.west); +\draw[->] (CPU2mem.north) to node[right] {PCIe} (GPU2mem.south); + +\draw[->] (GPU1mem.south) edge[out=-90,in=-90,->] node[auto] {GPUDirect} (GPU2mem.south); + +\end{tikzpicture} +}