[PyTorch] Record Sequence Number to Match Forward and Backward Operators (#78795)
Summary: Add sequence number to map forward and backward operators.
Test Plan:
```
buck build mode/dev-nosan cea/ml_perf_model/gpu/scripts: --show-output
buck-out/gen/caffe2/test/profiler#binary.par test_profiler.TestExecutionGraph.test_execution_graph_start_stop
```
Outputs with seq_id: P505545974
Differential Revision: D36881999
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78795
Approved by: https://github.com/robieta