<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Towards Porting Hardware-Oblivious Vectorized Query Operators to GPUs</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Johannes Fett</string-name>
          <email>johannes.fett@tu-dresden.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Annett Ungethüm</string-name>
          <email>annett.ungethuem@tu-dresden.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dirk Habich</string-name>
          <email>dirk.habich@tu-dresden.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Wolfgang Lehner</string-name>
          <email>wolfgang.lehner@tu-dresden.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Database Systems Group, Technische Universität Dresden</institution>
          ,
          <addr-line>Dresden</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Nowadays, query processing in column-store database systems is highly tuned to the underlying (co-)processors. This approach works very well from a performance perspective, but has several shortcomings from a conceptual perspective. For example, this tuning introduces high implementation as well as maintenance cost and one implementation cannot be ported to other (co-)processors. To overcome that, we developed a column-store speci c abstraction layer for hardwaredriven vectorization based on the Single Instruction Multiple Data (SIMD) parallel paradigm. Thus, we are able to implement vectorized query operators in a hardware-oblivious manner, which can be specialized to di erent SIMD instruction set extensions of modern x86-processors. To soften the limitation to x86-processors, we describe our vision to integrate GPUs in our abstraction layer by interpreting GPUs as virtual vector engines in this paper. Moreover, we present some initial evaluation results to determine a reasonable virtual vector size. We conclude the paper with an outlook on our ongoing research in that direction.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. INTRODUCTION</title>
      <p>
        Analytical database queries typically access a small
