►
From YouTube: Apache TVM Community Meeting, April 20, 2022
A
Okay,
so
welcome
everyone
to
the
april
20th
edition
of
micro
tv
community
meeting.
We
have
a
great
topic
today
where
youtube's
gonna
present
on
on
relax
before
we
get
started
with
that.
I
just
wanted
to
take
a
moment.
Anyone
who's
new.
If
anyone
wants
to
briefly
introduce
themselves,
tell
us
a
little
bit
about
what
got
you
interested
in
tvm.
What
you're
interested
in
working
on
feel
free
to
do
so
now,
we'll
give
a
second
here
for
that.
A
I
do
see
a
lot
of
familiar
faces
here,
so
not
expecting
a
ton
of
introductions,
but
just
wanted
to
give
a
brief
moment
for
that
next.
Okay,
so
we
have
basically
one
agenda
item
today,
which
is
just
to
discuss,
relax
and
just
does
anyone
have
anything
else
they
wanted
to
bring
up
or
make
any
changes
kind
of
late
breaking
changes
now.
A
All
right
hearing,
none,
let's
go
on
to
the
announcements.
So
just
a
couple
announcements.
This
week
we
have
a
new
committer
lou
cutton,
as
well
as
ellen
calda
as
a
new
reviewer,
and
I
believe,
luke
worked
on
some
of
the
arm
seems
to
end
stuff,
as
well
as
some
of
the
aot
stuff
and
ellen
works
on
some
of
the
micro
mpu
stuff,
as
well
as
well
as
cascade
scheduling
and
pattern
matching.
So
welcome
welcome
and
excited
to
have
you
guys
as
part
of
the
community,
as
always.
A
So
with
that
I'll
hand
the
floor
over
to
you
chen,
so
we
can
hear
about
relax.
B
Cool
I'm
gonna
share
my
screen
go
for
it
cool.
Can
you
see
the
slice.
B
Awesome
yeah
thanks
everyone
for
coming
today.
It's
really
a
great
honor
to
talk
about,
relax
and
share
our
efforts
with
the
whole
community
and
relax
is
a
collaborative
effort
that
many
community
members
are
involved
and
actually
a
lot
of
whom
are
in
the
audience
today.
B
So
the
main
purpose
of
this
meeting
is
to
foster
open
discussion
about
relax,
so
feel
free
to
interrupt
me
at
any
time.
If
you
have
any
questions
and
for
the
relaxed
contributors
and
feel
free
to
chime
in
during
the
talk.
So
it's
a
little
bit
informal,
and
so
let's
talk
about
why
we
started
the
effort.
So
relay
has
been
the
graph
level
intermediate
representation
in
pvm
since
2018,
and
almost
one
year
ago
a
bunch
of
community
members
asked
asked
such
a
question.
B
B
B
In
today's
tvm,
for
example,
the
lowering
from
relay
to
tr
programs
are
done
in
a
single
pass
and
it
makes
it
really
hard
to
lower
part
of
the
program
and
incrementally
lower
different
parts
of
a
program.
In
addition
to
that,
the
lowering
goes
in
one
direction.
So
once
the
relay
program
is
lowered
to
tensor
ir
program,
it's
hard
to
send
the
auto
tuning
information
back
to
the
high
level
to
rewrite
and
optimize
the
high
level
graph,
for
example,
the
auto
tuning.
B
So
to
achieve
this
goal,
the
key
design
point
we
made
in
lex
is
to
allow
the
high
level
r
to
be
able
to
directly
interact
and,
according
to
the
low
level,
cancer,
r
programs
and
runtime
pack
functions.
B
So
here
is
a
program
written
in
pvm
script,
which
is
the
python
dsl
that
is
widely
used
in
cancer
io.
Today
we
can
see
that
this
iron
module
contains
two
functions,
a
case,
ir
print
function
and
a
relax
function.
B
So
this
relax
function
represents
the
high
level
computational
graph
and
the
tr
program
represents
a
kernel
implementation
and
we
came
up
with
two
intrinsics
in
relax
to
bridge
the
gap
between
different
abstraction
levels.
B
The
first
one
is
called
pact.
It
indicates
that
in
the
high
level
error
we
can
drag
it
according
to
a
runtime
pack
function.
It
can
be
like
third-party
libraries
like
coding
function
or
like
some
customized
functions,
registered
using
tbm,
ffi
and
people
can
write
it
in
python
and
incorporate
that
in
your
high-level
high-level
computational
graph,
and
the
second
interest
intrinsic
we
introduced
is
a
kotia
which
allows
user
to
call
into
a
pr
function
and
also
it
actually
allows
for
calling
into
a
pack
function,
biking
an
immutable
way.
B
So
the
pr
in
this,
the
core
tr
the
tr
here-
means
like
a
tir
calling
convention.
So
it's
not
limited
to
pr
program,
but
the
most
use
case
is
to
call
into
some
tr
function
as
shown
here.
So
basically
we
have
this
dr
function
and
the
second
argument
is
the
input
input
tensor
here
and
the
third
argument
is
the
output
shape
and,
fourth
is
the
output
data
type.
B
So,
basically,
through
these
two
intrinsics,
we
bring
the
low
level
cost
into
the
high-level
data
flow
land,
and
this
will
unlock
a
lot
of
like
interesting
opportunities.
B
For
example,
I
think
michael
here
he
once
wrote
a
test
ir
program
and
he
want
to
add
that
to
his
model,
but
he
found
out.
He
needs
to
modify
a
few
places
to
be
able
to,
according
to
his
customize
the
tensile
program
by
inside
relax,
you
can
actually
write
it
in
tvm
script
and
directly
construct
your
model,
and
you
can
write
core
tr
into
your
customized
kansai
program
and
also
like.
B
And
secondly,
it
also
makes
the
incremental
lowering
possible.
So,
basically,
you
can
incrementally
lower
different
parts
of
your
program
and
at
any
stage
of
the
transformation,
the
program
is
represented
with
an
ir
module
which
can
contain
both
pir
print
functions
and
relax
functions,
and
it
also
allows
the
automation
decisions
like
the
beta
schedule
to
take
a
core
tr
node
and
perform
some
optimizations
and
rewrite
it
into
several.
Several
core
plan
nodes
that
inform
the
layout
of
writing
decisions
to
the
high
level.
B
So
it
has
the
enables
the
capability
to
send
some
feedback
to
the
high
level
and
do
the
rewriting
for
both
the
high
level
relax
functions
and
the
low
level
test
ir
functions
together
and
also
it
brings
the
byoc
flow
as
a
natural
part
of
the
transformation,
because
we
can
transform
part
of
the
graph
into
some
course
of
some
opaque
type
functions.
So
these
are
the
opportunities
we
can
unlock
by
using.
I
have
unified
ir
yeah.
This
is
the
first
goal
of
relax
yeah.
B
So
the
output
tensor
shape
depends
on
the
input
data
and
we
don't
know
the
output
shape
until
runtime
in
relay.
We
have
a
the
relay
dot
any
we
can
represent
that
we
can
represent
that
unknown
dimension
during
compile
time.
B
Using
this
any,
for
example,
we
have
a
flattened
function
here
to
flatten
a
tensor,
but
but
in
relay
we
can
see
that
the
before
flattening
tensor,
a
the
first
dimension
is
a
question
mark,
meaning
unknown
and
after
the
flattened
function,
the
output
tensor
one
dimensional
and
its
first
dimension
shape
is
also
unknown.
So
actually
we
don't
know
the
shape
relationships
between
these
two
tensors,
a
and
b,
but
in
relax.
We
can
use
symbolic
shape
to
represent
a
and
b
shapes
in
the
input
tensor.
B
A
the
dynamic
batch
size
can
be
represented
as
a
symbolic
integer
n
and
the
input
tensor
shape
can
be
represented
as
this
right
and
it
gives
us
additional
information
at
a
compile
time
because,
after
the
flattening
function,
we
know
that
the
b's
function,
sorry
b
shape
can
be
represented
using
this
equation,
and
we
know
that
actually
tensor
a
and
tensor
b
have
the
exact
same
cancer
size.
So
potentially
they
can
reuse
potentially
b
can
reuse
the
same
memory
space
as
a
so
this
kind
of
shape.
B
Relations
between
the
tensors
provide
more
optimization
opportunities
during
compile
time.
B
So
in
order
to
achieve
that
that,
in
order
to
achieve
that,
one
design
point
in
relax
is
to
make
shape
deduction
as
the
first
class
computation.
So
this
example
last
program
covers
some
typical
scenarios
in
shape
reduction.
B
So
so,
at
compile
time,
you
can
see
that
the
the
output
tensor
of
this
unique
function
is
shape,
is
runtime
dependent,
so
it's
unknown
during
compile
time,
but
then
we
can
use
this
match
shape
to
refine
its
shape.
Here
we
we
can
match
this
lv5
with
this
symbolic
shape,
so
n
will
be
defined
here,
and
then
we
can
use
this
n,
the
symbolic
integer
in
the
following
program
to
to
carry
out
optimizations.
B
So
this
is
second
goal
of
relax,
which
is
enable
symbolic
shape
and
also
we
have
the
general
support
which
which
is
like,
even
though
we
have
unknown
shapes
throughout
the
program,
we
will
need
to
make
sure
the
program
can
be
compiled
and
executed
in
tbn.
B
So
the
third
goal
of
relax
is
to
support
computational
graph
writing
with
advanced
semantics.
So
what
does
it
mean?
So?
Most
of
the
machine
learning
engineers
today
are
familiar
with
the
concept
of
computational
graph
and,
and
these
optimizations
are
under
the
assumption
that
every
operation
in
the
graph
has
no
side
effect,
which
is
many
passes
implemented
in
relax.
Oh
sorry,
in
tbm
today
have
this
assumption.
B
This
optimization
is
clearly
useful
for
a
majority
of
the
optimizations,
but,
as
we
start
to
working
on,
for
example,
enable
training
training
in
tvn,
we
need
to
work
with
some
effect
for
sorry,
I
don't
know
whether
it's
effect
for
or
like
effect
yeah
effect,
for,
I
think
operations
like
random
number
generations
and
the
weight
updates
in
place
updates,
and
we
also
need
to
be
able
to
represent
programs
that
contain
some
complex
semantics,
such
as
in
place,
updates
and
control
flow
which
have
side
effects.
B
So
here
we
introduce
a
data
flow
block
construct
in
relax
ir,
for
example,
in
this
relaxed
function.
Here
all
the
operations
under
the
data
flow
block
is
side
effect
free
and
does
not
contain
any
advanced
semantics
like
control
flows
or
like
if-then-else
or
nested
scopes,
and
a
data
flow
block
can
effectively
be
viewed
as
the
computational
graph
and
most
of
the
bindings
here,
like
the
lv
0
within
the
date
of
the
block,
is
local,
which
means
they
are
only
visible
within
this
block
and
these,
but
these
variables
can
be.
B
We
can
mark
them
as
outputs,
in
which
case
the
variables
will
be
visible
in
outside
of
its
data
flow
block.
It
can
be
visible
in
the
later
part
of
the
program
like
we
can
use
gv0
here,
and
it
can
be
viewed
as
the
output
nodes
in
the
computational
graph
and
note
that
the
custom
in
place
update
the
compact
function,
call
is
outside
of
the
data
flow
block,
so
everything
outside
the
data
of
the
block
can
have
side
effects
in
relax.
B
So
to
conclude
that
we
expect
most
of
the
optimizations
will
happen
at
the
data
flow
block
level,
and
these
optimizations
can
be
done
by
machine
learning.
Engineers
who
are
familiar
with
the
pure
data
flow
graph
concept
and
we
isolate
and
represent
the
effect
for
components
which
are
outside
the
data
flow
block,
gives
opportunities
for
more
advanced
optimizations,
for
example
like
the
in-place
updates
and
so
on.
B
So
to
conclude,
relax
is
a
compiler
system
dedicated
to
the
tvm
unit
division
with
three
major
goals.
So,
first
of
all,
we
want
to
unify
the
abstractions
to
enable
cross-layer
optimizations
and
secondly,
we
want
to
unify
the
static
and
the
dynamic
shape,
and
also
we
want
to
support
the
computational
graph
style.
B
Writing
with
advanced
semantics
like
in
place,
updates
and
and
the
control
flow
which
allows
for
optimizing
both
for
training
and
influence,
and
we
have
been
doing
urban
development
for
a
long
while-
and
here
is
our
apple
and
also
we
open
sourced
all
of
our
design.
Docs
here
and
we
have
the
sub
channel
in
the
tvm,
discord
feel
free
to
join
and
we
have
our
weekly
development
meeting
every
week.
People
will
discuss
the
progress
and
also
the
technical
discussions,
and
we
it's
very
interesting.
B
So
these
are
the
slides
I
prepared,
but
I
do
have
some
demo
jupiter
notebook
and
I
will
also
leave
the
acknowledgement
in
the
end.
So
do
you
guys
want
to
see
some
demos.
B
C
C
B
Yeah,
please
bring
out
questions
if
you
are
confused
about
anything
I
just
talked
about
and
throughout
the
demo
yeah.
So,
let's
see
we.
Firstly,
we
import
a
bunch
of
python
packages
and
then
let
me
show
you
how
to
build
and
run
a
neural
network
in
relaxed.
B
Here
we
use
a
class
called
blog
builder,
which
is
to
construct
the
vlsi,
and
we
want
to
build
such
a
three-layer
neural
network,
very
simple
mlp
and
we
can
in
relax.
We
have
a
convenient
interface
called
a
module
which
is
very
similar
to
pi
dodge
interface,
which
allows
us
to
quickly
build
up
some
simple
neural
networks.
B
So
basically
we
can
use
a
very
similar
api,
like
as
the
pi
touch,
so
basically
we
have
unsequential
and
inside
we
define
each
layer,
its
input,
size
and
the
opposite
side,
output,
size
and
so
on.
So
basically
it's
a
very
simple
mlp,
and
here
we
define
a
tr
symbolic
variable
to
represent
a
dynamic
batch
size
and
we
define
the
data
and
the
parameter
and
so
basically
use
the
builder
to
construct
the
relapse
function
and,
let's
see
what
we
will
get.
B
So
here
is
the
ir
module.
So
in
the
io
module,
so
basically
we
we
can.
It
use
the
mlp
using
this
module
interface.
So
here
we
can
see,
we
have
a
relax
function
and
the
relapse
function.
It
has
the
data
which
has
the
first
dimension
as
symbolic
variable
n,
because
it's
a
dynamic
batch
size
right
and
inside
this
main
function.
B
So
these
print
functions
are
automatically
generated
by
the
mdt
in
in
relaxed
block
builder,
and
after
that
we
want
to
build
the
model
so
basically
compile
it
and
create
a
relaxed
vm.
To
execute
that
so
note
that
the
the
symbolic
variable
n
is
threaded
through
these
relaxed
functions.
So
it's
a
dynamic
workload.
B
So,
let's
see
we
initialize
the
weights
randomly
and
here
suppose
our
input
data
is
basically
is
a.
It
has
dynamic
batch
size
right.
So,
let's
generate
some
data
with
batch
size
of
three
and
we
call
the
main
function,
which
is
that
mlp
and
fill
in
the
data
and
the
random
parameters
so
yeah.
We
we
can
see
that
we,
we
see
three
rows
in
the
output,
so
basically
it
can.
B
It
means
that
it
outputs
the
like
the
image
classification
for
your
three
input,
images
right
and
let's
try
like
data
with
the
the
batch
size
of
five,
and
you
can
see
that
it
can
be
also
be
executed.
So
this
demonstrates
that
that
we
can
have
symbolic
shape
in
a
relaxed
program
and
then
we
can
build
it
and
and
run
it
in
in
relaxed
vm
and
under
the
hood.
B
B
So
here
we
want
to
define
some
linear
layer,
and
these
are
just
to
initialize
some
ways
and
bias
and
the
main
implementation
is
in
this
forward
forward
function.
So
it
takes
some
inputs
of
type
relaxed
expression
to
a
relaxed
variable
and
you
just
use
the
emity
function,
which
takes
a
topi
function
and
given
the
relaxed
variable.
B
So
this
is
less
variable.
This
is
also
a
relaxed
variable.
It
will
emit
the
right
cortial
core
and
also
generate
the
print
functions.
So
the
reason
why
it's
so
simple
is
because
the
t
language
in
pvm
also
has
the
symbolic
shape
as
first
class
and
also
in
relax.
B
Each
variable
has
a
symbolic
shape
and
note
that
the
constant
shape
is
also
just
a
specific
case
of
symbolic
shape.
Right,
so
basically
it
it
can
extract
the
extract,
the
symbolic
shape
from
the
expression
and
fit
that
into
existing
topi
functions
and
generate
the
corresponding
tr
function
and
the
cortial
nodes.
B
So
yeah
here
is
just
another
example,
so
basically
we
can
still
use
blob
builder
and
inside
the
blob
builder
inside
we
want
to
generate
some
function
called
mlp
and
we
use
some
data
and
weight,
and
we
here
we
just
use
the
blob
builder's
meeting
feeding
some.
For
example,
third
party
c
blocks
memo
and
feeding
any
like
relaxed
relaxed
variables,
and
then,
let's
see
what
we
will
get
so
here
are
just
also
like
symbolic
variables
and
the
data
weight
are
all
are
both
dynamic.
B
Yeah
so
basically,
it
generates
the
mlp
function
and
it
generates
two
core
tr
one
according
to
the
matmo
prim
funk
and
one
coin
to
the
value.
So
basically,
this
integration
of
relax
and
te
and
the
topi
is
very
organic
because
both
are
based
on
symbolic
shapes.
B
So
we
can
also
run
it
with
some
like
dynamic
shape
data
right
and
in
next
I
want
to
introduce
a
the
the
the
thing
we
currently
use
to
import
models,
which
is
which
is
relate
to
relaxed
translator.
So,
for
example,
we
can
get
some
workloads
in
relay.
We
can
get
some
workload
by
using
the
testing
api
right
and
in
relax.
B
Basically,
we
we
get
it's
pretty
long,
because
it's
resnet
and
currently
the
printing
is,
is
not
like
ordered,
meaning
that
the
relax
function
is
not
necessarily
at
the
top
of
the
module,
but
we
can
refine
that
at
later,
if,
if
necessary,
so
basically
the
relaxed
function
is
is
like
this
because,
like
the
relay
model,
is
a
static
shape.
So
basically,
you
can
see
here
we
generate
a
bunch
of
like
core
tr
and
the
print
functions
are
automatically
generated,
and
I
want
to
emphasize
that
this
tr
programs
are
just
naive.
B
Pr
programs
generated
by
the
t
functions
and
obviously
we
can
with
the
integration
with
a
meta
schedule.
We
can
tune
these
kernels.
So,
let's
see
here
is
the
tuning
code.
We
can
use
key
tr
script.
Oh
sorry
has
a
pvm
script
to
construct
the
input
module
input,
io
module.
It
contains
like
very
simple
pr
print
functions
and
inside
this
relax
function.
B
B
And
it
is
succeeded
and
it
outputs
the
result,
so
this
is
relaxed,
has
already
been
totally
integrated
with
meta
schedule
for
the
training
purpose.
D
I
I
have
a
question,
but
it's
not
specifically
about
this.
This
notebook.
D
Could
I
was
wondering
if
you
could
talk
a
little
bit
about
how
the
type
how
typing
works
for
relax
yeah,
it
seems
like
you,
might
need
dependent
typing.
So
I
just
just
thought
it
might
be
interesting
right
right
actually.
B
The
type
scene
relax
is
like
is
different
is
different
from
relay,
so
basically,
we
separate
the
shape
from
the
type
and
for
tensor
we
have
a
dynamic
tensor
type
and
the
type
itself
only
carries
the
rank
information
and
also
the
d-type
information,
and
each
expression
has
a
check
type
field
and
the
chat
type
could
be
dynamic.
Cancer
type
with
the
rank
and
detail
information,
and
each
expression
also
has
a
shape
field
and
the
shape
field
can
be
like
any
expressions
right,
it
can
be,
normally
is
a.
B
We
call
it
the
shape
expression,
it's
just
an
array
of
premium
expert.
So
basically,
you
can
use
the
tr
ti
variables
symbolic
to
to
represent
some
symbolic
shape,
so
we
don't
have
dependent
typing
in
relax.
D
D
F
Is
another
round
dependent
on
typing
in
a
sense
that
you
can
also
equivalently
introduce
a
dependent
type
where
your
tensor
type
depends
on
value?
But
but
then
that's
at
the
additional
complexities,
because
because
in
this
case
we
find
that
you
know,
shape
is
kind
of
we
kind
of
don't
want
to
get
into
depending
on
the
typing
line.
Initially.
F
So
so
that's
why
you
know
it's
equivalent
to
dependent
typing
but
effectively
we're
separating
types,
so
that
type
are
can
still
are
still
non-dependent,
but
straight
values
themselves
are,
are
runtime
dependent
and
we
can
use
things
like
constant,
propagations
and
other
things
to
to
still
get
some
of
the
constant
shape.
Information
in
analysis.
A
So
one
question
I
had
was
just
around,
so
you
know
it
seems
like
one
thing
we
could
do
in
in
relay
before
that
might
be
harder
to
do
and
relax
is
to
express
like
a
program
without
specifying
the
implementation
of
of
each
of
the
layers
is
that
I
was
just
curious.
It
seems
like
whenever,
whenever
you
call
the
builder,
you
know
create
module
here.
It's
always
choosing
some
implementation,
even
if
it's
a
really
naive
implementation
for
each
layer.
A
So
I
just
wanted
to
kind
of
better
understand
that
is
that
also
true,
basically,
that
now
it
will
at
least
sort
of
choose
a
naive
implementation
that
might
be
later
revised
by
meta
scheduler.
A
B
Actually,
it's
sort
of
like
more
flexible
in
relaxed,
so,
firstly,
you
can
a
user
can
implement
their
own
test
ir
program
and
use
the
core
tr
construct
in
relax
ir
to
according
to
that,
and
secondly,
we
can
use,
for
example,
compact
to
directly
according
to
some
runtime
library
right
and
thirdly,
we
will
have
a
relaxed
op
system
future.
B
We
currently
don't,
which
currently
sort
of
like
rely
on
unity,
so
basically
emit
they're,
also,
according
to
some
key
function,
to
generate
the
corresponding
naive
print
functions
and
use
the
use
the
rely
on
meta
schedule
to
tune
that,
but
in
the
future
we
will
introduce
ops,
yeah.
A
A
Like
what
I
was
noticing
here
was
when
you're
importing
a
relay
program
into
relax,
it
seems
like
it
schedules
everything
right
then
and
there,
and
so
I
think
what
you're
saying
is
that
in
the
future,
there'll
be
a
corresponding
set
of
relaxed
operators,
and
perhaps
it
wouldn't
necessarily
schedule
right
away
when
you
converted
a
relay
program
into
relax
exactly.
B
We
will
actually
have
direct
importers
from,
for
example,
pi
touch
to
relax
because,
like
you
know
the
relays
in
reliance,
there
are
like
many
any
stuff,
and
you
cannot
translate
that,
obviously
to
the
relaxed
land
and
the
relax
has
more
expressive
ability
than
than
relay
so
we
have
to
directly
import
from,
for
example,
guitar
script
or
onyx,
with
the
shape
information
there
yeah.
A
G
Yeah,
I'm
a
little
interested
in
the
you
know.
You
talked
a
little
bit
about
the
progressive
lowering
rather
than
having
to
do
everything
in
one
shot,
as
you
kind
of
just
touched
on
yeah
part
of
that,
at
least
from
like
the
development
perspective
is
being
able
to
inspect,
inspect
the
relaxed
ir
and
the
corresponding
tir
at
like
every
step
of
the
transformation.
G
I
don't
know
if
this
is
possible,
like
one
of
the
things
that
we
lack
today
with
relay
is
even
really
just
the
ability
to
see
what
the
final
state
of
relay
is,
after
all,
transformations
before
it's
lowered
in
the
coach,
and
I
wonder
if
there's
any
just
like
user-friendly
way
for
us
and
relax
to
see
at,
for
example,
after
constant
folding
or
after
fusion
to
be
able
to
inspect
the
transformation
at
a
given
sp
at
a
given
step
and
then
similarly
well
actually
I'll
follow
up
after
one
other.
B
Exactly
exactly
that's
actually
a
main
goal
of
relax,
which
I
didn't
touch
upon
so
basically
in
relax.
We
want
every
transformation
to
be
ir
module
to
our
module
transformation
and
which
means
that
each
part
is
just
a
modular
module
and
the
path
can,
for
example,
inspect
part
of
the
relapse
function
and
transform
that
into
either
like,
for
example,
some
core
tr
and
some
tr
nodes,
and
also
it
can,
for
example,
transform
some
relax
function
to
saying.
B
Okay,
these
functions
need
to
go
into
another
coget,
instead
of
going
through
the
tr
right.
So
basically,
each
parts
we
want
make
sure
in
relaxes
our
module
to
our
module
transformation
and
for
each
io
module
we
want,
we
will
make
sure
to
be
able
to
print
it
out
using
the
tvm
script
and
we
have
a.
We
will
have
a
minimum
build,
which
means
at
any
stage
of
the
transformations.
B
If
the
ir
itself
is
valid,
we
can
always
call
the
build
to
build
the
whole
module
and
run
it
in
the
last
vm
and
the
main
benefit
of
it
is
that
when
we
want
to
introduce
some
like
tuning
pass,
which
means
that
we
need
to
explore
some
candidates
and
transform
the
transform
the
release
r
module
a
little
bit
and
then
build
it
and
measure
it
and
send
that
feedback
and
basically
is
a
for
loop
and
select
the
next
candidate,
which
is
some
working
on
currently.
So.
B
Basically,
the
main
point
is
that
we
want
to
make
sure
that
each
transformation
in
relax
is
our
modular
module
transformation
and
we
can
build
our
module
at
any
stage
and
visualize
it
using
the
tbm
script.
3D
printer
yeah.
G
I
see
so
in
this
case
you're
saying
that
in
principle
the
optimization
step
is
separated
out
from
build
exactly.
B
G
And
we
can
in
principle,
then
I
guess
tune
at
any
spot
too.
If
we
felt
like,
for
example,
we
have
only
incrementally
lowered,
like
some
portion
of
some
subgraph
of
relax.
We
could
focus
on
tuning
and
evaluate
based
on
whatever
the
output,
assuming
was.
If
we
is
that,
like
all
right,
if
this
was
the
appropriate
transformation
of
the
relaxed
level,
yeah.
B
It's
the
like.
We
call
it
modular
compilation
in
relax,
yeah,
that's
great
stuff
cool
thanks,
yeah
thanks.
A
Yeah
one
question
I
I
also
had,
since
I
don't
see
anyone
who
has
their
hand
up
or
anything,
but
let's
just
I
wanted
to
understand
a
little
bit
better
about
kind
of
where
you
guys
saw
this
kind
of
how
you
saw
it
landing
in
in
tvm.
First,
just
a
little
bit
about
it.
A
You
know
it
seems
like
from
the
examples
right
now
you're
calling
things
using
this
relaxed
vm
and
you
know
one
naive
question
is:
is
this
the
same
thing
as
the
the
vm
inside
the
the
current
tvm
code
base.
B
Actually
is
different,
so
relax
vm
is
different
from
relay
vm
in
several
parts,
so,
firstly,
we
want
to
have
the
shape
computation
in
our
vm
relax
the
end.
So
basically,
we
maintain
some
ship
heap
and
the
shipping
manufactures
there
in
relation.
Secondly,
relay
vm
actually
has
a
a
lot
of,
I
think
20-ish
instructions
and
you
can
relax
vm.
We
dramatically
decrease
the
number
of
instructions
and
have
a
call
instruction
called
the
call
pact.
B
So
basically,
the
copy
function
will,
according
to
a
bunch
of
like
built-in
functions,
to
achieve
the
same
goal
as
like
relay
v
and
which
has
them
as
separate
instructions,
but
it's
just
another
design
which
is
like
reducing
instructions
that
and
so
so.
These
are
the
two
main
differences
between
relax,
vm
and
the
relay
vm,
and
for
the
migration
upstreaming
plan
for
this
quarter.
We
want
to
robustify
the
key
components
of
relax
and
we
imagine
like
during
this
process.
B
B
A
B
And
so
actually,
we
won't
like
modify
t
because
t
e
has
the
also
has
the
first
time
symbolic
shape.
Okay,.
A
B
Yeah,
so
basically
in
the
high
level,
we
have
also
like
first
class
symbolic
shape,
so
they
actually
interact
with
each
other
very
organically
right.
Okay,
so
you
haven't
modified
that
yeah
yeah
yeah.
We
don't
have
to
yeah.
A
Gotcha
and
then
you
know,
I
guess
one.
What
did
I
want
to
ask?
Oh
you
know
you
know
around.
I
gosh
it's
been
maybe
six
months
at
least
since
this
came
up,
but.
E
A
One
thought
that
had
been
kind
of
circulating
for
a
little
while
was
whether
or
not
it
would
be
possible
to
essentially
map
the
vm
lowering
flow
onto
the
aot
back
end,
basically
and
essentially,
code
generate
all
the
vm
instructions
into
an
aot
program.
I
was
curious,
just
it
actually
almost
seems
easier
to
do
with
relax
since
there's
less
instructions,
but
instructions
might
be
a
little
bit
more
dynamic.
So
in
terms
of
memory
usage-
and
things
like
that,
so
I
was
curious
just
to
hear
your
thoughts
on
that
and
cool.
B
Yeah
yeah,
actually
like
we
imagine
like
relaxed
vm,
is,
will
be
just
like
one
of
the
executors
in
relax
and
we
will
have
like
aot
excluded
in
the
future
right,
as
you
said,
and
but
currently
we
don't
have
much
time
spending
on
that.
We
just
rely
on
relax
vm,
because
it's
like
flexible
yeah
and
in
the
future.
We
imagine
we
we
will
have
aot
executor,
which
could
get
give
us
more
performance
benefit.
G
Cool
yeah,
yeah
yeah,
it
seems
kind
of
like
in
your
data
flow
blocks.
It
would
be
pretty
straightforward
to
just
as
andrew
was
saying
just
codegen
directly
to
an
aot
function
that
is
evaluating
calls
on
the
tr
that
has
been
lowered
and
and
then
it'd,
be
interesting.
G
Since
it's
dynamic,
eot
programs,
I
think,
are
definitely
a
challenge,
but
it
just
seems
like
it
brings
us
a
little
bit
closer,
at
least
from
respect
to
the
runtime.
E
G
E
Would
I
would
also
like
to
second
that
to
if
you
can,
it
will
be
really
useful
if
you
can
explore
to
codes
in
those
utility
functions
that
will
be
baked
into
the
relaxed
vm.
B
H
Is
muted
yeah,
so
I
I
would
wanted
to
ask
a
little
bit
on
the
future
questions
for
future
work.
Maybe
this
is
a
bit
redundant
to
things
that
are
have
already
been
said,
so
I
would
be
interested
in.
I
mean
the
usability
aspect
so
usually,
when
I
talk
to
people,
they
give
me
an
onyx
model
or
some
some
file,
and
they
just
want
to
use
it.
I
mean
we
have
discussed
this
in
the
forum.
I
think
so
are
there
already
plans?
H
H
B
Yeah
yeah,
I
think,
for
this
quarter.
What
we
are
doing
currently
is
that
a
few
folks
here,
like
suryan,
reihang
and
hongyi,
they
are
working
hard
on
matching
the
performance
we
relay
in
the
in
the
static
shape,
workloads
and
using
meta
schedule,
and
basically
we
also
want
to
introduce
a
few
like
fusion
like
passes
like
fusion
right,
and
we
want
to
actually
match
the
relay
front-end
performance
on
a
set
of
like
representative
models,
and
then
we
will
benchmark
some
dynamic
models.
B
For
example,
we
will.
We
talked
about
the
pathogens
in
powder
with
folks
like
jungwoo
and
aws.
Folks,
like
cody
and
eg,
we
want
to
have
the
employer
started,
implementing,
I
think
next
quarter,
and
then
we
will,
if
we
have
more
contributors,
join,
which
is
very
welcome.
If
you
want
to
contribute
to
relax,
we
we
will
definitely
have
like
honest
importers
implementing
to
directly
import
models
from
rx.
B
I
it's
in
the
plan,
but
currently
we
haven't
started
investing
time
on
that
yeah
thanks
thanks
and
I
yeah
I
I
want
to
like.
Take
the
rest
of
time
acknowledge
a
few
core
contributors
who
contributed
a
lot
to
relax
and
andrew
is
from
udab
and
he
implemented
ebt
and
now
he's
investigating
enabling
training
in
relax
and
the
syrian.
B
I
think
many
of
you
have
heard
him,
so
he
is,
he
implemented
the
fusion
pass
in
relax
and
did
a
lot
of
tuning
and
homie
is
also
working
on
the
tuning
and
he
also
introduced
a
few
optimization
passes
to
relax
like
constant,
folding
and
so
on,
and
the
dream
rule
has
been
always
discussing
a
lot
with
with
us
in
either
the
like
the
open
divide,
meeting
and
internally
and
thanks
a
lot
for
for
a
lot
of
insightful
discussions
and
the
illusion.
B
The
github
profile
is,
is
a
bit
of
funny
that
he
has
has
been
contributed
to
the
passive
structures
like
how
adding
the
python
pulse
decorators
to
relax
and
he
will
be
working
on
memory.
Dynamic
memory
planning
in
relax
and
riyang
has
been
working
on
developing
passes,
especially
the
fusion
parts
and
summarized
a
lot
of
like
past
patterns,
and
I
learned
a
lot
from
him
and
he
he
added
a
lot
of
improvements
to
relax.
B
Vm
and
prep
hub
has
been
adding
shape,
support
like
runtime
dependency,
and
he
is
now
working
on
onboarding
docs
and
the
language
back
relax.
Hopefully
it
will
make
the
like
on
board
more
more
and
more
contributors,
and
the
song
has
been
working
on
a
lot.
B
A
lot
of
things
like
the
meta
schedule,
integration
with
relax
and
also
the
passing
structure
and
the
tuning
parts,
and
a
lot
of
like
modular
compilation,
flow
design
and
thanks
song
and
pq
always
supports
relax
a
lot,
and
we
haven't
learned
a
lot
from
him
and
yeah
and
the
young
is
now
working
on
a
control
flow,
supporting
relax
and
he
has
been
added
a
lot
of
support
to
the
partner
and
printer
and
he
will
introduce
like
he
will
have
lstm
demo
discorder
very
exciting,
and
hopefully
we
can
see.
B
Some
implementation,
like
cancer
array
and
direct
cancer
in
in
relax
and
zucchin,
has
been
contributed.
A
lot
to
some
calling
structures
of
reliance,
including
ast,
and
he
also
like
relaxed
vm
and
the
visitor
and
so
on,
and
also
he
implemented
the
immediately
with
andrew
together,
and
these
are
like
12
active
development
members
who
work
very
hard
and
happily
and
contribute
to
relax,
and
we
definitely
hope
more
and
more
people
join
this
journey
and
build
the
relax
together
with
us.
B
And
besides
that,
we
have
a
lot
of
contributors
who
contribute
to
designs
and
ideas
and
roadmaps
and
so
on,
including
alton
from
octoml
cody
from
aws
denise
from
octo
lily.
B
Our
previous
colleague
jared
george
mihales,
tristan
from
octo
and
bowen
from
cmu
and
eg
from
aws
yeah.
Thank
you
for
a
lot
for
all
of
the
contributions
and
all
the
discussions.
A
Thanks
uten
thanks
for
a
great
presentation,
it's
a
really
really
interesting
piece
of
work
and
really
looking
forward
to
seeing
this
land
upstream.
So
thanks
so
much
for
our
presentation.
If
there's
any
other
questions
speak
now,
otherwise
we
will
post
notes
here
and
follow
up
on
the
relax
discuss
thread
please
and
I'll
just
give
one
second
in
case
anyone
wants
to
ask
one
last
thing:.
B
No,
we
cannot,
because
we
relax,
has
a
lot
of
asd
changes,
so
they
we
didn't
imagine
they.
They
should
exist
in
the
cmi
module,
yeah,
okay,
yeah
yeah.
A
A
We
won't
open
too
many
cans
of
worms
with
with
only
two
minutes
left
so
join
us
again
next
week.
I
think
we'll
be
probably
back
to
packaging.
I
don't
know
if
we've
had
a
concrete
proposal
for
what
to
discuss
next
week
but
feel
free
to
post
up
on
the
meeting
agenda
thread.
If
you
have
something
you
want
to
bring
up
and
thanks
again
yutin
for
for
the
great
presentation,
yeah.