10000 add graph_code_verbose_log artifact for fx passes · pytorch/pytorch@c3c13e2 · GitHub
[go: up one dir, main page]

Skip to content

Commit c3c13e2

Browse files
committed
add graph_code_verbose_log artifact for fx passes
1 parent e802b29 commit c3c13e2

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

torch/_dynamo/output_graph.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@
154154
log = logging.getLogger(__name__)
155155
graph_tabular_log = torch._logging.getArtifactLogger(__name__, "graph")
156156
graph_code_log = torch._logging.getArtifactLogger(__name__, "graph_code")
157+
graph_code_verbose_log = torch._logging.getArtifactLogger(__name__, "graph_code_verbose")
157158
graph_sizes_log = torch._logging.getArtifactLogger(__name__, "graph_sizes")
158159
trace_call_log = torch._logging.getArtifactLogger(__name__, "trace_call")
159160

torch/_logging/_registrations.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@
7070
"Prints the dynamo traced graph (prior to AOTDispatch) in a table. If you prefer python code use `graph_code` instead. ",
7171
)
7272
register_artifact("graph_code", "Like `graph`, but gives you the Python code instead.")
73+
register_artifact(
74+
"graph_code_verbose",
75+
"Verbose FX pass logs, e.g. from tensorify_python_scalars and runtime_assert.",
76+
)
7377
register_artifact(
7478
"graph_sizes", "Prints the sizes of all FX nodes in the dynamo graph."
7579
)

torch/fx/passes/_tensorify_python_scalars.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
__all__: list[str] = []
3636

3737
log = logging.getLogger(__name__) A30D
38-
graph_code_log = torch._logging.getArtifactLogger(__name__, "graph_code")
38+
graph_code_log = torch._logging.getArtifactLogger(__name__, "graph_code_verbose")
3939

4040
# The general shape of this transformation is to look for Tensor operations
4141
# that take a backed SymFloat as an argument, and then redo them as tensor

torch/fx/passes/runtime_assert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
__all__ = ["insert_deferred_runtime_asserts"]
2929

3030
log = logging.getLogger(__name__)
31-
graph_code_log = torch._logging.getArtifactLogger(__name__, "graph_code")
31+
graph_code_log = torch._logging.getArtifactLogger(__name__, "graph_code_verbose")
3232

3333

3434
def _get_example_value(node: fx.Node) -> Optional[str]:

0 commit comments

Comments
 (0)
0