diff --git a/thesis/chapters/introduction.tex b/thesis/chapters/introduction.tex index 79de0a9..06ac77f 100644 --- a/thesis/chapters/introduction.tex +++ b/thesis/chapters/introduction.tex @@ -4,12 +4,24 @@ This chapter provides an entry point for this thesis. First the motivation of exploring this topic is presented. In addition, the research questions of this thesis are outlined. Lastly the methodology on how to answer these questions will be explained. \section{Background and Motivation} -Optimisation of program code is a crucial part in many different fields. For example video games need a lot of optimisation to lower the minimum hardware requirements which allows more people to run the game. Another example for optimisation are computer simulations. For those, optimisation is even more crucial, as this allows the scientists to run more detailed simulations or get the simulation results faster. Equation learning is another field that can heavily benefit from optimisation. One part of equation learning, is to evaluate the expressions generated by the algorithm. This thesis is concerned with optimising that part to increase the overall performance of the equation learning algorithm. The free lunch theorem as described by \textcite{adam_no_2019} states that optimising a program which runs on a single core will eventually lead to a performance plateau as no further optimisations can be done. Therefore, these algorithms need to utilise the other cores on a processor. In some cases the speed-up achieved by this is still not large enough and another approach is needed. One of these approaches is the utilisation of a Graphics Processing Unit (GPU) to further increase the performance. \textcite{michalakes_gpu_2008} have shown a noticeable speed-up when using the GPU for weather simulation. In addition to simulation GPU acceleration also can be found in other places like networking \parencite{han_packetshader_2010} or structural analysis of buildings \parencite{georgescu_gpu_2013}. +Optimisation and acceleration of program code is a crucial part in many different fields. For example video games need optimisation to lower the minimum hardware requirements which allows more people to run the game. Another example where optimisation is important are computer simulations. For those, optimisation is even more crucial, as this allows the scientists to run more detailed simulations or get the simulation results faster. Equation learning is another field that can heavily benefit from optimisation. One part of equation learning, is to evaluate the expressions generated by the algorithm which can make up a significant portion of the runtime of the algorithm. This thesis is concerned with optimising the evaluation part to increase the overall performance of the equation learning algorithm. -With these successful implementations of GPU acceleration, this thesis also attempts to improve the performance of evaluating mathematical equations using GPUs. The baseline to compare against is an expression evaluator running in parallel on the CPU. (talk a bit more about what will be attempted I think. Look at other papers to see what they write in this section.) +Considering the following expression $x_1 + 5 - \text{abs}(p_1) * \text{sqrt}(x_2) / 10 + 2 \char`^ 3$ which contains simple mathematical operations as well as variables $x_n$ and parameters $p_n$. This expression is one example that can be generated by the equation learning algorithm and needs to be evaluated for the next iteration. Usually multiple expressions are generated per iteration, which also need to be evaluated. Multiple different values need to be inserted for all variables and parameters, drastically increasing the amount of evaluations that need to be performed. + +The free lunch theorem as described by \textcite{adam_no_2019} states that to gain additional performance, a developer cannot just hope for future hardware to be faster, especially on a single core. Therefore, algorithms need to utilise the other cores on a processor to further acceleration. While this approach means more development overhead, a much greater speed-up can be achieved. However, in some cases the speed-up achieved by this is still not large enough and another approach is needed. One of these approaches is the utilisation of a Graphics Processing Unit (GPU) as an easy and affordable option as compared to compute clusters. \textcite{michalakes_gpu_2008} have shown a noticeable speed-up when using the GPU for weather simulation. In addition to computer simulations GPU acceleration also can be found in other places like networking \parencite{han_packetshader_2010} or structural analysis of buildings \parencite{georgescu_gpu_2013}. + +% talk a bit about what the expressions look like \section{Research Question} -What are the research questions and how they will be answered +With these successful implementations of GPU acceleration, this thesis also attempts to improve the performance of evaluating mathematical equations using GPUs. Therefore, the following research questions are formulated: + +\begin{itemize} + \item How can simple arithmetic expressions that are generated at runtime be efficiently evaluated on graphics cards? + \item Under what circumstances is the evaluation of simple arithmetic expressions faster on a graphics card than on a CPU? + \item Under which circumstances is the interpretation of the expressions on the GPU or the translation to the intermediate language Parallel Thread Execution (PTX) more efficient? +\end{itemize} + +In order to answer these questions, two GPU expression evaluators need to be implemented. The first evaluator will interpret the expressions entirely on the GPU, while the second will transpile them to PTX-Code on the CPU and execute the generated code on the GPU. Research needs to be done to explore different possibilities to implement the two evaluators. The current implementation of the equation learning algorithm already contains a CPU expression evaluator, which will be used to compare the GPU evaluators against. \section{Methodology} Will give an overview of the chapters and what to expect diff --git a/thesis/main.pdf b/thesis/main.pdf index 2237cb1..7f8ba87 100644 Binary files a/thesis/main.pdf and b/thesis/main.pdf differ