Remove reserve from push_list_elements on JIT stack. (#27140)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/27140
Reserve will issue a (non-binding) request to shrink stack size
to the amount you requested to be reserved. But the whole
point of a stack is that you can extra space if you need to
do nested calls. Getting rid of the space is a bad idea!
Another failure mode: if we repeatedly push lists of size one,
we'll have quadratic behavior. Bad.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Test Plan: Imported from OSS
Differential Revision: D17712765
Pulled By: ezyang
fbshipit-source-id: cf3a08b0212304b679256fb8637e311beb3ff3a8