47 - AnyDSL: A Partial Evaluation Framework for Programming High-Performance Libraries [ID:9410]
50 von 531 angezeigt

The following content has been provided by the University of Erlangen-Nürnberg.

Thank you very much for the invitation. So it's a pleasure to be here today. And yeah,

so I'd like to talk a little bit about our efforts on implementing domain-specific languages,

so something that at least a part of you also has been working on or is still working on.

So there's some common interest there. So something that is specific about our approach

is that we are using a technique that is called partial evaluation, so that is often abbreviated

with PE during my talk, just because it's such a long word. Okay, so I guess my goal

for today is to convince you that actually partial evaluation is a powerful technique

that helps you to come up with domain-specific languages in a very effective and efficient

way. Okay, so let me briefly motivate what this is about, and I guess I can make this

short because most of you already know what the issue in programming high-performance codes

really is. So modern hardware is very hard to program, right? So at least if you're interested

in performance, so if you're not interested in performance, I guess programming is not

so hard. Why is that the case? Well, so you have multiple granularities of different kinds

of parallelism, so you have instruction-level parallelism, you have data parallelism, you

have thread-level parallelism, and all that is exposed in the hardware in many different

ways. So you have multi-levels of memory hierarchy. The further you go away from the core, the

slower everything gets, so you have to craft your algorithms in such a way that essentially

you make sure that you have enough locality unless you want to die from latency problems

and so on and so forth. Then layout of data and memory is important, so you need to look

at things like contiguity or take prefetching into account and all these issues, right?

And then of course you have heterogeneity, so you might have shared or non-shared memory,

you might have cache coherence or not, right? So you might have a network on your chip,

you might have GPUs or FPGAs or fixed function units and so on and so forth. And if you want

to leverage all this, then programming really is tough. So the bad news is that a C compiler

essentially won't help you there, right? Why? Well, my answer to this question is a C compiler

essentially or the language C essentially provide abstractions for machines that are

very old, right? So what do you have? What kind of abstractions do you have in C? Well,

you have statements that essentially abstract from the imperative style of executing programs

to execute one statement after the other. You have function calls that abstract from

things like calling conventions, you have variables that abstract from memory locations,

and you have control structures that abstract from branching instructions. But that's essentially

what you get in abstractions in the language, and there's no way of getting any abstractions

for this kind of parallelism or multi-level cache hierarchies and so on and so forth,

right? So maybe this is a provocative statement, but at least it's my opinion, right? So for

me, there's no way of looking into C compilers and having the hope of extracting really high

performance code from C code, right? But nevertheless, to some extent, this is still a state of the

art, right? So at least in my experience, many people in the high performance domain,

what they do is they have a problem in math, then they come up with some kind of pseudo-code

implementation and then they create a C implementation of this algorithm, and then they want to leverage

all these nice compute facilities that they have, some different kinds of hardware, GPUs

and whatnot, right, FPGAs, whatever you have, and then they start using all these fancy

technologies and start annotating their code and they hope for some kind of tool to make

this fast, right? So this is, to some extent, some people do this, right? That might work,

right? Sometimes this may work, but at least in my opinion, it's not really elegant, right?

And it doesn't really solve the problem. It's more kind of hack to still keep going, essentially.

So, let me give you a brief example on what I actually mean by this abstraction. So, in

the beginning, typically in this kind of domains, you start out with some kind of mathematical

description of a problem, then you start using numerics to come up with a discretization,

so that enables you to use computers to solve the problem, and then you could go directly

Presenters

Prof. Dr. Sebastian Hack Prof. Dr. Sebastian Hack

Zugänglich über

Offener Zugang

Dauer

00:47:15 Min

Aufnahmedatum

2018-07-05

Hochgeladen am

2018-07-05 11:37:42

Sprache

de-DE

Tags

HiPACC Futamura Impala Thorin Halide Partial Evaluation
Einbetten
Wordpress FAU Plugin
iFrame
Teilen