Modernize graph mode IR API calls
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/30130
Test Plan: Imported from OSS
Differential Revision: D18608004
Pulled By: jamesr66a
fbshipit-source-id: 42e946ec96b1d26a364abe0a7eb71aa0aecc52ed