Compiling Diderot: From Tensor Calculus to C

02/19/2018
by   Charisee Chiw, et al.
0

Diderot is a parallel domain-specific language for analysis and visualization of multidimensional scientific images, such as those produced by CT and MRI scanners. In particular, it supports algorithms where tensor fields (i.e., functions from 3D points to tensor values) are used to represent the underlying physical objects that were scanned by the imaging device. Diderot supports higher-order programming where tensor fields are first-class values and where differential operators and lifted linear-algebra operators can be used to express mathematical reasoning directly in the language. While such lifted field operations are central to the definition and computation of many scientific visualization algorithms, to date they have required extensive manual derivations and laborious implementation. The challenge for the Diderot compiler is to effectively translate the high-level mathematical concepts that are expressible in the surface language to a low-level and efficient implementation in C. This paper describes our approach to this challenge, which is based around the careful design of an intermediate representation (IR), called EIN, and a number of compiler transformations that lower the program from tensor calculus to C while avoiding combinatorial explosion in the size of the IR. We describe the challenges in compiling a language like Diderot, the design of EIN, and the transformation used by the compiler. We also present an evaluation of EIN with respect to both compiler efficiency and quality of generated code.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/09/2021

A High-Performance Sparse Tensor Algebra Compiler in Multi-Level IR

Tensor algebra is widely used in many applications, such as scientific c...
research
03/15/2022

DISTAL: The Distributed Tensor Algebra Compiler

We introduce DISTAL, a compiler for dense tensor algebra that targets mo...
research
01/10/2022

RISE Shine: Language-Oriented Compiler Design

The trend towards specialization of software and hardware - fuelled by t...
research
10/01/2021

An Attempt to Generate Code for Symmetric Tensor Computations

This document describes an attempt to develop a compiler-based approach ...
research
09/12/2023

Accelerating model evaluations in uncertainty propagation on tensor grids using computational graph transformations

Methods such as non-intrusive polynomial chaos (NIPC), and stochastic co...
research
04/17/2019

Relay: A High-Level Compiler for Deep Learning

Frameworks for writing, compiling, and optimizing deep learning (DL) mod...
research
12/05/2018

Gems of Corrado Böhm

The main scientific heritage of Corrado Böhm is about computing, both co...

Please sign up or login with your details

Forgot password? Click here to reset