[dynamo][fx] Don't emit call_function node to construct dataclass instances for Dynamo and make_fx tracing
#147152
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
get_unique_name_wrthelper when applicable #146950nonstrict_trace#146367flat_apply#146714init=False#146713call_functionnode to construct dataclass instances for Dynamo andmake_fxtracing #147152call_functionnode to constructNamedTupleinstances for Dynamo andmake_fxtracing #147145As title. The behavior change is limited to Dynamo and
make_fxtracingfor backward compatibility reasons with
symbolic_trace.It heps enforce the invariant that Dynamo and
make_fxgraphs wouldalways contain tensor ops -- so rather than having these
call_functionnodes to construct
NamedTuple, we inline them directly as instancearguments to the user nodes.
cc @ezyang @SherlockNoMad @EikanWang @jgong5 @wenzhe-nrv @voznesenskym @penguinwu @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @jiayisunx @chenyang78 @kadeng @chauhang @amjames