[PyTorch] Remove unnecessary iostream includes in headers (#61500)
authorScott Wolchok <swolchok@fb.com>
Fri, 20 Aug 2021 01:52:33 +0000 (18:52 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Fri, 20 Aug 2021 01:54:51 +0000 (18:54 -0700)
commit0a66d5b3253fd2d2304f3897526db3c8fb139376
tree9f7db1595b6cb21f626586b37ea8a0d68dd50b9a
parentb99a299c6002354acef5c43eba5cd25b41e773c7
[PyTorch] Remove unnecessary iostream includes in headers (#61500)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/61500

libstdc++ defines a static variable called `std::__ioinit` in iostream that adds global constructor size overhead to each translation that includes iostream. To reduce the size overhead from that, we can often include ostream instead.
ghstack-source-id: 136163529

Test Plan: buildsizebot some mobile apps

Reviewed By: dhruvbird

Differential Revision: D29648016

fbshipit-source-id: 9c3139712c71248513cc5032d21e77f3ecbae8fe
30 files changed:
aten/src/ATen/core/Formatting.cpp
aten/src/ATen/core/Formatting.h
aten/src/ATen/core/Vitals.cpp
aten/src/ATen/core/Vitals.h
aten/src/ATen/core/function_schema.cpp
aten/src/ATen/core/interned_strings_class.h
aten/src/ATen/core/ivalue.cpp
aten/src/ATen/core/jit_type.h
aten/src/ATen/cpu/vec/vec256/vec256.h
aten/src/ATen/cpu/vec/vec256/vec256_int.h
aten/src/ATen/cpu/vec/vec256/vec256_qint.h
aten/src/ATen/cpu/vml.h
aten/src/ATen/cudnn/Descriptors.cpp
aten/src/ATen/miopen/Descriptors.cpp
aten/src/ATen/native/quantized/cpu/qnnpack/include/pack_block_sparse.h
aten/src/ATen/native/quantized/cpu/qnnpack/src/pack_block_sparse.cc
c10/core/DispatchKey.h
c10/core/Layout.h
c10/core/MemoryFormat.h
c10/core/ScalarType.h
c10/util/Bitset.h
c10/util/complex.h
c10/util/either.h
c10/util/typeid.h
caffe2/core/init.cc
caffe2/core/operator.cc
caffe2/core/operator.h
caffe2/core/operator_schema.cc
caffe2/core/operator_schema.h
caffe2/operators/utility_ops.cc