Elamur Research

MLIR: A Compiler Infrastructure for the End of Moore's Law

Paper · 2020 · Chris Lattner, Mehdi Amini, Uday Bondhugula et al.

Summary

A compiler needs different information at different stages of its work. A loop optimizer benefits from seeing where a loop begins and ends, how its bounds are expressed, and which memory accesses depend on its iteration variable. A code generator eventually needs details about the hardware that will execute those accesses. If the compiler translates everything into low-level instructions early, later passes may have to reconstruct the loop. If a language or framework builds its own representation to keep that structure, its developers may also have to build familiar tools for checking, testing, and transforming programs. The MLIR paper proposes shared infrastructure for that work.

The authors organize MLIR around a small set of building blocks. An operation can stand for an instruction, a loop, a function, or a larger unit of code. Operations can contain regions, which give the representation a way to preserve nesting. Values use static single assignment, or SSA, so the compiler can trace a value to a unique definition. Extensions called dialects supply the operations, types, and attributes a domain needs. A declarative specification lets developers state many of an operation’s requirements in one place and generate supporting code and documentation. The infrastructure also handles reading and writing the representation as text, tracking source locations, checking invariants, and scheduling compiler passes, including work that can run concurrently.

This design supports progressive lowering. A compiler can replace a high-level operation with more explicit operations in stages, and different parts of a program can reach different stages at the same time. An affine loop, whose bounds and memory accesses follow specific mathematical restrictions, can keep its structure while the operations in its body move closer to a hardware target. Generic passes can work across dialects when operations expose the properties the passes need. A domain can also supply its own transformations when a pass depends on details that a generic interface cannot express.

The paper evaluates the design through adoption and case studies. It describes TensorFlow graphs, affine code generation, a Fortran representation that makes virtual dispatch explicit, and specialized compilers for rewrite patterns and lattice regression. In the lattice regression case, the authors report 3 person-months of development and up to 8× improvement in execution performance on a production workload. The paper gives no controlled benchmark suite for compile time, generated code, or engineering effort across projects. Its broadest result is that these systems could use the same infrastructure while keeping the abstractions their work required. The authors also identify open questions in verification, the design of reusable abstractions, and the teaching of intermediate representation design.

Deep dive: MLIR: A Compiler Infrastructure for the End of Moore's Law

MLIR lets compiler developers share tools while keeping loops, dataflow graphs, and hardware instructions at the level each transformation needs. · about 34 minutes to read

The problem and its context

Why a shared backend leaves work at the frontend

A compiler’s intermediate representation, or IR, is the form of a program that its analyses and transformations inspect. The choice of IR determines which facts those transformations can obtain directly. A low-level representation makes arithmetic, memory operations, and transfers of control explicit. Those are useful details for generating code, but they can be a difficult starting point for a question about a C++ construct, a Fortran dispatch table, or a computation spread across several devices. By then, the original construct may survive only through its effects.

The paper describes LLVM and the Java Virtual Machine as successful examples of reuse around a shared abstraction. LLVM gives language implementers access to a common infrastructure through an IR close to C in its level of detail, with support for vectors. The JVM supplies an abstraction organized around objects and garbage collection. Both offer useful entry points for important classes of source programs. It is relatively straightforward to map C and C++ into the LLVM abstraction or Java into the JVM abstraction, in the terms of the paper. Other source languages and other stages of compilation can benefit from a different view of the same program.

That is why the authors discuss compiler projects with an additional representation before the shared backend. Swift, Rust, and Julia each illustrate the demand for abstractions suited to their language. The work done at that level might include optimizing a language-specific idiom, checking types with information about possible paths through the program, or breaking a difficult translation into simpler stages. A backend can still do the work for which it was designed. The language project must decide how much infrastructure to build for the stages that precede it.

Building another representation involves more than choosing a list of instructions. Compiler developers need to inspect intermediate states, reproduce bugs, report the origin of an invalid operation, and run passes over the right units of code. A representation created for a narrow purpose may initially serve its transformation well. As more of the compiler comes to depend on it, the costs of weak diagnostics, unreliable corner cases, and difficult debugging become visible to users. The paper treats these costs as a consequence of having to invest separately in similar engineering for each domain.

The same issue appeared in a different form in machine learning. In the authors’ account of TensorFlow execution, graph technologies, compilers, and runtimes supplied different parts of the stack. A computation could travel through paths intended for different deployment settings and devices. The participating systems could have distinct representations and different levels of support for diagnostics or compiler validation. A new hardware path could therefore pose both a code-generation problem and an integration problem. Unreliable behavior at the boundaries was visible in errors, edge cases, and variable performance.

There was a related concern inside the LLVM ecosystem. Parallel constructs can carry information that spans ordinary instructions, and the paper describes difficulty finding a shared way to represent them. The authors also point to the duplication involved in frontend lowering for matters such as C calling conventions or a feature such as OpenMP that crosses language boundaries. Having a common place to perform low-level optimization does not, by itself, give different frontends a shared place to express these higher-level decisions. That gap connects the language and hardware examples in the paper. The relevant field is Code & programming languages.

Why the timing of lowering matters

Lowering is a translation toward a form that exposes more of the work required for execution. For a loop, that may mean moving from a structured construct with a stated body and bounds to a control-flow graph, or CFG. A CFG describes possible paths through blocks of code. A loop can appear as a path that returns to a block it previously reached. This is an effective representation when an optimization works over branches and blocks. A pass concerned with loop bounds or the relationship between nested loops can have a simpler job while that relationship is explicit.

Earlier compilers already used several abstraction levels. The paper describes Open64’s WHIRL as having five. Its Clang example begins with an abstract syntax tree, which represents the structure of source-language constructs. Clang goes through LLVM IR and then through SelectionDAG, MachineInstr, and MCInst. The authors’ concern is the rigidity of such a sequence when a new domain needs to introduce an abstraction, share it with another frontend, or apply different lowering schedules to different parts of a program. A named sequence of representations can give each stage a clear remit. A compiler architecture meant to accommodate new domains also needs a way to change where the boundaries fall.

Pass ordering is part of this problem. A pass is a unit of compiler work that analyzes or transforms some part of the representation. The paper recalls earlier work that combined constant propagation, value numbering, and removal of unreachable code. Constant propagation discovers where a value is known. Value numbering identifies computations that yield the same value. Removing an unreachable path can simplify what remains to analyze. The example matters because the useful order of operations can depend on what becomes visible as the compiler works. A single traversal through large, independent stages can miss interactions between such changes.

The authors distinguish optimization, enabling transformations, lowering, and cleanup as roles that passes can play. The distinction is about purpose. An optimization is intended to improve the program’s compiled form. An enabling change exposes a form another transformation can use. Lowering introduces a more explicit implementation, and cleanup simplifies the representation left behind. A compiler may need to combine these roles around a particular operation. A pipeline that obliges every operation to cross an abstraction boundary together makes that combination harder to express.

