[Static Runtime] Add perf metrics for number of managed tensors & unmanaged values (#64992)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/64992
This change lets Static Runtime print out number of managed tensors & unmanaged values as performance metrics during profile runs.
We will use /enhance these metrics to guide the effort of managing output tensors.
Test Plan:
Confirmed that a profile run prints out the added metric values on inline_cvr nets:
```
(inline_cvr/local)
...
Total number of managed tensors: 2754
Total number of unmanaged values: 3240
...
(inline_cvr/local_ro)
Total number of managed tensors: 1554
Total number of unmanaged values: 2966
...
(inline_cvr/remote_ro)
Total number of managed tensors: 1439
Total number of unmanaged values: 28
...
```
Reviewed By: hlu1
Differential Revision: D30926617
fbshipit-source-id: b86e071003ac941b9663db103eaa7c614466b4e0