[RELAY][PASS] Bind, FoldConstant#2100
Conversation
|
cc @yzhliu @zhiics @ZihengJiang @jroesch @MarisaKirisame @PariksheetPinjari909 please review |
| graph_json = self._get_json() | ||
| lowered_funcs = list(self.lowered_funcs) | ||
| return graph_json, lowered_funcs | ||
| return graph_json, lowered_funcs, self.params |
There was a problem hiding this comment.
add returns in pydoc above
| func : tvm.relay.Function | ||
| The input to optimization. | ||
|
|
||
| params : dict of str to NDArray |
There was a problem hiding this comment.
Optional[Dict[str, NDArray]]
|
I did a quick pass of the code, LGTM |
|
The side effect is checked by is_stateful, I think the folding pass should work with functions of recursion, by ignoring recursive calls. But indeed they don't unroll the recursion if that is what you mean |
|
@tqchen tuplegetitem(tuplenode(...)) will just take the expr |
|
I see, indeed, we will need side effect check pass and possibly combine dead code elim into folding. For now it is fine as the program is side-effect free |
|
Looks good to me we can follow up on those issues afterwards. |
The general flow now becomes: