The usual emitc backend emits stateless cpp functions which take the
model inputs as function arguments and returns the resulting tensor.
However, it does not provide meaningful names to the arguments of the
function. Moreover, the order of the arguments is not stable in a
variety of applications (anything which comes from a tflite file, namely
MLGO models), so switching to a model where arguments are set via setter
methods avoids issues of tracking down which anonymous argument
corresponds to which model input.
Moreover, this change emits the stateful functions in two files: a
header and cpp file. This is useful for MLGO as we intend to deploy the
emitc runtime code in an anonymous namespace inside of the .cpp file of
the generated model to allow each generated model to have its own
version of the runtime (to prevent future changes to the runtime to
break previously deployed models).
This is related only to the variable initialization right? (e.g., stateless won't be stateless if the ops being lowered mutate some global state which is not what this is controlling).