patching requires_grad on DifferentiableGraph (#55701)
Summary:
The retrieval of profile node is much easier prior to inserting guard node.
test cases updated to reflect the patch on a previously failing cases.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/55701
Reviewed By: pbelevich
Differential Revision: D27701216
Pulled By: Krovatkin
fbshipit-source-id: e2e6b64b682377e622b75c762e85ff7967e45118