English
 
Help Privacy Policy Disclaimer
  Advanced SearchBrowse

Item

ITEM ACTIONSEXPORT

Released

Paper

Automatic generation of CUDA code performing tensor manipulations using C++ expression templates

MPS-Authors
/persons/resource/persons213835

Pfeiffer,  Harald P.
Astrophysical and Cosmological Relativity, AEI-Golm, MPI for Gravitational Physics, Max Planck Society;

External Resource
No external resources are shared
Fulltext (restricted access)
There are currently no full texts shared for your IP range.
Fulltext (public)

1804.10120.pdf
(Preprint), 2MB

Supplementary Material (public)
There is no public supplementary material available
Citation

Lewis, A. G. M., & Pfeiffer, H. P. (in preparation). Automatic generation of CUDA code performing tensor manipulations using C++ expression templates.


Cite as: https://hdl.handle.net/21.11116/0000-0003-652B-C
Abstract
We present a C++ library, TLoops, which uses a hierarchy of expression
templates to represent operations upon tensorial quantities in single lines of
C++ code that resemble analytic equations. These expressions may be run as-is,
but may also be used to emit equivalent low-level C or CUDA code, which either
performs the operations more quickly on the CPU, or allows them to be rapidly
ported to run on NVIDIA GPUs. We detail the expression template and C++-class
hierarchy that represents the expressions and which makes automatic
code-generation possible. We then present benchmarks of the expression-template
code, the automatically generated C code, and the automatically generated CUDA
code running on several generations of NVIDIA GPU.