[package] use digraph to back dependency visualization (#57338)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/57338
Differential Revision: D28114190
Test Plan: Imported from OSS
Reviewed By: astaff
Pulled By: suo
fbshipit-source-id: 78b15edae3b991307fd3656ac7b374d4d218b460