Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f3e6483

Browse filesBrowse files
rathlorienpytorchmergebot
authored andcommitted
add graph_code_verbose_log artifact for fx passes
1 parent 996c4d8 commit f3e6483
Copy full SHA for f3e6483

File tree

Expand file treeCollapse file tree

4 files changed

+7
-2
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+7
-2
lines changed

‎torch/_dynamo/output_graph.py

Copy file name to clipboardExpand all lines: torch/_dynamo/output_graph.py
+1Lines 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

Copy file name to clipboardExpand all lines: torch/_logging/_registrations.py
+4Lines 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

Copy file name to clipboardExpand all lines: torch/fx/passes/_tensorify_python_scalars.py
+1-1Lines 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__)
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

Copy file name to clipboardExpand all lines: torch/fx/passes/runtime_assert.py
+1-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.