A further cost arises when a compiler tries to recover structure after discarding it. A low-level pattern may arise from more than one source construct, and recovering the construct requires assumptions about which transformations have already run. Retaining the information in metadata can spread the maintenance burden across passes that must preserve it. The paper proposes keeping structure in the representation for as long as transformations depend on it. A uniform low-level form still has a purpose once its guarantees and explicit details are more valuable than the source-level distinctions it replaces.

Where the authors place MLIR among earlier systems

Several systems in the paper already addressed parts of heterogeneous compilation. OpenMP extended its scope to offloading work. The authors also discuss C++ AMP, HCC, and SyCL as ways to express accelerator work from high-level C++ within an established compiler flow. In their account, early translation into runtime calls can leave host-language optimization to recover opportunities hidden by the translation. They describe parallel extensions to LLVM as addressing some intermediate representation needs, with much of that work focused on homogeneous execution. Liquid Metal explored a broader combination of language and compilation design for different execution targets, with substantial work devoted to mapping the source abstraction onto hardware.

The authors also identify complementary approaches. Lightweight Modular Staging and Delite provide infrastructure at the level of embedded domain-specific languages and metaprogramming. ANTLR addresses the frontend task of generating a parser for source input. MLIR’s textual support serves a different boundary. It lets compilers read and write their intermediate form, while a system such as ANTLR can help produce a frontend for a source language.

XLA and Glow pursue compilation from graph abstractions toward accelerator code. The authors discuss TVM in the same part of the design space, as well as in connection with loop-nest metaprogramming. They present these code-generation strategies as candidates for a common infrastructure and leave room for each to retain its own strategy. This is a proposal about where to share compiler machinery, with the task of choosing transformations still belonging to the particular compiler. TVM

The paper gives ONNX a different role. It provides a shared set of graph operations as an interoperability format. The authors suggest that such an operation set could be represented as a dialect, so a compiler could transform between that format and other forms using the same infrastructure. In the paper’s proposal, agreement on a graph format and agreement on how to build a compiler can reinforce each other. They solve problems at different boundaries.

The method, step by step

Keep the useful facts in the representation

Consider a compiler working on a loop that reads arrays and accumulates products. It may need to reason about which iterations access the same output element. It may also need to replace the arithmetic with instructions suited to an accelerator. MLIR gives the compiler a way to keep the loop and its indexing rules visible during the first task and change the arithmetic as it works on the second. The representation can hold a high-level description of where the calculation runs and a lower-level description of what happens inside it.

That workflow starts with an operation. A loop operation owns its body, and the body can contain both other loops and individual computations. Dialects give those operations names and define what they mean. An optimizer can inspect the loop through a description of affine bounds and accesses while another transformation inspects arithmetic operations through their types and rules. The compiler eventually replaces the loop with a form that suits its target. The point at which it does so belongs to the pipeline for that program.

How an MLIR pipeline retains structure during lowering

The steps in order.

How an MLIR pipeline retains structure during loweringStep 1: Represent the computation with typed operations1. Represent the computation with typed operationsStep 2: Put structured bodies in nested regions2. Put structured bodies in nested regionsStep 3: Check shared and dialect-specific invariants3. Check shared and dialect-specific invariantsStep 4: Analyze the abstractions needed for optimization4. Analyze the abstractions needed for optimizationStep 5: Rewrite operations into more explicit forms5. Rewrite operations into more explicit formsStep 6: Simplify and verify the resulting IR6. Simplify and verify the resulting IRStep 7: Translate to the target representation7. Translate to the target representation

The flow describes a way to construct a pipeline. A graph compiler, a language frontend, and an accelerator backend may enter it with different operations and choose different intermediate steps. The method is a compiler architecture. Its inputs are programs or existing intermediate representations, and its procedure is to check, analyze, and transform them. The lattice regression case separately introduces search as part of one compiler’s operation.

Give values definitions and code a place to live

An operation is the common unit out of which MLIR builds its representations. It has an opcode, a name identifying its kind, and can take operands and produce results. An operand is a value the operation uses. A result is a value it defines. Both carry types. An operation can produce several results, receive several operands, or have no values in one of those roles. The same underlying record can therefore represent a computation that produces a value, a branch that passes control, or a container for a body of code.

SSA gives each value a unique definition in the IR. A value may have many uses, and reading one of those uses leads back to the same definition. This simplifies operations such as finding which computations depend on the result of an instruction. In a CFG, a use within the appropriate scope must satisfy dominance. A definition dominates a use when every relevant control-flow path to the use passes through the definition. Without that requirement, the representation could refer to a value along a path on which it had never been produced.

Static information belongs in attributes when it is part of the operation’s description at compile time. Attributes have types and are stored on an operation under string keys. An integer constant, a string, or a collection of constant floating-point values are examples. A loop can carry an affine map as an attribute because the compiler needs the map’s structure to analyze the loop. The induction variable, which takes the current iteration’s value, is an SSA value. The map and the variable are available to compiler passes in forms that reflect the different roles they play.

The paper’s generic syntax includes this inline affine form for a lower bound.

() → (0)

The empty parentheses on the left mean the map takes no inputs. The arrow connects the input list to the output list. The parentheses on the right enclose the output, and 0 is the constant the map returns. A map can also have an alias, so a named reference can occupy the place where its full value would otherwise appear. An attribute’s interpretation can depend on its operation or dialect. The infrastructure also allows attributes to refer to data held by a foreign system, such as contents known when a machine-learning computation is compiled.

A region gives an operation somewhere to keep a body. Regions contain blocks, and blocks contain operations, which can themselves own regions. This recursion allows the shape of the IR to follow the structure of nested computation. An affine loop can keep its body in a region. A function can keep a CFG in a region. In both cases the owning operation determines how control enters the body and what it means for control to leave.

In a region with a CFG, a block ends with a terminator. The terminator can transfer control to a successor block within that region or end the region’s execution according to the enclosing operation’s rules. Where incoming paths must supply potentially different values to a common block, MLIR expresses the choice through block arguments. A branch supplies the values for the destination block’s arguments, much as a caller supplies arguments to a function. A conventional SSA representation can express that choice through a φ node, whose incoming value depends on which path was taken. With MLIR’s block arguments, the link between a particular transfer of control and its values appears at the terminator.

The entry block of a region receives its arguments according to the enclosing operation. For an affine loop, the loop operation supplies the iteration variable to the body. An operation in that body can use the argument wherever the scope and dominance rules permit. It can also use a value from an enclosing scope when that value was defined lexically above the region and the relevant enclosing operations allow the reference. These rules let an analysis tell whether a value was supplied by a transfer of control, defined in the body, or captured from surrounding code.

Make scope boundaries useful to the compiler

Some operations declare themselves isolated from above. An operation inside such a boundary cannot directly use an SSA value defined outside it. The function operation used as an example in the paper has this property. A function’s body receives arguments through its own operation semantics and has a defined interface with its surroundings. The compiler can process isolated regions in parallel because SSA definition-to-use chains cannot cross the isolation boundaries. The paper describes concurrent traversal and modification by the pass manager on the strength of that invariant.