number of columns, but a high number of rows and are, thus most
e ciently answered by column-store database systems [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
Since the amount of data is still growing, these systems
constantly adapt to novel hardware features to satisfy the
requirements of high query throughput and low query latency [
        <xref ref-type="bibr" rid="ref2 ref3 ref4">2,
3, 4</xref>
        ]. From the hardware perspective, we see that Moore's
Law is still valid and the transistors on a chip double about
every two years [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Unfortunately, we also see an end of
Dennard scaling, so that not all transistors can be active
due to power constraints [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. To deal with that,
vectorization, parallelization, specialization and heterogeneity are key
approaches for hardware designers [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
      </p>
      <p>For this reason, vectorization based on the Single
Instruction Multiple Data (SIMD) parallel paradigm has
established itself as a core query optimization technique in
column32nd GI-Workshop on Foundations of Databases (Grundlagen von
Datenbanken), September 01-03, 2021, Munich, Germany.</p>
      <p>
        Copyright © 2021 for this paper by its authors. Use permitted under
Creative Commons License Attribution 4.0 International (CC BY 4.0).
store systems [
        <xref ref-type="bibr" rid="ref1 ref6 ref7">1, 6, 7</xref>
        ]. SIMD increases the single-thread
performance by executing a single operation on multiple data
elements in a vector register simultaneously (data
parallelism) [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. Such SIMD capabilities are common in today's
mainstream x86-processors using speci c SIMD instruction
set extensions, whereas a current hardware trend is that
these extensions are growing not only in terms of complexity of
the provided instructions but also in the size of the vector
registers (number of data elements in parallel). To tackle
the evolving SIMD-speci c diversity, we developed a novel
abstraction layer called Template Vector Library (TVL) for
in-memory column-stores [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Using that TVL, we are
able to implement hardware-oblivious vectorized query
operators, which can be specialized to di erent SIMD instruction
set extensions at query compile-time [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>
        Besides vectorization, hardware also shifts from
homogeneous x86-processors towards heterogeneous systems with
di erent computing units (CU) [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. In this context, there
is already a huge number of research works that deal with
the use of di erent CUs such as GPUs or FPGAs for an
e cient analytical query processing [
        <xref ref-type="bibr" rid="ref10 ref11 ref2 ref3 ref4 ref9">2, 3, 4, 9, 10, 11</xref>
        ]. In
general, these works have shown the great potential, but
all these approaches have a common shortcoming. For each
CU, a separate hardware-conscious and hand-tuned
codebase for query operators has to be implemented and
maintained using di erent programming concepts. From a
performance perspective, this approach works very well, but the
e orts for implementation and maintenance often outweigh
the bene ts. To overcome that, our overall vision is to
enhance our SIMD abstraction layer TVL to cover di erent
heterogeneous CUs as well.
      </p>
      <p>Our Contribution and Outline. In this paper, we
describe our vision and present some initial steps to integrate
GPUs in our abstraction layer by interpreting GPUs as
virtual vector engines. Generally, GPUs use a Single
Instruction Multiple Thread (SIMT) execution model which can be
also interpreted as SIMD combined with multi-threading.
Based on that, GPUs seem like a perfect match for our TVL
to soften the limitation to x86-processors. Thus, our
contributions are the following in this paper:
1. We start with an introduction in our SIMD abstraction
layer TVL as well as with an architectural description
of NVIDIA GPUs in Section 2.
2. Then, we present our general idea of SIMDization of
GPUs in Section 3. To interpret a GPU as virtual
vector engine, we have to determine a reasonable virtual
vector size, which can be most e ciently processed in
parallel. The vector size is important because it is an
(a) Template Vector Library (TVL)
(b) NVIDIA GPU Architecture
essential part of SIMD and an integral part of our TVL.
For that, we present some TVL-oriented experiments.</p>
      <p>Based on the results, we derive a virtual vector size.
3. In Section 4, we summarize our lessons learned and
describe our ongoing activities in that direction.
4. We close the paper with related work in Section 5 and
a short summary in Section 6.
2.</p>
    </sec>
    <sec id="sec-2">
      <title>BACKGROUND</title>
      <p>In this section, we introduce our Template Vector Library
as SIMD abstraction layer for column-stores. Moreover, we
brie y describe the GPU architecture and execution model.
2.1</p>
    </sec>
    <sec id="sec-3">
      <title>Template Vector Library</title>
      <p>
        Vectorization is a state-of-the-art query optimization
technique in in-memory column-stores, because all recent
x86processors o er powerful SIMD extensions [
        <xref ref-type="bibr" rid="ref1 ref12 ref13 ref14 ref7">1, 7, 12, 13, 14</xref>
        ].
      </p>
      <p>
        SIMD provides data parallelism by executing a single
instruction on multiple data elements simultaneously [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. To
achieve the best performance, explicit vectorization using
SIMD intrinsics is still the best way [
        <xref ref-type="bibr" rid="ref13 ref14 ref6">6, 13, 14</xref>
        ], whereas
intrinsics are functions wrapping the underlying machine calls.
      </p>
      <p>
        However, these SIMD extensions are increasingly diverse in
terms of (i) the number of available vector instructions, (ii)
the vector length, and (iii) the granularity of the bit-level
parallelism, i.e., on which data widths the vector
instructions are executable [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. To hide this heterogeneity, we
developed a speci c abstraction layer called Template Vector
Library (TVL) for column-stores [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>Our abstraction approach follows a separation of concerns
concept as shown in Fig. 1(a). On the one hand, it o ers
hardware-oblivious but column-store speci c primitives,
which are similar to intrinsics. The primitives are derived
from state-of-the-art vectorized columnar query operators.</p>
      <p>
        We organized these primitives in seven self-descriptive
classes like load/store (L/S) or an arithmetic class for
a better organization including a uni ed interface per
class [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. On the other hand, our TVL is also responsible
for mapping the provided hardware-oblivious primitives
to di erent SIMD extensions. For this mapping, our TVL
includes a plug-in concept and each plug-in has to provide
a hardware-conscious implementation for all primitives.
      </p>
      <p>From an implementation perspective, our abstraction
concept is realized as a header-only library, where the
hardwareoblivious primitives abstract from SIMD intrinsics. These
primitives are generic functions representing a uni ed
interface for all SIMD architectures. In addition to the primitives,
we introduced generic data types:
base t: The base type can be any scalar type.
vector t: The vector type contains one or more values of</p>
      <p>the same base type.
mask t: A mask is a scalar value, which is large enough to</p>
      <p>store one bit for each element in a vector.</p>
      <p>Using the provided primitives and the data types, we
can implement columnar query operators in a
hardwareoblivious way. For the hardware-conscious mapping, we use
template metaprogramming requiring hardware-conscious
implementations for all primitives and for all underlying
SIMD extensions. This function template specialization has
to be implemented, whereby the implementation depends
on the available functionality of the SIMD extension. In the
best case, we can directly map a TVL primitive to a SIMD
intrinsic. However, if the necessary SIMD intrinsic is not
available, we are able to implement an e cient workaround
in a hardware-conscious way. This implementation is
independent of any query operator and must be done only
once for a speci c SIMD extension.</p>
      <p>Figure 2 illustrates how a hardware-oblivious vectorized
operator using our TVL looks like and how it can be
called. We show a simple aggregation (summation) operator
consisting of four TVL primitives:
set1: lls a vector register with a given value
load: loads multiple consecutive data elements into a vector</p>
      <p>register
add: executes an element-wise addition on data elements in</p>
      <p>two vector registers
hadd: executes an horizontal addition on data elements in</p>
      <p>one vector register
The aggregation operator assumes that the number of data
elements is a multiple of the number of elements per vector
and works as follows: One vector register called resVec is</p>
      <p>lled with zeros. Afterwards, the operator iterates over the
input column in and loads a number of consecutive data
elements into a second vector register called dataVec. Then,
the data elements in both vector registers are added
elementwise and the result is stored in resVec. When all elements of
the input column have been processed, the horizontal
aggregation hadd is carried out to determine the nal sum result.</p>
      <p>To specialize this hardware-oblivious operator
implementation during query compile-time, we use three template
parameters called processingStyle (ps): (i) the vector
extension (e.g., SSE, AVX, NEON, or scalar), (ii) the vector size
in bit, and (iii) the base data type with bit granularity (e.g.,
int8, int64, oat). The de nition of ps is shown in Figure 2,
which is used to call the aggregation-operator.
// Calling the operator.
using ps = t v l : : a v x 2 &lt; t v l : : v 2 5 6 &lt; u i n t 6 4 _ t &gt; &gt; ; // for example
size_t count = 1024;
uint64_t * array = g e n e r a t e _ d a t a ( count ) ;
uint64_t sum = agg&lt;ps&gt; ( array , elemCount ) ;</p>
      <p>
        Graphics Processing Units (GPUs) are increasingly used
for large-scale query processing in database systems [
        <xref ref-type="bibr" rid="ref15 ref2 ref3 ref4">2, 3,
4, 15</xref>
        ]. Speci cally, their hardware parallelism and
memory access bandwidths contribute to considerable speedups.
      </p>
      <p>Figure 1(b) depicts a simpli ed architecture of an NVIDIA
GPU. Generally, a modern GPU consists of (i) a large
global main memory with a memory bandwidth of up to 1.2
TB/s and (ii) a number of compute units called Streaming
Multiprocessors (SMs). Each SM has a number of simplistic
cores, a xed set of registers, and shared memory. This
shared memory serves as scratchpad and can be accessed by all
cores in the SM. Moreover, the GPU has an on-chip L2
cache, which is shared across all SMs and optionally, each SM
may have a local L1 cache. The number of SMs, and cores
per SM, the size of global memory, the size of the L2 cache,
etc. varies across GPU products.</p>
      <p>
        The execution model of GPUs is called Single
Instruction Multiple Threads (SIMT), whereas SIMT is very similar
to SIMD. While multiple data are processed by a single
instruction in SIMD, multiple threads are processed by a single
instruction in lock-step. That means, each thread in SIMT
executes the same instruction, but on di erent data. While
a thread switch is very costly on CPUs, GPUs can handle
thread switching with more ease. GPUs feature a fast thread
switching based on groups of 32 threads called warps. The
warp scheduler issues instructions to warps available on an
SM beyond the number of physical cores to hide latency
[
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. Thus, it is encouraged to create more threads than are
available as physical cores. Then, this overload can be used
to schedule threads for execution, while others wait for a
memory transfer. This is especially important since databases
are more likely I/O-bound, not CPU-bound, and it is thus
one of the most important features for implementing query
operators on GPUs [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>
        For the GPU implementation, general purpose parallel
programming models such as CUDA [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] or OpenCL [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ]
have to be used, whereas CUDA generate better
performance results. The CUDA programming model consists of two
code parts: host code and GPU code. The host code runs
on a CPU process and is responsible for setting up the
environment, memory transfers between CPU and GPU and
executing kernels on the GPU. On the GPU, a function
called kernel is executed in parallel with a number of threads
and blocks. Blocks consist of a number of threads and are
assigned to one streaming multiprocessor. Threads are
assigned to a block. Thus, executing a kernel requires at least
2 parameters. The rst parameter de nes how many blocks
will be spawned. The second parameter sets the number of
threads per block. The total number of GPU threads is the
product of both parameters. Depending on the data size and
the number of GPU threads, the number of elements
processed per threads can vary.
3.
      </p>
    </sec>
    <sec id="sec-4">
      <title>GPU-SIMDIZATION EXPERIMENTS</title>
      <p>Our overall vision is to fully support GPUs in our TVL
as shown in Figure 1(a). For that, we have to create a
GPU-speci c hardware-conscious implementation of the
hardware-oblivious interface. To achieve that, we interpret
GPUs as virtual vector engines and call this interpretation
SIMDization. For an optimal SIMD processing, we have
to nd a reasonable vector size. This vector size is virtual
because we want to interpret regular arrays as virtual
vector registers. For example, on Intel x86-processors, the
di erent SIMD instruction set extensions either have a
vector length of 128-, 256- or 512-bit. If we assume 64-bit
per data element, we can simultaneously process 2 elements
in a vector register of the size 128-bit. The wider the vector
registers, the more data can be processed in parallel. We are
not aware of any work that has ever determined a vector
size for GPUs.
3.1</p>
    </sec>
    <sec id="sec-5">
      <title>Vector Length Evaluation</title>
      <p>To determine a reasonable virtual vector size for our
SIMDization approach for GPUs, several experiments were
executed. A rst set of experiments were conducted on an
NVIDIA RTX Quadro 8000 GPU. This GPU has a global main
memory size of 48 GiB, a memory bandwidth of 672 GB/s,
an L2 cache with a size of 6 MiB, and 72 SMs. Each SM has
64 cores resulting in a total of 4,608 cores.</p>
      <p>For the hardware-conscious implementation, we can
distinguish three di erent main groups of hardware-oblivious
SIMD primitives across all TVL classes: (i) load/store
primitives, (ii) element-wise primitives, and (iii) horizontal
primitives. Element-wise primitives are characterized by the
feature that they do not introduce dependencies between
the elements of the same vector register, e.g., element-wise
arithmetic, comparisons, or boolean logic. In contrast to
that, horizontal primitives do not treat the elements of a
vector independently. An example is the horizontal
addition. As shown in our example sum-aggregation operator (cf.
Figure 2), di erent primitives from all groups are used to
implement a vectorized query operator. In this operator, we
use an element-wise and a horizontal add primitive.</p>
      <p>In our rst experiments, we evaluated the element-wise
and horizontal addition on the GPU. For that, we
implemented simple vectorized CUDA kernels and executed these
kernels using di erent vector sizes. For the horizontal
addition, we use the function cub::DeviceReduce from the CUDA
SDK 11.2 as most e cient implementation as foundation.
Since our GPU has 4,608 cores and usually more threads
than cores are used for good performance, we investigated
vector sizes in the range from 256 KiB to 1 GiB. In terms of
number of elements, we evaluated the range from 213; ::; 227
number of 64-bit data elements. For each vector size, di
erent CUDA con gurations with blocks and threads per block
are possible and we tested a large number of di erent con
gurations in a systematical way.</p>
      <p>Element-wise Addition: This kernel was performed on
two input columns A and B. Each column was a sequence
of unsigned randomly generated 64-bit integer values with
a size of 1 GiB. The result was written back into column
B. Within a loop, our vectorized kernel is called until the
whole columns have been processed. Figure 3 shows the best
achieved throughput over all con gurations for each vector
size. As we can see, small vector sizes negatively a ect the
performance. For a vector size of 256 KiB, a throughput of
248.87 GiB/s is achieved. The best performance is gained by
using a vector size of 1 GiB. This results in a throughput of
530.99 GiB/s. A vector size of 8 MiB is 3.8% slower than a
vector size of 1 GiB. We conclude, higher vector sizes lead
to higher throughput and in the best case, the vector size
corresponds to column size.</p>
      <p>Horizontal Additon: This kernel adds all elements in
a vector register together and the kernel is based on the
cub::DevideReduce function being shipped as part of the
CUDA SDK. For our evaluation, we generated di erent
columns where the column size corresponds to the vector size.
Again, the data elements are 64-bit unsigned integer values.
Figure 4 shows the best achieved throughput over all
congurations for each vector size. Similar to the element-wise
addition, higher vector sizes lead to higher throughput.</p>
      <p>Aggregation Operator: Based on these evaluations, we
could draw the conclusion that the best vector size should
be the column size. To validate our hypothesis, we evaluated
the sum-aggregation operator consisting of both primitives
as next. For this evaluation, we generated a single column
with a size of 1 GiB and varied the vector size from 256 KiB
to 1 GiB. As illustrated in Figure 5, we obtain a completely
di erent result. The throughput increases up to a vector size
of 2 MiB. Then, the throughput decreases and stabilizes at a
low level. The main di erence to our previous experiments is
that a single vector register or array is now the main driver
of the processing. As shown in Figure 2, one vector register
resVec is lled with zeros at the beginning of the
aggregation operators. Afterwards, we repeatedly load into a second
vector dataV ec of the column and conduct an element-wise
add between both. The result is stored in resVec vector.
This resVec vector is frequently accessed, and thus, should
be kept in cache.</p>
      <p>To evaluate the cache- tting in more detail, we slightly
modi ed our experiment. We generated a new input column
of size 1,5 GiB containing 64-bit unsigned integers and varied
the vector size according to the on-chip L2 cache size: 1=4,
1=3, 1=2, 1, 2 times of the cache size. Figure 6 depicts the
resulting throughputs. As we can see, we obtain the best
performance when our vector size is a third of the L2 cache
size. Larger vector sizes lead to a lower throughput.
3.2</p>
    </sec>
    <sec id="sec-6">
      <title>Comparing with Native CUDA</title>
      <p>As shown above, we are able to determine a reasonable
virtual vector size providing the best performance for our
vectorized aggregation on the GPU. In this section, we
present evaluation results comparing the vectorized aggregation
with the native CUDA aggregation. For that, we generated
various columns|sequences of 64-bit integer values|with
increasing sizes from 2 MiB to 8 GiB. For the vectorized
aggregation, we applied the best performing vector size of 2
MiB in all experiments. For the native CUDA aggregation,
we used the function cub::DevideReduce from the CUDA
SDK as already done for our horizontal aggregation.</p>
      <p>The results are depicted in Figure 7. The throughput of
the native CUDA aggregation is slightly higher as for our
vectorized aggregation. This is especially true for large
columns, which is not particularly surprising. Nevertheless, the
result is promising to specialize our hardware-oblivious
vectorized query operators to GPUs and to obtain a reasonably
good performance. We hope to increase the throughput of
our vectorized execution with additional GPU-speci c
optimization techniques as discussed in Section 4.
3.3</p>
    </sec>
    <sec id="sec-7">
      <title>Validation</title>
      <p>We also executed all our experiments on a second NVIDIA
GPU namely an NVIDIA GTX 1070 Ti. This GPU provides
a global main memory size of 8 GiB, a memory bandwidth of
256 GB/s, an L2 cache of 2 MB size, and 19 SMs. Each SM
has 128 cores resulting in a total of 2,432 cores. In general,
we observed a behavior similar as with the NVIDIA
Quadro RTX 8000. In particular, we executed the cache- tting
experiment to determine the best virtual vector size for the
aggregation operator. In contrast to the RTX 8000 GPU, we
obtain the best performance when our vector size is a fourth
of the L2 cache (512 KiB) size as shown in Figure 8.</p>
      <p>Based on the previous section, we conclude that SIMD
processing using a virtual vector model is generally possible
on a GPU. Choosing the right vector size and con guration
is critical to achieve a good performance. Sub-optimal
congurations reduce the performance by more than one order
of magnitude. Overall, we obtain good performance which
is slower than native CUDA implementations. For the
aggregation operator using the ideal vector size, our approach
is 37.4% slower in the worst case for 8 GiB data size, and
10.8% slower in the best case for 8 MiB data size than a
native CUDA approach. By validating our approach on a
di erent GPU, we have also shown that our conclusions are
more generally applicable beyond a single GPU model.
Moreover, our hardware-oblivious query operators can be
specialized to SIMD extensions as well as to GPUs in a uni ed
way.</p>
      <p>To summarize, our results are promising and our ongoing
research in that direction will focus on the following aspects:
(1) Virtual Vector Size: To extend our work, we are
looking forward to evaluate other query operators. We seek
to explore if optimal vector sizes and con gurations depend
on the query operators.</p>
      <p>(2) Implementation: Completing the GPU TVL
requires to implement all primitives. To optimize the
hardwareconscious implementations, we want to explore the usage of
shared memory, registers, and persistent caching.</p>
      <p>(3) Optimization: Besides an optimal
hardwareconscious implementation for GPUs, we want to investigate
more mapping strategies for a broader optimization.
Currently, the TVL has a 1:1 mapping of
hardwareoblivious primitives to hardware-conscious implementations.
As shown in our experiments, the CUDA native aggregation
outperforms the vectorized approach. To improve the
performance of our vectorized approach, an idiom-based
mapping strategy could be helpful. By replacing a
vectorized computation by a semantically equivalent but more
performant code at query compile-time, a speedup can
possibly be achieved. For that, it is necessary to identify
often used idioms that lose performance by vectorization
and replace them by idiomatic implementations.
5.</p>
    </sec>
    <sec id="sec-8">
      <title>RELATED WORK</title>
      <p>
        To address the portability of code across heterogeneous
computing units, OpenCL [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] and Intel's OneAPI
[
        <xref ref-type="bibr" rid="ref19">19</xref>
        ]general purpose parallel programming language approaches.
However, the genericity is a major drawback from a
performance point of view. In contrast, Pirk et al. [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ] presented
a more database-speci c approach called Voodoo to
execute single-source query operators on di erent (co-)processors.
Voodoo is a declarative intermediate algebra that abstracts
the detailed architectural properties of the hardware,
without losing the ability to generate highly tuned code. The
proposed algebra consists of a collection of declarative and
vector-oriented operations. Operators described in this
algebra are compiled to OpenCL. The drawbacks of this
approach are: (i) operators have to be described with a new
algebra, (ii) a specialized compiler is required, and (iii) the
overhead of OpenCL. Another abstraction concept was
proposed by Heimel et al. [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]. They developed a
hardwareoblivious parallel library for query operators, so that these
operators can be mapped to a variety of parallel processing
architectures like many-core CPUs or GPUs. However, the
approach is mainly based on OpenCL and they do not
support SIMD on CPUs.
      </p>
      <p>
        In a recent work, Shanbhag et al. [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] introduced a new
processing model for an e cient query processing on GPUs
called tile-based execution model. This processing model
extends the SIMD-based processing on CPUs where each
thread processes a vector at a time to GPU. Based on that
SIMD extension concept, they introduced a CUDA-like
library called Crystal consisting of data processing
primitives that can be composed in order to implement queries
on the GPU. Thus, this approach has a lot in common
with our idea, but they are limited to GPUs. It would
be interesting to implement our TVL hardware-conscious
plug-in for GPUs using the Crystal library.
      </p>
    </sec>
    <sec id="sec-9">
      <title>6. SUMMARY</title>
      <p>In this paper, we evaluated the integration of GPUs in our
SIMD abstraction layer TVL by interpreting GPUs as
virtual vector engines. By conducting a number of experiments,
we have shown that our approach is promising. While the
observed throughput does not outperform CUDA native
implementations, it allows developers to use CUDA-based fast
GPU primitives without requiring knowledge of GPU
implementations. Our vectorized approach still achieves
reasonable performance that is not an order of magnitude slower
than native CUDA implementations. However, tuning the
primitives and operators by choosing the right virtual vector
size and con guration is critical for achieving good
performance.</p>
    </sec>
    <sec id="sec-10">
      <title>Acknowledgments</title>
      <p>This work was partly funded by the German Research
Foundation (DFG) within the RTG 1907 (RoSI).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>D.</given-names>
            <surname>Abadi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. A.</given-names>
            <surname>Boncz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Harizopoulos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Idreos</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Madden</surname>
          </string-name>
          , \
          <article-title>The design and implementation of modern column-oriented database systems,"</article-title>
          <source>Found. Trends Databases</source>
          , vol.
          <volume>5</volume>
          , no.
          <issue>3</issue>
          , pp.
          <volume>197</volume>
          {
          <issue>280</issue>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>H.</given-names>
            <surname>Funke</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Bre</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Noll</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Markl</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Teubner</surname>
          </string-name>
          , \
          <article-title>Pipelined query processing in coprocessor environments,"</article-title>
          <source>in SIGMOD</source>
          ,
          <year>2018</year>
          , pp.
          <volume>1603</volume>
          {
          <fpage>1618</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>T.</given-names>
            <surname>Karnagel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Habich</surname>
          </string-name>
          , and W. Lehner, \
          <article-title>Adaptive work placement for query processing on heterogeneous computing resources,"</article-title>
          <source>Proc. VLDB Endow.</source>
          , vol.
          <volume>10</volume>
          , no.
          <issue>7</issue>
          , pp.
          <volume>733</volume>
          {
          <issue>744</issue>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Yuan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Lee</surname>
          </string-name>
          , and
          <string-name>
            <given-names>X.</given-names>
            <surname>Zhang</surname>
          </string-name>
          , \
          <article-title>The yin and yang of processing data warehousing queries on GPU devices,"</article-title>
          <source>Proc. VLDB Endow.</source>
          , vol.
          <volume>6</volume>
          , no.
          <issue>10</issue>
          , pp.
          <volume>817</volume>
          {
          <issue>828</issue>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>H.</given-names>
            <surname>Esmaeilzadeh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E. R.</given-names>
            <surname>Blem</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. S.</given-names>
            <surname>Amant</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Sankaralingam</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D.</given-names>
            <surname>Burger</surname>
          </string-name>
          , \
          <article-title>Dark silicon and the end of multicore scaling,"</article-title>
          <source>IEEE Micro</source>
          , vol.
          <volume>32</volume>
          , no.
          <issue>3</issue>
          , pp.
          <volume>122</volume>
          {
          <issue>134</issue>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>A.</given-names>
            <surname>Ungethu</surname>
          </string-name>
          <article-title>m, J</article-title>
          . Pietrzyk,
          <string-name>
            <given-names>P.</given-names>
            <surname>Damme</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Krause</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Habich</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Lehner</surname>
          </string-name>
          , and E. Focht, \
          <article-title>Hardware-oblivious SIMD parallelism for in-memory column-stores," in CIDR. www</article-title>
          .cidrdb.org,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>J.</given-names>
            <surname>Zhou</surname>
          </string-name>
          and
          <string-name>
            <given-names>K. A.</given-names>
            <surname>Ross</surname>
          </string-name>
          , \
          <article-title>Implementing database operations using SIMD instructions,"</article-title>
          <source>in SIGMOD</source>
          ,
          <year>2002</year>
          , pp.
          <volume>145</volume>
          {
          <fpage>156</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>C. J.</given-names>
            <surname>Hughes</surname>
          </string-name>
          ,
          <string-name>
            <surname>Single-Instruction Multiple-Data</surname>
            <given-names>Execution</given-names>
          </string-name>
          , ser.
          <source>Synthesis Lectures on Computer Architecture</source>
          . Morgan &amp; Claypool Publishers,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>M.</given-names>
            <surname>Xue</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Xing</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Feng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Yu</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Z.</given-names>
            <surname>Ma</surname>
          </string-name>
          , \
          <article-title>Fpga-accelerated hash join operation for relational databases,"</article-title>
          <source>IEEE Trans. Circuits Syst. II Express Briefs</source>
          , vol.
          <volume>67</volume>
          -II, no.
          <issue>10</issue>
          , pp.
          <year>1919</year>
          {
          <year>1923</year>
          ,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>S.</given-names>
            <surname>Jha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>He</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lu</surname>
          </string-name>
          , X. Cheng, and
          <string-name>
            <given-names>H. P.</given-names>
            <surname>Huynh</surname>
          </string-name>
          , \
          <article-title>Improving main memory hash joins on intel xeon phi processors: An experimental approach,"</article-title>
          <source>Proc. VLDB Endow.</source>
          , vol.
          <volume>8</volume>
          , no.
          <issue>6</issue>
          , pp.
          <volume>642</volume>
          {
          <issue>653</issue>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>J.</given-names>
            <surname>Pietrzyk</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Habich</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Damme</surname>
          </string-name>
          , E. Focht, and W. Lehner, \
          <article-title>Evaluating the vector supercomputer sx-aurora TSUBASA as a co-processor for in-memory database systems,"</article-title>
          <source>Datenbank-Spektrum</source>
          , vol.
          <volume>19</volume>
          , no.
          <issue>3</issue>
          , pp.
          <volume>183</volume>
          {
          <issue>197</issue>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>D. J.</given-names>
            <surname>Abadi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. A.</given-names>
            <surname>Boncz</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Harizopoulos</surname>
          </string-name>
          , \
          <article-title>Column oriented database systems,"</article-title>
          <source>Proc. VLDB Endow.</source>
          , vol.
          <volume>2</volume>
          , no.
          <issue>2</issue>
          , pp.
          <volume>1664</volume>
          {
          <issue>1665</issue>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>P.</given-names>
            <surname>Damme</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A</given-names>
            . Ungethum, J.
            <surname>Pietrzyk</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Krause</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Habich</surname>
          </string-name>
          , and W. Lehner, \Morphstore:
          <article-title>Analytical query engine with a holistic compression-enabled processing model,"</article-title>
          <source>Proc. VLDB Endow.</source>
          , vol.
          <volume>13</volume>
          , no.
          <issue>11</issue>
          , pp.
          <volume>2396</volume>
          {
          <issue>2410</issue>
          ,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>O.</given-names>
            <surname>Polychroniou</surname>
          </string-name>
          and
          <string-name>
            <given-names>K. A.</given-names>
            <surname>Ross</surname>
          </string-name>
          , \
          <article-title>VIP: A SIMD vectorized analytical query engine,"</article-title>
          <source>VLDB J.</source>
          , vol.
          <volume>29</volume>
          , no.
          <issue>6</issue>
          , pp.
          <volume>1243</volume>
          {
          <issue>1261</issue>
          ,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>A.</given-names>
            <surname>Shanbhag</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Madden</surname>
          </string-name>
          , and
          <string-name>
            <given-names>X.</given-names>
            <surname>Yu</surname>
          </string-name>
          , \
          <article-title>A study of the fundamental performance characteristics of gpus and cpus for database analytics,"</article-title>
          <source>in SIGMOD</source>
          ,
          <year>2020</year>
          , pp.
          <volume>1617</volume>
          {
          <fpage>1632</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>Turing</given-names>
            <surname>Tuning</surname>
          </string-name>
          <article-title>Guide: CUDA Toolkit documentation</article-title>
          , https://docs.nvidia.com/cuda/turing-tuning-guide/ index.html.
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <surname>CUDA C Programming</surname>
          </string-name>
          <article-title>Guide</article-title>
          , https://docs.nvidia. com/cuda/cuda-c
          <article-title>-programming-guide/index</article-title>
          .html.
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>[18] OpenCL, https://www.khronos.org/opencl/.</mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>[19] OneAPI, https://www.oneapi.com.</mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>H.</given-names>
            <surname>Pirk</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O. R.</given-names>
            <surname>Moll</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Zaharia</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Madden</surname>
          </string-name>
          , \
          <article-title>Voodoo - A vector algebra for portable database performance on modern hardware,"</article-title>
          <source>Proc. VLDB Endow.</source>
          , vol.
          <volume>9</volume>
          , no.
          <issue>14</issue>
          , pp.
          <volume>1707</volume>
          {
          <issue>1718</issue>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>M.</given-names>
            <surname>Heimel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Saecker</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Pirk</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Manegold</surname>
          </string-name>
          , and
          <string-name>
            <given-names>V.</given-names>
            <surname>Markl</surname>
          </string-name>
          , \
          <article-title>Hardware-oblivious parallelism for in-memory column-stores,"</article-title>
          <source>Proc. VLDB Endow.</source>
          , vol.
          <volume>6</volume>
          , no.
          <issue>9</issue>
          , pp.
          <volume>709</volume>
          {
          <issue>720</issue>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>