[Profiler] Store Input shapes, dtypes, and metadata into flat AppendOnlyList (#74241)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74241
Adds the following changes:
- During collection, replaces the vector of vector of int shapes, and vector of string dtypes. Instead pack the IValue details into InputOutputEncoder as flat AppendOnlyLists.
- This will save each IValue with a enum tag, metadata holding its dim and dtype, and the shapes.
- During Post-Processing, re-construct the vectors that are originally expected (struct Inputs).
Reviewed By: chaekit
Differential Revision: D34823546
Pulled By: aaronenyeshi
fbshipit-source-id: 718fccaa8aab16128da986d665564a8fef5436c8
(cherry picked from commit 96a47c068e55220e7b7224c8a1935033859b5cd2)