Named IR objects have another form of reference. An operation can own a symbol table, which maps names to entities such as functions, globals, and modules. A name must be unique within its table and can be used before its definition. This supports cases such as a reference from a recursive function to that function. Tables can nest when an operation with a table contains other such operations. MLIR provides a way to express references through that nesting.

The two kinds of relationship answer different questions about the program. Local dataflow follows SSA definitions and uses. A reference to a global object goes through a symbol table. The paper links that design to parallel compilation and explains why MLIR avoids keeping whole-module SSA use chains. Constants are represented by operations with attributes, so a constant can participate in the local value structure. The organization of the in-memory representation matters here because independent compiler tasks need a well-defined boundary on the structures they share.

Functions and modules illustrate how much of the architecture can be expressed with the ordinary operation mechanism. In the design described, a module holds a single-block region and has a terminator that performs no control transfer. Its contents can include functions, global declarations, or compiler information. A function contains a region whose entry arguments correspond to the arguments of a call. Execution within the function follows the region’s blocks. A return terminator transfers control back to the caller, and the operands on that terminator supply the returned values. The compiler’s general traversal can find and inspect these structures using the same mechanics it uses for other operations.

Define dialects and describe their contracts

A dialect organizes a set of operations, types, and attributes under its own namespace. In the textual form, the namespace prefixes the operation name. The paper’s affine dialect supplies operations for restricted loops and memory access. Its standard dialect supplies basic operations such as arithmetic. The authors also discuss dedicated dialects for machine instructions on accelerators. Within one loop’s body, an operation may come from one dialect and use a type defined by another.

That freedom leaves a design decision with dialect authors. The paper gives the example of vectors used for hardware instructions and vectors used for algebra. Operations on a hardware vector might describe shuffling elements or using a mask. An algebraic dialect might supply a dot product. The authors of the dialects can decide whether a representation of the vector itself should be shared. Useful reuse depends on whether the type expresses the same assumptions in both contexts, while a namespace makes clear where an operation or type is defined.

Every value’s type is specified by its defining operation or by the block that introduces it as an argument. MLIR checks type equality strictly and leaves conversion semantics to the extensions and transformations that need them. A load operation in the paper’s example takes a memory reference and an index and gives its result the type of the loaded value. The types appearing on the operation tell a reader what is being passed and returned. Convenience types include integers of arbitrary precision, common floating-point types, tuples, vectors, and tensors, which are multidimensional collections of elements.

The paper describes the core type system as non-dependent. An extension can define a parametric type, such as a container whose definition carries information about its elements, and can refer to types from LLVM or Clang. It can also build a dependent typing scheme with user-defined types, symbols, and operations. In that case the corresponding reasoning is opaque to the core IR. The shared infrastructure knows how to hold and check the type identities it is given. Richer judgments have to come from the dialect that understands them.

For many common operation properties, the paper uses Operation Definition Syntax, or ODS. It is a language for writing MLIR operation specifications within TableGen, a record-description tool already used by LLVM. An operation definition can give names and constraints to its operands, attributes, and results, list properties called traits, and supply a description. The definition is translated into C++ that includes operation classes, named accessors, and parts of the verifier. A limited description of custom textual syntax can also be used to generate a reader and writer.

The paper illustrates this with LeakyRelu. Its specification includes a tensor and a floating-point argument and describes a tensor result with the same type as the input tensor. This example shows the difference between requiring that a result be a tensor and requiring that it agree with another value’s type. Constraints can describe the category of a type or a property such as the rank of a vector. Traits can express relationships and other facts, such as the absence of side effects, which matters to a pass that wants to remove an unused operation. The authors say some result types can be deduced from these declarations. When a specification needs more control, developers can provide C++ code for construction, verification, or textual input and output.

Verification first checks facts that make the common representation usable. Types must agree where required, definitions and uses must satisfy SSA and scope rules, blocks must have terminators, and symbol names must be unique in their tables. Operation and attribute verifiers then check their own requirements. An operation can require a particular kind of region, and a dialect’s attribute can impose a restriction on the operation that carries it. A failed invariant aborts compilation in the system the authors describe. The same declarative descriptions generate documentation, so a reader can consult the declared operand and result constraints that also contribute to verification.

Describe how operations can change

A compiler pass can recognize a connected pattern of operations through the links between SSA definitions and uses. The Declarative Rewrite Rule system, or DRR, provides a way to specify these patterns in TableGen. A rule describes what to match, what to build as a replacement, and the constraints under which the replacement applies. It can save operands from the matched operations to use in the new ones. A pattern can also specify a benefit to help prioritize competing rewrites. The local patterns in this account are directed acyclic graphs, meaning their dependency links have a direction and do not loop back within the pattern.

The example extends the LeakyRelu definition by showing a rewrite that introduces a floating-point comparison and a selection. The comparison provides the condition used by the selection. The source operation exposed the computation as a single higher-level concept, while the replacement exposes pieces the next stage can use. Both forms fit the shared operation representation. The rule is generated as C++ and can run in the same graph rewriting framework as patterns whose matching and replacement logic were written directly in C++.

The paper gives simple algebraic examples to illustrate another use for rewrites, canonicalization. Canonicalization simplifies operations or puts them into forms that other passes can recognize more readily.

x − x → 0

Here x names the value used on both sides of the subtraction. The minus sign denotes that subtraction, the arrow denotes a rewrite, and 0 is the replacement value. The rule belongs to operations and conditions under which subtracting a value from itself yields zero. The generic canonicalization machinery relies on the relevant operation semantics supplied to it.

min(x, y, y) → min(x, y)

Here min is a minimum operation, and x and y are its input values. The parentheses enclose an argument list, and the commas separate its entries. The repeated y on the left contributes no additional choice to the minimum in this example, so the arrow leads to a version with the duplicate removed. The point is that a dialect can provide such patterns to the shared canonicalization pass, which can apply them alongside patterns defined for other operations.

MLIR uses several ways to give reusable passes the semantic information they need. A trait can state a property such as the absence of side effects. A hook can supply code for a common action such as constant folding, which evaluates an operation at compile time when its inputs are known. A dialect may implement the hook on behalf of its operations, as in the authors’ example of invoking existing TensorFlow folding logic. Canonicalization patterns can also be supplied through a hook. In all these cases the pass orchestrates a common task and obtains operation-specific information where it is defined.

Optimization interfaces handle questions tied to a particular transformation. An inliner replaces a call with the called computation. To apply the same inliner to different dialects, the pass needs to ask whether the destination region may legally contain the incoming operation. It also needs to know how to handle a former terminator when inlining places it inside a block. The dialect or operation implements those parts of the interface. Missing information leads to conservative treatment. For a transformation that depends thoroughly on one domain, such as instruction scheduling based on particular machine constraints, the framework also allows a dialect-specific pass.

