How are these two functions different? Are they related?
One observation: only relay.build_module.create_executor() lets you specify the Module argument. This is important for me because I want to write a recursive function in Relay.
My understanding is that build() is kind of the old style grandfathered in for compatibility with NNVM-style scripts. create_executor() is the more modern style CC @jroesch.
I believe @eqy is correct except for possibly the choice of host_target, which seems to be absent from create_executor(), but hopefully @jroesch can clarify that.
create_executor() supports multiple backends. Right now these are the reference interpreter (“debug”) and the graph runtime (“graph”), which is what build() uses (create_executor() just wraps build() when using “graph”). In the future it will also support other backends like the dynamic runtime. I hope that helps.
Also if you want to run recursive functions, you will probably have to use the “debug” interpreter or wait for the dynamic runtime. As far as I know, the “graph” runtime only supports static graphs, but I could be wrong.
both build and create_executor are useful and will continue to be used.
In particular, create_executor serves as a shortcut for build + runtime.create. If the user want to create something that get deployed to a separate machine, then we still need to call build runtime.create separately