[jit] Fix list copy in MemoryDAG (#65176)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/65176
getElements returns a reference.
ghstack-source-id: 139745230
Test Plan:
CI
Static runtime startup for ctr_mobile_feed local net reduced from 8.35s to 7.8s
Reviewed By: malfet
Differential Revision: D30983898
fbshipit-source-id: 884bff40f12322633c0fffd45aed5b8bc7498352