Run, inspect, and connect the stages

The pass manager can run passes on operations at different depths of the representation. A compiler can organize work around functions, but the traversal is also available for other operation kinds that contain bodies. Isolation gives a basis for independent scheduling of suitable work. Selection of the passes and decisions about when to lower remain with the pipeline. A body can therefore acquire target-specific operations while the surrounding structure stays available for an analysis that understands the original loop form.

MLIR’s textual representation is designed to round-trip. Reading the text should recover the in-memory IR represented by it. A generic form exposes operation names, operands, attributes, and types, while a custom form can make the same IR easier to read. The paper illustrates this with generic and custom forms of an affine polynomial multiplication example. The custom format can emphasize what a reader wants to see in a loop, while the generic format displays the underlying operation structure. A compact statement of the update in that example is:

C(i + j) += A(i) × B(j)

A and B denote the input coefficient arrays, and C is the array that receives the accumulated coefficients. i and j are the surrounding loop indices. Parentheses denote an array access at the enclosed index. The plus sign combines the indices to select a position of C, × multiplies the selected inputs, and += adds the product to the value already at that output position. Exposing the sum in the index matters because pairs of loop iterations can contribute to the same output. A pass looking at dependence can obtain the form of the access from the IR.

An intermediate state written as text can serve as input for a test of an individual pass. The comparison with pipeline execution is meaningful when the isolated pass receives the same IR as it would at its position in the pipeline. The text makes that state available for inspection and for a reproducible test. Source locations give diagnostics another link to the original program. The paper describes ways to carry source stack information, file positions, and references to existing debugging or syntax structures through the intermediate representation.

Foreign representations pose a related testing problem, particularly when their files are binary. The authors’ design is to import into a dialect that mirrors the foreign format closely, then make substantial changes in ordinary IR passes. A direct mapping simplifies round-tripping with the external representation. Once the importer has produced MLIR, a separate pass can recover a more useful structure or lower to a more convenient form. The paper describes doing this with LLVM IR and with TensorFlow graph constructs. For instance, a functional conditional or loop whose body is given by a separate function can be transformed so that its body is held in a region. This lets the importer preserve what the external format says while internal transformations work with the structural form they need.

Experiments and results

What the evaluation counts

The authors evaluate whether a common compiler infrastructure can serve projects with very different needs. Their main evidence consists of community participation, adoption, and examples of working representations or compilers. They treat adoption as a proxy for the need for such infrastructure and for its usability. The observations belong to particular projects and events. The evaluation names no shared benchmark dataset, training or test split, or baseline suite across the applications.

The paper reports attendance from 16 universities at a workshop on MLIR in high-performance computing. Four national laboratories, each based in a different country, also took part in the workshop. The authors report endorsements from 14 multinational companies and participation by more than 100 industry developers in an MLIR roundtable at the LLVM Developer Meeting. The organization counts below describe the settings in which each was reported. The largest bar is the largest count among those organization categories. Attendance, involvement, and endorsement are different forms of participation.

Organizations by participation category in the MLIR adoption reports

Universities represented at the workshop form the largest organization category shown.

Organizations by participation category in the MLIR adoption reportsNational laboratories involved in the HPC workshop: 4National laboratories involved in theHPC workshop4Multinational companies endorsing MLIR: 14Multinational companies endorsing MLIR14Universities represented at the HPC workshop (this paper): 16Universities represented at the HPCworkshop (this paper)16
The numbers
System or settingorganizations
National laboratories involved in the HPC workshop4
Multinational companies endorsing MLIR14
Universities represented at the HPC workshop (this paper)16

The authors also report that more than 26 public or private dialects were in development and that 7 projects across different companies were replacing custom infrastructure with MLIR. The former counts extension activity, while the latter gives examples of a decision to change infrastructure. Neither tells the reader how much of the previous pipeline each project had migrated or how much engineering time it saved. The projects described in detail make the diversity behind the counts more concrete.

TensorFlow graphs across deployment settings

TensorFlow presents the infrastructure with a high-level dataflow representation. Its nodes are computations that can be placed on different devices, so a compiler can need information about both what each node computes and where it can execute. The paper illustrates expressing a TensorFlow graph in MLIR using SSA. That lets TensorFlow retain its own graph operations while using the common machinery for representing values and for transforming them.

The authors describe uses ranging from algebraic graph optimization to transformations for accelerator clusters and lowering for mobile deployment. They also describe native-code generation using XLA. These uses place different demands on the representation. A rewrite of an algebraic expression needs to preserve the computation. Retargeting parallel execution needs to preserve the information that makes device placement meaningful. Lowering for deployment has to turn the graph into a form the deployment path can handle. The reported result is the ability to support these tasks within the infrastructure, with no common accuracy, latency, or throughput metric across them.

The interoperability discussion adds a more specific observation. Imports can reflect the structure of existing TensorFlow graphs closely. Once inside MLIR, transformations can reorganize control-flow constructs such as switches and merges into forms that are easier for the compiler to analyze. The experience bears on the claim that a project can adopt MLIR around an existing external representation and move semantic work inside the pipeline. The paper does not quantify the effort of doing so.

Affine code generation with ordinary SSA operations

The affine dialect is a case study in representing a restricted mathematical domain inside the same infrastructure. Polyhedral compilation reasons about structured iterations and accesses using integer sets and affine maps. The authors’ version keeps loops and conditionals visible in the program. affine.for supplies loops with bounds written as affine maps, and affine.if supplies restricted conditionals. affine.load and affine.store express indexed memory accesses under affine restrictions. Those restrictions help dependence analysis determine when operations can touch the same element and when a change in execution order could matter.

The default memory references in the example are injective. Distinct indexings under such a reference do not name the same location. A structured memory reference also carries a layout map that connects buffer indices to addresses. This lets a pass reason about the program’s indexing separately from the physical layout used to store the data. The authors argue that a layout change can then be represented without rewriting the code that expresses the loop and its accesses in the logical index space.

Within the affine loop bodies, the compiler can still see typed SSA operations. A conventional compiler analysis has access to details of the body while an affine transformation has access to the loop structure. The authors report combining affine control flow with simple arithmetic and with machine instructions for accelerators. The polynomial multiplication example makes the combination concrete. The analysis can see the index formed by adding two iterators, and the arithmetic stays explicit as operations. The demonstration establishes that these aspects can coexist. The paper supplies no measured speedup for this kernel and no pass-by-pass comparison with another polyhedral compiler.

Fortran semantics in a shared infrastructure

The Fortran case concerns flang and its use of FIR, a Fortran intermediate representation. Optimizations the authors associate with this level include array copy elimination, specializing calls, and advanced loop transformations. FIR can represent a virtual dispatch table directly. Such a table participates in selecting the function to call when dispatch depends on the object involved. Devirtualization uses available information to replace a dynamically selected call with a more direct one when the selection is known.

