Automatic Code Generation TVM Stack

Automatic Code Generation TVM Stack

CSE 599W Spring

TVM stack is an active project by saml.cs.washington.edu and many partners in the open source community

The Gap between Framework and Hardware

Frameworks

CNTK

Each backend to a new software stack on top of it!

Compiler's Perspective to this Problem

Frameworks

CNTK

Express computation

Intermediate Representation (s)

Code generation

Reusable Optimizations

Hardware

Computational Graph as IR

Represent High level Deep Learning Computations

data

w1

conv2d

relu

w2

conv2d

relu

flatten

w3

dense

shape=(1,10)

softmax

attributes

channels=32, kernel_size=(3,3), padding=(1,1), use_bias=0

operation

inputs dataflow dependency

Effective Equivalent Transformations to Optimize the Graph

conv2d bn relu

fused-conv2dbn-relu

Approach taken by: TensorFlow XLA, Intel NGraph, Nvidia TensorRT

XLA: Tensorflow Compiler

! Constant shape dimension ! Data layout is specific ! Operations are low level tensor primitives

Map Broadcast Reduce Convolution ReduceWindow ...

Source: Google

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download