[Static Runtime] Fix printing graphs in debug mode during fusion (#72222)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/72222
ghstack-source-id: 148415879
Test Plan: Only changing printing graphs during debugging.
Reviewed By: HarutMov
Differential Revision: D33960591
fbshipit-source-id: 2db5e65258b6d30a4fa88cb7e115cbffcebfa15f
(cherry picked from commit 22537573bd6ece3575d13f3b631e890772a92a11)