Making the table an explicit construct gives the transformation something concrete to inspect. The paper frames this as work that flang developers could concentrate on because shared infrastructure already provided the common representation and tools. A bespoke Fortran IR could also represent a dispatch table. The difference illustrated by FIR is where developers spend the effort of creating it and what other dialects they can use around it. The paper describes shared OpenMP support across Fortran and C as a possibility, and reuse of accelerator-oriented dialects and passes in connection with OpenACC. These are implications of the design. The case study does not quantify savings in development or improvements from devirtualization.

Compiling rewrite patterns and lattice regression

The rewrite system itself supplied a case for a focused compiler. Some applications required rewrite rules that could be extended dynamically, so that vendors could provide new lowering rules in hardware drivers. The authors report representing rewrite patterns in an MLIR dialect. With that representation they used the same compiler infrastructure to build and optimize finite-state matchers and rewriters when needed. A finite-state matcher represents the checks involved in recognizing a pattern as a sequence of states and transitions. The paper relates the optimization techniques to those already used in instruction selection, including LLVM’s SelectionDAG and GlobalISel. It gives no measurements of matcher construction or execution speed.

Lattice regression provides the paper’s reported quantitative performance comparison for a production application. Its existing implementation used C++ templates, which the authors describe as able to produce high-performance code but cumbersome for optimizations spanning the full computation. The replacement was a compiler built with MLIR and used a specialized search during compilation. The compiler therefore changed both the representation used for optimization and the strategy for finding an implementation.

The authors report 3 person-months of development and up to 8× execution-performance improvement on a production lattice regression workload. The effort figure measures the development investment in the new compiler. The performance factor describes the upper end of the improvement reported for the production case relative to the preceding approach. The paper gives no underlying execution times, timing protocol, or workload breakdown. It also reports better visibility into compilation as an outcome, without a numerical diagnostic measure. Taken together, these observations describe what the new implementation achieved in that setting. They do not establish how much of the performance change came from MLIR and how much came from the specialized search.

What the ablations show

The paper has no ablation experiments and instead offers comparisons of representation choices, implementation examples, and experience applying the infrastructure.

The affine case gives the most detailed comparison. The paper describes approaches that raise a program into a separate polyhedral representation, transform the representation, and generate loops from the result. This route makes powerful mathematical descriptions of scheduling available, at the cost of a substantial conversion between forms. MLIR’s affine example keeps a loop in the IR with restricted bounds and accesses. Because the loop remains part of the program’s structure, the approach avoids a separate polyhedron-scanning step to recover a loop nest. This identifies a specific source of work that the representation can avoid. There is no timing study of otherwise identical pipelines with and without that step.

The comparison also establishes what information can remain available together. A separate mathematical representation may omit details of the operations inside a loop. In the MLIR example, the body retains typed SSA values, including information relevant to ordinary arithmetic and vector operations. This lets a pipeline interleave conventional and polyhedral transformations and lets a dialect make the semantics needed for a particular transformation available through an interface. The evidence is expressiveness and a mechanism for composition. The paper does not establish how often combining those transformations improves generated code.

Another comparison concerns layout. Keeping the physical mapping within the memory reference gives the compiler separate access to logical subscripts and layout. In the multiplication example, the dependence question concerns accesses indexed by the loop iterators. The way the buffer maps those indices to addresses is available through its own description. The authors argue that this division helps loop and layout transformations compose. They do not run a comparison in which the layout information is instead embedded in each address calculation and the rest of the compiler is held fixed.

The reusable pass discussion analyzes how much a pass needs to know about an operation. A simple property can suffice for a pass removing an unused operation. Folding a domain-specific constant can call for a dedicated implementation. Inlining requires an answer about placement in a particular region and a way to handle the displaced terminator. These examples show why the infrastructure provides traits, hooks, and interfaces at different levels of specificity. They also explain the conservative behavior when a dialect supplies little information. The opportunity to optimize increases as the dialect exposes trustworthy semantic facts, but the paper does not report coverage or generated-code quality before and after adding those facts.

The lattice regression predecessor is a meaningful practical comparison because it was the implementation the project already had. It cannot serve as an ablation of the infrastructure because the replacement introduces a new compiler and a search procedure together. The performance result supports the usefulness of the completed implementation. The account of affine lowering and the analysis of reusable passes give the clearest explanations of individual mechanisms, and their evidence comes from design and implementation rather than from isolated performance measurements.

Limitations

Limits identified by the authors

A small common core puts significant responsibility on the people designing dialects. The authors see the possibility of fragmentation within MLIR itself. Teams can invent similar operations with different conventions or define incompatible types for related tasks. A project may still gain from tools that understand the same structural representation, while sharing fewer analyses and transformations than the infrastructure permits. The paper encourages the design of abstractions that can be reused outside their initial setting. It presents the choice of boundaries and semantics as an open design problem.

The authors also acknowledge a tradeoff around normalization. A normalized form reduces the variety a pass has to handle. A common CFG form for loops, with recognized roles for blocks at entry and around the repeated body, lets a pass work uniformly over loops derived from several source constructs. Preserving nested regions retains information useful for other analyses, while introducing the problem of making CFG-based techniques work across those nested structures. MLIR offers both forms, and the authors leave room for compilers to choose when a more constrained form pays off. The framework does not decide that point automatically.

Verification and translation validation are different levels of assurance in the paper. The verifier can establish that uses are visible, types match, and operations satisfy their declared structural requirements. Translation validation concerns whether a transformed program preserves the properties it should preserve. The authors identify validation and broader compiler testing in an extensible setting as open research problems. An operation can be structurally valid after a rewrite while the rewrite itself computes the wrong result. General reasoning about rewrite strategies, including their soundness and whether they run to completion with reproducible behavior, also remains a direction for work.

Location tracking helps identify the origin of operations and gives a compiler a place to carry useful provenance. The authors discuss its importance for sensitive compilation and certification, where observable execution properties can matter alongside the functional result. They present propagation and traceability as steps toward that goal. The paper does not supply a general assurance procedure that verifies preservation of those properties through the whole pipeline.

The paper also marks limits at the language and domain boundaries. It places source parser generation and general construction of abstract syntax trees outside the supplied capabilities. Dependent type reasoning can be encoded by an extension but stays opaque to the core representation. Support for garbage-collected languages and richer type systems with inference remains an open challenge. The authors propose a C++ intermediate representation built from Clang as a way to retain common abstractions, such as treating std::vector as an array during relevant optimization. They similarly propose more exploration of parallel constructs as operations with their own regions and verifiers. These directions describe possibilities the design opens up. The authors explicitly leave a full treatment of the affine dialect’s design outside the scope of the paper.

Limits of the evidence

The evaluation gives evidence of applicability across domains. A common representation supports the construction of the examples the authors describe. A broader claim about reduction in engineering effort would require comparable project scopes and an accounting of the work performed with each infrastructure. The adoption counts give no such comparison. They also reflect different activities. Endorsing the project, attending a discussion, developing a dialect, and replacing an existing compiler component represent different degrees of commitment.

