Skip to content

[FX] Add example of tracer that records module qualname for each node #891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 9, 2021

Conversation

jamesr66a
Copy link
Contributor

@jamesr66a jamesr66a commented Mar 9, 2021

In this example, we are going to define a custom fx.Tracer instance that--
for each recorded operation--also notes down the qualified name of the module
from which that operation originated. The qualified name is the path to the
Module from the root module. More information about this concept can be
found in the documentation for Module.get_submodule:
https://github.com/pytorch/pytorch/blob/9f2aea7b88f69fc74ad90b1418663802f80c1863/torch/nn/modules/module.py#L385

@jamesr66a jamesr66a merged commit 4db1116 into pytorch:master Mar 9, 2021
YinZhengxun pushed a commit to YinZhengxun/mt-exercise-02 that referenced this pull request Mar 30, 2025
[FX] Add example of tracer that records module qualname for each node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants