Back to search

Nanyang Technological University

A code transformation framework for linear algebra operations targeting multiple platforms

Abstract

dc:description.abstract

Linear algebra is used in many fields of mathematics, natural sciences, computer science, and social science. The researchers in those fields, who are not experienced programmers, may write naive linear algebra codes for their applications. Despite the availability of multiple hardware platforms for computation, such as vector processing units, multi-core processors and general-purpose graphics processing units, it is particularly difficult for them to optimize their applications for these platforms. It is necessary to make use of hardware-specific architectural features to fully exploit the capabilities of the underlying hardware. This thesis presents a code transformation framework for assisting users writing naive linear algebra codes to optimize their applications. The code transformation framework recognizes and extracts the linear algebra operations from naive codes. The linear algebra intermediate representation can be expressed in terms of a domain specific language. The user can also write linear algebra kernels using this language directly. Using the intermediate representation, the framework transforms the linear algebra operations to equivalent library calls. There are two possible classes of code generated from the framework: (i) linear algebra template libraries and (ii) BLAS function calls. The linear algebra template libraries present the linear algebra operations in an algebraic form that is easily understandable by the user, and at the same time provides good performance when codes are compiled. It is possible to target multiple platforms through different linear algebra template libraries, such as Eigen and Armadillo. Although C++ template libraries are more intuitive to the user, these template libraries introduce additional overhead due to the library design. Therefore the code transformation framework is extended to generate calls to BLAS for different platforms, such as Intel MKL or Nvidia CUBLAS. We demonstrate that the code transformation framework can result in better performance in the generated codes compared to those which are generated by existing compilers. This is substantiated by experimental results on different hardware platforms, including vector processing units, multi-core processors and graphics processing units.

Degree

thesis:*
College dc:contributor.school
School of Computer Engineering
Year dc:date.issued
2014

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Tan, Wen Jun
Advisor dc:contributor.supervisor
  • Stephen John Turner

Subjects

dc:subject × 2

Rights

Language dc:language.iso
en

Identifiers

dc:identifier.*
Dc Identifier Citation
Tan, W. J. (2014). A code transformation framework for linear algebra operations targeting multiple platforms. Master’s thesis, Nanyang Technological University, Singapore.

Chain of custody

source
Harvested from
Nanyang Technological University
Base URL
dr.ntu.edu.sg/oai/request
Last updated
2026-11-28
Source record
OAI-PMH GetRecord
citation

Tan, Wen Jun. A code transformation framework for linear algebra operations targeting multiple platforms. 2014. https://doi.org/10.32657/10356/61835