The lattice regression case is unusually concrete because the authors give an effort estimate and a performance factor. There is still no distribution of the improvement across inputs or comparison across targets. The report gives the high end, with no lower end or typical result, and names a production case without reporting individual timings. It gives no effort estimate for building the same compiler with another infrastructure. The result therefore has force as a case of successful engineering and leaves the size of the general benefit undetermined.

Several claims concern reasons to expect compile-time gains. Regions with an isolation boundary support parallel work. Keeping affine loops explicit can remove a conversion step. Both are tangible properties of the design. To estimate their practical impact, a reader would need to know how much work is available in independent regions, how expensive the relevant passes are, and how much conversion cost the alternative incurs. The paper does not measure compile-time scaling with available cores or compare compilation durations on a common workload. Those results could vary with the dialect mix and pass pipeline even if the proposed mechanisms behave as described.

The demonstrations also leave open how much reuse persists after the first version of a compiler is working. Dialects can coexist even when few of their operations expose common optimization interfaces. A compiler may then rely heavily on domain-specific code. Conversely, a carefully chosen interface can make a pass useful in several domains without their sharing types and operations wholesale. The examples explain how either arrangement fits MLIR. They give no cross-project measure of how often the generic pass is applicable, how much code it replaces, or what it costs to maintain the interface as dialects evolve.

Finally, diagnostic quality and readiness for education are different possible benefits of the textual IR and source locations. The paper shows mechanisms that make it practical to inspect intermediate states and build small tests. It proposes using those mechanisms to teach IR design and interactions between passes. It reports neither a study of diagnostic outcomes nor an evaluation of student learning. Those ambitions follow from concrete design features, while their effects remain questions for later work.

What came after

The later citing works span program tuning, a Python-to-silicon toolchain, and tool manipulation. The citation relationships connect these topics to the MLIR paper. The extent of an implementation connection is clear only when a work says how it uses a compiler representation, a lowering mechanism, or another specific part of the infrastructure.

ProTuner applies Monte Carlo tree search to program tuning. It addresses how to explore choices when looking for a good program configuration. That question is adjacent to the MLIR paper’s design for representing and applying transformations. An infrastructure can make different configurations expressible, while a search method addresses which choices to explore. The citation alone does not establish that ProTuner represents its candidates in MLIR or runs an MLIR pass pipeline. ProTuner

The SODA work takes up the problem of connecting Python to silicon. Its subject is close to MLIR’s concern with retaining useful high-level structure while making successive implementation decisions visible on the way to a hardware target. A path between those endpoints raises questions about what to preserve at each stage and how to translate between the relevant representations. The citation does not identify which SODA stages use MLIR, which dialects are involved, or how the toolchain divides its work. SODA toolchain

Xu and colleagues study the ability of open-source systems to manipulate tools. The topic is further from the compiler case studies. Its citation establishes a connection in the literature, with no specified use of MLIR operations, passes, or lowering in the study. It would take a description of the study’s method to identify a narrower relationship. Xu and colleagues’ tool-manipulation study

Cite

Cite as Chris Lattner, Mehdi Amini, Uday Bondhugula, Albert Cohen, Andy Davis, Jacques Pienaar, River Riddle, Tatiana Shpeisman, Nicolas Vasilache and Oleksandr Zinenko. 2020. MLIR: A Compiler Infrastructure for the End of Moore's Law. arXiv:2002.11054.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.2002.11054 · arXiv 2002.11054

@misc{lattner2020mlir,
  title = {{MLIR: A Compiler Infrastructure for the End of Moore's Law}},
  author = {Chris Lattner, Mehdi Amini, Uday Bondhugula, Albert Cohen, Andy Davis, Jacques Pienaar, River Riddle, Tatiana Shpeisman, Nicolas Vasilache and Oleksandr Zinenko},
  year = {2020},
  doi = {10.48550/arxiv.2002.11054},
  eprint = {2002.11054},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2002.11054}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/lattner-2020-mlir-compiler-infrastructure-end-moore/

References

58 references, from the paper's own bibliography.

  1. M. Abadi, A. Agarwal, P. Barham, E. Brevdo, Z. Chen, C. Citro, G. S. Corrado, A. Davis, J. Dean, M. Devin, S. Ghemawat, I. Goodfellow, A. Harp, G. Irving, M. Isard, Y. Jia, R. Jozefowicz, L. Kaiser, M. Kudlur, J. Levenberg, D. Mané, R. Monga, S. Moore, D. Murray, C. Olah, M. Schuster, J. Shlens, B. Steiner, I. Sutskever, K. Talwar, P. Tucker, V. Vanhoucke, V. Vasudevan, F. Viégas, O. Vinyals, P. Warden, M. Wattenberg, M. Wicke, Y. Yu, and X. Zheng. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. Software available from tensorflow.org. OpenAlex ↗ · Scholar ↗
  2. A. W. Appel. SSA is functional programming. ACM SIGPLAN NOTICES, 33(4):17–20, 1998. OpenAlex ↗ · Scholar ↗
  3. J. Auerbach, D. F. Bacon, I. Burcea, P. Cheng, S. J. Fink, R. Rabbah, and S. Shukla. A compiler and runtime for heterogeneous computing. In Proceedings of the 49th Annual Design Automation Conference, DAC '12, pages 271–276, New York, NY, USA, 2012. ACM. OpenAlex ↗ · Scholar ↗
  4. R. Baghdadi, J. Ray, M. B. Romdhane, E. Del Sozzo, A. Akkas, Y. Zhang, P. Suriana, S. Kamil, and S. Amarasinghe. Tiramisu: A polyhedral compiler for expressing fast and portable code. In Proceedings of the 2019 IEEE/ACM International Symposium on Code Generation and Optimization, CGO 2019, page 193–205. IEEE Press, 2019. OpenAlex ↗ · Scholar ↗
  5. L. Bagnères, O. Zinenko, S. Huot, and C. Bastoul. Opening polyhedral compiler's black box. In Proceedings of the 2016 International Symposium on Code Generation and Optimization, CGO 2016, Barcelona, Spain, March 12-18, 2016, pages 128–138, 2016. OpenAlex ↗ · Scholar ↗
  6. G. Balakrishnan and T. Reps. Wysinwyx: What you see is not what you execute. ACM Trans. Program. Lang. Syst., 32(6):23:1–23:84, Aug. 2010. OpenAlex ↗ · Scholar ↗
  7. C. Bastoul. Code generation in the polyhedral model is easier than you think. In Proceedings of the 13th International Conference on Parallel Architectures and Compilation Techniques, PACT '04, pages 7–16, Washington, DC, USA, 2004. IEEE Computer Society. OpenAlex ↗ · Scholar ↗
  8. U. Bondhugula, A. Hartono, J. Ramanujam, and P. Sadayappan. A practical automatic polyhedral parallelizer and locality optimizer. In Proceedings of the ACM SIGPLAN 2008 Conference on Programming Language Design and Implementation, Tucson, AZ, USA, June 7-13, 2008, pages 101–113, 2008. OpenAlex ↗ · Scholar ↗
  9. M. Bravenboer, K. T. Kalleberg, R. Vermaas, and E. Visser. Stratego/xt 0.17. A language and toolset for program transformation. Sci. Comput. Program., 72(1-2):52–70, 2008. OpenAlex ↗ · Scholar ↗
  10. L. Chelini, O. Zinenko, T. Grosser, and H. Corporaal. Declarative loop tactics for domain-specific optimization. TACO, 16(4):55:1–55:25, 2020. OpenAlex ↗ · Scholar ↗
  11. T. Chen, T. Moreau, Z. Jiang, L. Zheng, E. Yan, H. Shen, M. Cowan, L. Wang, Y. Hu, L. Ceze, C. Guestrin, and A. Krishnamurthy. TVM: An automated end-to-end optimizing compiler for deep learning. In 13th USENIX Symposium on Operating Systems Design and Implementation (OSDI 18), pages 578–594, Carlsbad, CA, Oct. 2018. USENIX Association. our card
  12. Y. Chen, A. Groce, C. Zhang, W. Wong, X. Z. Fern, E. Eide, and J. Regehr. Taming compiler fuzzers. In ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '13, Seattle, WA, USA, June 16-19, 2013, pages 197–208, 2013. OpenAlex ↗ · Scholar ↗
  13. C. Click and K. D. Cooper. Combining analyses, combining optimizations. ACM Trans. Program. Lang. Syst., 17(2):181–196, Mar. 1995. OpenAlex ↗ · Scholar ↗
  14. A. Cohen, S. Donadio, M.-J. Garzaran, C. Herrmann, O. Kiselyov, and D. Padua. In search of a program generator to implement generic transformations for high-performance computing. Sci. Comput. Program., 62(1):25–46, Sept. 2006. OpenAlex ↗ · Scholar ↗
  15. R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman, and F. K. Zadeck. Efficiently computing static single assignment form and the control dependence graph. ACM Trans. Program. Lang. Syst., 13(4):451–490, Oct. 1991. OpenAlex ↗ · Scholar ↗
  16. V. Elango, N. Rubin, M. Ravishankar, H. Sandanagobalane, and V. Grover. Diesel: Dsl for linear algebra and neural net computations on gpus. In Proceedings of the 2nd ACM SIGPLAN International Workshop on Machine Learning and Programming Languages, MAPL 2018, pages 42–51, New York, NY, USA, 2018. ACM. OpenAlex ↗ · Scholar ↗
  17. P. Feautrier. Some efficient solutions to the affine scheduling problem. part II. multidimensional time. Int. J. Parallel Program., 21(6):389–420, 1992. OpenAlex ↗ · Scholar ↗
  18. E. Garcia and M. Gupta. Lattice regression. In Y. Bengio, D. Schuurmans, J. D. Lafferty, C. K. I. Williams, and A. Culotta, editors, Advances in Neural Information Processing Systems 22, pages 594–602. Curran Associates, Inc., 2009. OpenAlex ↗ · Scholar ↗
  19. S. Girbal, N. Vasilache, C. Bastoul, A. Cohen, D. Parello, M. Sigler, and O. Temam. Semi-automatic composition of loop transformations for deep parallelism and memory hierarchies. Int. J. Parallel Program., 34(3):261–317, June 2006. OpenAlex ↗ · Scholar ↗
  20. T. Grosser, A. Größlinger, and C. Lengauer. Polly - performing polyhedral optimizations on a low-level intermediate representation. Parallel Processing Letters, 22(4), 2012. OpenAlex ↗ · Scholar ↗
  21. W. A. Havanki, S. Banerjia, and T. M. Conte. Treegion scheduling for wide issue processors. In Proceedings of the Fourth International Symposium on High-Performance Computer Architecture, Las Vegas, Nevada, USA, January 31 - February 4, 1998, pages 266–276, 1998. OpenAlex ↗ · Scholar ↗
  22. R. Johnson, D. Pearson, and K. Pingali. The program structure tree: Computing control regions in linear time. In Proceedings of the ACM SIGPLAN 1994 Conference on Programming Language Design and Implementation, PLDI '94, pages 171–185, New York, NY, USA, 1994. ACM. OpenAlex ↗ · Scholar ↗
  23. D. Khaldi, P. Jouvelot, F. Irigoin, C. Ancourt, and B. Chapman. LLVM parallel intermediate representation: Design and evaluation using OpenSHMEM communications. In Proceedings of the Second Workshop on the LLVM Compiler Infrastructure in HPC, LLVM '15, pages 2:1–2:8, New York, NY, USA, 2015. ACM. OpenAlex ↗ · Scholar ↗
  24. S. Kou and J. Palsberg. From oo to fpga: Fitting round objects into square hardware? In Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA '10, pages 109–124, New York, NY, USA, 2010. ACM. OpenAlex ↗ · Scholar ↗
  25. C. Lattner and V. Adve. LLVM: A compilation framework for lifelong program analysis & transformation. In Proceedings of the International Symposium on Code Generation and Optimization: Feedback-directed and Runtime Optimization, CGO '04, pages 75–, Washington, DC, USA, 2004. IEEE Computer Society. OpenAlex ↗ · Scholar ↗
  26. T. Lindholm and F. Yellin. Java Virtual Machine Specification. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 2nd edition, 1999. OpenAlex ↗ · Scholar ↗
  27. J. Meseguer. Twenty years of rewriting logic. In Proceedings of the 8th International Conference on Rewriting Logic and Its Applications, WRLA'10, pages 15–17, Berlin, Heidelberg, 2010. Springer-Verlag. OpenAlex ↗ · Scholar ↗
  28. R. T. Mullapudi, V. Vasista, and U. Bondhugula. PolyMage: Automatic optimization for image processing pipelines. In International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), pages 429–443, 2015. OpenAlex ↗ · Scholar ↗
  29. G. C. Necula. Translation validation for an optimizing compiler. SIGPLAN Not., 35(5):83–94, May 2000. OpenAlex ↗ · Scholar ↗
  30. Open64 Developers. Open64 compiler and tools, 2001. OpenAlex ↗ · Scholar ↗
  31. OpenACC application programming interface. Online, https://www.openacc.org, accessed Feb 19, 2020. OpenAlex ↗ · Scholar ↗
  32. OpenMP ARB. The OpenMP API specification for parallel programming. Online, https://www.openmp.org, accessed Feb 19, 2020. OpenAlex ↗ · Scholar ↗
  33. T. J. Parr and R. W. Quong. Antlr: A predicated-ll(k) parser generator. Softw. Pract. Exper., 25(7):789–810, July 1995. OpenAlex ↗ · Scholar ↗
  34. J. Planas, R. M. Badia, E. Ayguadé, and J. Labarta. Hierarchical task-based programming with starss. IJHPCA, 23(3):284–299, 2009. OpenAlex ↗ · Scholar ↗
  35. A. Pnueli, M. Siegel, and E. Singerman. Translation validation. In Tools and Algorithms for Construction and Analysis of Systems, 4th International Conference, TACAS '98, Held as Part of the European Joint Conferences on the Theory and Practice of Software, ETAPS'98, Lisbon, Portugal, March 28 - April 4, 1998, Proceedings, pages 151–166, 1998. OpenAlex ↗ · Scholar ↗
  36. J. Ragan-Kelley, A. Adams, D. Sharlet, C. Barnes, S. Paris, M. Levoy, S. Amarasinghe, and F. Durand. Halide: Decoupling algorithms from schedules for high-performance image processing. Commun. ACM, 61(1):106–115, Dec. 2017. OpenAlex ↗ · Scholar ↗
  37. G. Ramalingam. On loops, dominators, and dominance frontiers. ACM Trans. Program. Lang. Syst., 24(5):455–490, 2002. OpenAlex ↗ · Scholar ↗
  38. C. Reddy and U. Bondhugula. Effective automatic computation placement and data allocation for parallelization of regular programs. In Proceedings of the 28th ACM International Conference on Supercomputing, ICS '14, pages 13–22, New York, NY, USA, 2014. ACM. OpenAlex ↗ · Scholar ↗
  39. T. Rompf and M. Odersky. Lightweight modular staging: a pragmatic approach to runtime code generation and compiled dsls. Commun. ACM, 55(6):121–130, 2012. OpenAlex ↗ · Scholar ↗
  40. N. Rotem, J. Fix, S. Abdulrasool, G. Catron, S. Deng, R. Dzhabarov, N. Gibson, J. Hegeman, M. Lele, R. Levenstein, J. Montgomery, B. Maher, S. Nadathur, J. Olesen, J. Park, A. Rakhov, M. Smelyanskiy, and M. Wang. Glow: Graph lowering compiler techniques for neural networks, 2018. OpenAlex ↗ · Scholar ↗
  41. G. Rudy, M. M. Khan, M. Hall, C. Chen, and J. Chame. A programming language interface to describe transformations and code generation. In K. Cooper, J. Mellor-Crummey, and V. Sarkar, editors, Languages and Compilers for Parallel Computing, pages 136–150, Berlin, Heidelberg, 2011. Springer Berlin Heidelberg. OpenAlex ↗ · Scholar ↗
  42. T. B. Schardl, W. S. Moses, and C. E. Leiserson. Tapir: Embedding fork-join parallelism into LLVM's intermediate representation. SIGPLAN Not., 52(8):249–265, Jan. 2017. OpenAlex ↗ · Scholar ↗
  43. B. Schommer, C. Cullmann, G. Gebhard, X. Leroy, M. Schmidt, and S. Wegener. Embedded Program Annotations for WCET Analysis. In WCET 2018: 18th International Workshop on Worst-Case Execution Time Analysis, volume 63, Barcelona, Spain, July 2018. Dagstuhl Publishing. OpenAlex ↗ · Scholar ↗
  44. E. Schweitz. An MLIR dialect for high-level optimization of fortran. LLVM Developer Meeting, Oct 2019. OpenAlex ↗ · Scholar ↗
  45. A. K. Sujeeth, K. J. Brown, H. Lee, T. Rompf, H. Chafi, M. Odersky, and K. Olukotun. Delite: A compiler architecture for performance-oriented embedded domain-specific languages. ACM Trans. Embedded Comput. Syst., 13(4s):134:1–134:25, 2014. OpenAlex ↗ · Scholar ↗
  46. SyCL: C++ single-source heterogeneous programming for OpenCL. Online, https://www.khronos.org/sycl, accessed Feb 19, 2020. OpenAlex ↗ · Scholar ↗
  47. TableGen - LLVM 10 Documentation. Online, =https://llvm.org/docs/TableGen/, accessed Nov 22, 2019, 2019. OpenAlex ↗ · Scholar ↗
  48. The Linux Foundation. ONNX: Open neural network exchange. Online, https://github.com/onnx/onnx, accessed Feb 19, 2020. OpenAlex ↗ · Scholar ↗
  49. P. Thier, M. A. Ertl, and A. Krall. Fast and flexible instruction selection with constraints. In Proceedings of the 27th International Conference on Compiler Construction, CC 2018, pages 93–103, New York, NY, USA, 2018. ACM. OpenAlex ↗ · Scholar ↗
  50. J. Tristan and X. Leroy. Formal verification of translation validators: a case study on instruction scheduling optimizations. In Proceedings of the 35th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2008, San Francisco, California, USA, January 7-12, 2008, pages 17–27, 2008. OpenAlex ↗ · Scholar ↗
  51. J. Tristan and X. Leroy. Verified validation of lazy code motion. In Proceedings of the 2009 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2009, Dublin, Ireland, June 15-21, 2009, pages 316–326, 2009. OpenAlex ↗ · Scholar ↗
  52. N. Vasilache, O. Zinenko, T. Theodoridis, P. Goyal, Z. Devito, W. S. Moses, S. Verdoolaege, A. Adams, and A. Cohen. The next 700 accelerated layers: From mathematical expressions of network computation graphs to accelerated GPU kernels, automatically. ACM Trans. Archit. Code Optim., 16(4):38:1–38:26, Oct. 2019. OpenAlex ↗ · Scholar ↗
  53. A. Veen. Dataflow machine architecture. ACM Comput. Surv., 18:365–396, 12 1986. OpenAlex ↗ · Scholar ↗
  54. S. Verdoolaege. ISL: An integer set library for the polyhedral model. In Proceedings of the Third International Congress Conference on Mathematical Software, ICMS'10, pages 299–302, Berlin, Heidelberg, 2010. Springer-Verlag. OpenAlex ↗ · Scholar ↗
  55. S. Verdoolaege, J. Carlos Juega, A. Cohen, J. Ignacio Gómez, C. Tenllado, and F. Catthoor. Polyhedral parallel code generation for CUDA. ACM Trans. Archit. Code Optim., 9(4):54:1–54:23, Jan. 2013. OpenAlex ↗ · Scholar ↗
  56. S. T. Vu, K. Heydemann, A. de Grandmaison, and A. Cohen. Secure delivery of program properties through optimizing compilation. In ACM SIGPLAN 2020 International Conference on Compiler Construction (CC 2020), San Diego, CA, Feb. 2020. OpenAlex ↗ · Scholar ↗
  57. XLA - TensorFlow, compiled. Google Developers Blog, https://developers.googleblog.com/2017/03/xla-tensorflow-compiled.html, Mar 2017. OpenAlex ↗ · Scholar ↗
  58. T. Zerrell and J. Bruestle. Stripe: Tensor compilation via the nested polyhedral model. CoRR, abs/1903.06498, 2019. OpenAlex ↗ · Scholar ↗