You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[RUST][FRONTEND] refactoring builder to use a derive #2304
Use derive_builder for tvm_frontend::Function for less boilerplate codes. Proper config is required to make the return buffer accepts at most one value. TODO #2292.
@nhynes don't think #[derive(Builder)]] can add the proper fields in builder struct needed for Function. It is merely for very common type of builders. Currently, derive_builder only uses the fields of the underlying struct, but the rather minimal signature of the current function::Builder is
with completely different fields, in particular arg_buf and ret_buf. So my conclusion is that the derive_builder is not mature enough to handle our case.
Activity
ehsanmok commentedon Dec 19, 2018
@nhynes don't think
#[derive(Builder)]]can add the proper fields in builder struct needed forFunction. It is merely for very common type of builders. Currently,derive_builderonly uses the fields of the underlying struct, but the rather minimal signature of the currentfunction::Builderiswith completely different fields, in particular
arg_bufandret_buf. So my conclusion is that thederive_builderis not mature enough to handle our case.Side note: In my code, I've pretty much followed
std::process::Commandconstruct.ehsanmok commentedon Dec 19, 2018
Discussed here and will plan for runtime-frontend compatibility.