Skip to content
This repository was archived by the owner on Aug 1, 2025. It is now read-only.

Conversation

@yushangdi
Copy link
Contributor

@yushangdi yushangdi commented Jul 22, 2022

creates a fx graph of the buffers generated by lowering

with this patch you can run e.g.

python benchmarks/torchbench.py --training --devices=cuda --inductor-dump --isolate -k hf_Bert

to dump the forward and backward graphs of compute-buffers of hf_Bert. The resulting svg file will be in torchbenchmark/.

If you want to run it for other graphs, change the model_name in compile_fx so the dumped file matches the model name.

Also the dumping is quite slow, so for large models like hf_Bert, you would want to change the number of layers to a small number.

@yushangdi yushangdi changed the title add dump graph utils [DRAFT] add dump graph utils Jul 23, 2022
@yushangdi yushangdi mentioned this pull request Jul 27, 2022
@yushangdi
Copy link
Contributor Author

add in this PR : #677

@yushangdi yushangdi closed this Aug 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants