# HG changeset patch # User ikkun # Date 1487185146 -32400 # Node ID f1307a309875ee6204194bce552743f964bb1a3e # Parent 87e0b63676a405406e2e8558033809b1186bf4aa addpresen diff -r 87e0b63676a4 -r f1307a309875 .DS_Store Binary file .DS_Store has changed diff -r 87e0b63676a4 -r f1307a309875 prepaper/finalpre.aux --- a/prepaper/finalpre.aux Thu Feb 16 00:24:19 2017 +0900 +++ b/prepaper/finalpre.aux Thu Feb 16 03:59:06 2017 +0900 @@ -1,12 +1,10 @@ \relax -\bibcite{cerium}{1} \@writefile{toc}{\contentsline {section}{\numberline {1}Gears OS}{1}} \@writefile{toc}{\contentsline {section}{\numberline {2}Code Gear と Data Gear}{1}} \@writefile{toc}{\contentsline {section}{\numberline {3}GPGPUとは}{1}} -\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Gears OS による GPGPU}}{1}} -\newlabel{fig:gpgpu}{{1}{1}} \@writefile{toc}{\contentsline {section}{\numberline {4}CUDAWoker の実装}{1}} \@writefile{toc}{\contentsline {section}{\numberline {5}CUDATwiceの実装}{1}} +\bibcite{cerium}{1} \bibcite{alice}{2} \bibcite{gears}{3} \bibcite{segment}{4} @@ -14,5 +12,8 @@ \bibcite{cbc-llvm}{6} \bibcite{opencl}{7} \bibcite{cuda}{8} +\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Gears OS による GPGPU}}{2}} +\newlabel{fig:gpgpu}{{1}{2}} \@writefile{toc}{\contentsline {section}{\numberline {6}CMakeによるコンパイル}{2}} -\@writefile{toc}{\contentsline {section}{\numberline {7}今後の課題}{2}} +\@writefile{toc}{\contentsline {section}{\numberline {7}まとめ}{2}} +\@writefile{toc}{\contentsline {section}{\numberline {8}今後の課題}{2}} diff -r 87e0b63676a4 -r f1307a309875 prepaper/finalpre.dvi Binary file prepaper/finalpre.dvi has changed diff -r 87e0b63676a4 -r f1307a309875 prepaper/finalpre.log --- a/prepaper/finalpre.log Thu Feb 16 00:24:19 2017 +0900 +++ b/prepaper/finalpre.log Thu Feb 16 03:59:06 2017 +0900 @@ -1,4 +1,4 @@ -This is e-pTeX, Version 3.14159265-p3.6-141210-2.6 (utf8.euc) (TeX Live 2015) (preloaded format=platex 2015.11.28) 15 FEB 2017 22:21 +This is e-pTeX, Version 3.14159265-p3.6-141210-2.6 (utf8.euc) (TeX Live 2015) (preloaded format=platex 2015.11.28) 16 FEB 2017 02:40 entering extended mode restricted \write18 enabled. %&-line parsing enabled. @@ -136,20 +136,20 @@ LaTeX Font Info: Checking defaults for JT1/mc/m/n on input line 21. LaTeX Font Info: ... okay on input line 21. LaTeX Font Info: External font `cmex10' loaded for size -(Font) <12> on input line 29. +(Font) <12> on input line 69. LaTeX Font Info: External font `cmex10' loaded for size -(Font) <8> on input line 29. +(Font) <8> on input line 69. LaTeX Font Info: External font `cmex10' loaded for size -(Font) <6> on input line 29. +(Font) <6> on input line 69. -! LaTeX Error: Environment 英語abst undefined. +! LaTeX Error: Environment abst undefined. See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ... -l.29 \end{英語abst}] +l.69 \end{英語abst}] ? @@ -159,20 +159,16 @@ Type H for immediate help. ... -l.29 \end{英語abst}] +l.69 \end{英語abst}] ? LaTeX Font Info: Font shape `JT1/mc/bx/n' in size <14.4> not available -(Font) Font shape `JT1/gt/m/n' tried instead on input line 32. +(Font) Font shape `JT1/gt/m/n' tried instead on input line 73. LaTeX Font Info: Font shape `JY1/mc/bx/n' in size <14.4> not available -(Font) Font shape `JY1/gt/m/n' tried instead on input line 32. -! Undefined control sequence. -l.48 \lstinputlisting - [label=CGDG, caption=CGDG]{src/sample.c} -? -File: pic/gearsosgpgpu.pdf Graphic file (type pdf) - -Overfull \hbox (3.57736pt too wide) in paragraph at lines 59--60 +(Font) Font shape `JY1/gt/m/n' tried instead on input line 73. +File: pic/gearsos.pdf Graphic file (type pdf) + +Overfull \hbox (3.57736pt too wide) in paragraph at lines 100--101 [][] [] @@ -180,7 +176,7 @@ Package Fancyhdr Warning: \headheight is too small (0.0pt): - Make it at least 14.37784pt. + Make it at least 20.37784pt. We now make it that large for the rest of the document. This may cause the page layout to be inconsistent, however. @@ -188,26 +184,24 @@ ] -Underfull \hbox (badness 4217) in paragraph at lines 95--98 +Underfull \hbox (badness 4217) in paragraph at lines 144--147 []\JY1/mc/m/n/10 徳森海斗 , 河野真治 : \OT1/cmr/m/n/10 Con-tin-u-a-tion based C \JY1/mc/m/n/10 の [] -Overfull \hbox (31.36427pt too wide) in paragraph at lines 103--104 +Overfull \hbox (31.36427pt too wide) in paragraph at lines 152--153 []\OT1/cmr/m/n/10 : CUDA, https://developer.nvidia.com/category/zone/cuda- [] -[2 - -] (./finalpre.aux) ) +[2] (./finalpre.aux) ) Here is how much of TeX's memory you used: 908 strings out of 493777 - 10381 string characters out of 6151333 - 73731 words of memory out of 5000000 + 10367 string characters out of 6151333 + 76731 words of memory out of 5000000 4434 multiletter control sequences out of 15000+600000 13447 words of font info for 52 fonts, out of 8000000 for 9000 929 hyphenation exceptions out of 8191 - 25i,15n,43p,253b,453s stack positions out of 5000i,500n,10000p,200000b,80000s + 25i,15n,44p,296b,363s stack positions out of 5000i,500n,10000p,200000b,80000s -Output written on finalpre.dvi (2 pages, 7976 bytes). +Output written on finalpre.dvi (2 pages, 12632 bytes). diff -r 87e0b63676a4 -r f1307a309875 prepaper/finalpre.pdf Binary file prepaper/finalpre.pdf has changed diff -r 87e0b63676a4 -r f1307a309875 prepaper/finalpre.tex --- a/prepaper/finalpre.tex Thu Feb 16 00:24:19 2017 +0900 +++ b/prepaper/finalpre.tex Thu Feb 16 03:59:06 2017 +0900 @@ -24,10 +24,10 @@ \date{} \twocolumn [ \maketitle -\begin{英語abst} -Gears OS is a highry reliable operating system based on contination -and meta comptation. It spports interface which is a set of data Gear -and code Gear. In this reserch CUDA computation is implemented. +\begin{abst} +Gears OS is a highly reliable operating system based on continuation +and meta computation. It support interface which is a set of data Gear +and code Gear. In this research CUDA computation is implemented. CUDA worker has a same interface of CPU worker. In GPGPU small size of code and data are transferred to GPU and these are executed in parallel. @@ -39,12 +39,12 @@ In the stub meta code Gear, data Gaers and code Gears are transferred to the GPU and executed. CUDA kernel code is very similar to code Gears representation, so we -can generate automatically but it is possible to use CUDA spesific +can generate automatically but it is possible to use CUDA specific functions. -We use CMake in our implemantation. +We use CMake in our implementation. A CUDA function can be switched with a flag. CMake macros are used to generate stubs and context. -We check to basic execution of Gears task. +We check to basic execution of Gears task. \\ %Gears OS %interface のていぎ @@ -67,6 +67,7 @@ %今回CUDA上でのTaskの基本的な実行を確認することができた。 \end{英語abst}] + \thispagestyle{fancy} \section{Gears OS} @@ -92,24 +93,31 @@ これによってGPUは画像処理のような多大な処理を並列処理することで、 CPU で処理するよりも高速に並列処理することが出来る。 しかし、GPU のコアはCPUのコアに比べ複雑な計算は出来ない構造であるため単純計算しか出来ない、また一般的にユーザーから GPU 単体に直接命令を書き込むことも出来ないなどの問題点も存在する。 GPGPU は CPU によって単純計算のTaskを GPU に振り分ける事によって、 GPU の問題点を解決しつつ、高速な並列処理を行うことである。 -また Data Gear へのアクセスは接続された Code Gear からのみであるから、処理中に変数が書き変わる事がない。 +Gears OS による GPU 処理は図\ref{fig:gpgpu}の様になり、Worker によって Taskを受け渡し、GPUWorker によって並列処理が行われる。また Data Gear へのアクセスは接続された Code Gear からのみであるので並列処理中に変数の値が書き変わることがない。 + \begin{figure}[ht] \centering - \includegraphics[width=90mm]{pic/gearsosgpgpu.pdf} + \includegraphics[width=90mm]{pic/gearsos.pdf} \caption{Gears OS による GPGPU} \label{fig:gpgpu} \end{figure} \section{CUDAWoker の実装} CUDAWorker は Task を queue から受け取り、 thread を作成する。\\ -その後 Task を まとめて CUDATask としてCUDAに送る。CUDAのさらに CUDATwice の処理が終わるまで sleep で待機し、CUDATwiceから Task を受け取る。 +その後 Task を まとめて CUDATask としてCUDAに送る。CUDATwice の処理が終わるまで sleep で待機し、CUDATwiceから Task を受け取る。 \section{CUDATwiceの実装} -CUDATwice +CUDATwice は GPU 側で行われる処理で、値を2倍する処理を繰り返すプログラムとなっており、 \section{CMakeによるコンパイル} - +CMake はビルド自動化ツールであり、プログラムをコンパイル行う際にライブラリや動作環境によって様々な設定を行う必要がありますが、 CMake にはそれらのファイルやライブラリを探し出して実行することが出来ます。\\ +CMake のビルドは2段階からなり、 CMake の制御ファイルの CMakeList.txt によってビルドするファイルを指定でき、指定されたファイルをビルドする際にはまずビルドに必要なライブラリやファイルを探し、通常のビルド環境用のビルドファイルを作成し、次にビルドするファイルにあったビルドを行います。 +CMake は Windows や Linux 等、複数のOS の環境に対応している他、様々なコンパイルオプションがあり、クロスコンパイルや、ユーザーがコンパイルのルールを追加することで特殊なコンパイラや OS にも対応することが出来る。\\ +今回の研究では、CbC という本研究室独自の言語と CUDA 専用コンパイラの nvcc を両立させる必要があり、CMakeは一般的に1つのコンパイラしか同時に扱えないため、CMakeでサポートされているマクロを用いて同時にコンパイルすることが出来た。 +\section{まとめ} +本研究室で研究している Code Gear Data Gear を用いて記述されたプログラムをCMakeを用いてコンパイルすることで CUDA 上で動かすことが出来た。\\ \section{今後の課題} - +Gears OS の並列性や信頼性を検証するために今回例題として使用した twice とは違う、依存関係のある例題を用いた検証を行いたい。 +また、並列処理による処理速度の向上の計測を行っていきたい。 \begin{thebibliography}{10} \bibitem{cerium} 宮國 渡,河野真治,神里 晃,杉山千秋:Cell 用の Fine-grain Task Manager