0f0b4bf029
[1/N] Remove unused header inclusion ( #165763 )
...
This PR removes unused header inclusion in C++ files.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/165763
Approved by: https://github.com/Skylion007
2025-10-18 05:23:11 +00:00
165f4f6ccf
[PyTorch] Redirect c10::optional to std::optional ( #101995 )
...
We have C++17 now!
I am intentionally dropping the `c10::optional<c10::ArrayRef>` size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use `optional<ArrayRef>` in function arguments anymore anyway.
Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/ )
Pull Request resolved: https://github.com/pytorch/pytorch/pull/101995
Approved by: https://github.com/malfet , https://github.com/Skylion007 , https://github.com/ezyang
2023-11-30 02:46:41 +00:00
66a2600b6a
[T153220354] Fix header inclusions in c10 ( #1541 ) ( #101846 )
...
Summary:
This is a re-attempt to land the iwyu header changes, by taking the diff from [PR 100304](https://github.com/pytorch/pytorch/pull/100304 ), and adding the bare minimal changes to make the diff build corectly in the internal builds.
X-link: https://github.com/facebookresearch/pytorch3d/pull/1541
X-link: https://github.com/fairinternal/pytorch3d/pull/44
- Re-work D45769819 to fix header inclusions in c10
Test Plan:
```
buck2 build --no-remote-cache mode/dev-nosan //caffe2/c10/...
buck2 build --no-remote-cache mode/dev-nosan //deeplearning/fbgemm/fbgemm_gpu/...
buck2 build mode/dev-nosan //vision/fair/pytorch3d/pytorch3d:_C
```
Reviewed By: malfet
Differential Revision: D45920611
Pull Request resolved: https://github.com/pytorch/pytorch/pull/101846
Approved by: https://github.com/malfet , https://github.com/Skylion007
2023-05-20 19:35:14 +00:00
4eaaa08623
Revert "Fix header inclusions in c10 by iwyu ( #100304 )"
...
This reverts commit 6037ee8cc914d64a27965a35b20472044416a2a5.
Reverted https://github.com/pytorch/pytorch/pull/100304 on behalf of https://github.com/jeanschmidt due to Breaking meta internal builds and fbgemm builds ([comment](https://github.com/pytorch/pytorch/pull/100304#issuecomment-1543919257 ))
2023-05-11 12:37:35 +00:00
6037ee8cc9
Fix header inclusions in c10 by iwyu ( #100304 )
...
This work introduces include-what-you-use support for c10 by a CMake option defaulting to off. We also remove some unused header inclusions and fix a trivial inclusion error.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100304
Approved by: https://github.com/ezyang
2023-05-11 05:19:42 +00:00
3271413e74
Revert "Fix header inclusions in c10 by iwyu ( #100304 )"
...
This reverts commit 39ec5fa722730f6c25490c2c33933b014767f297.
Reverted https://github.com/pytorch/pytorch/pull/100304 on behalf of https://github.com/huydhn due to Sorry for reverting your PR, it is almost there but fails on Windows 39ec5fa722 , which is in unstable mode after https://github.com/pytorch/pytorch/pull/100548 ([comment](https://github.com/pytorch/pytorch/pull/100304#issuecomment-1542975714 ))
2023-05-11 00:37:32 +00:00
39ec5fa722
Fix header inclusions in c10 by iwyu ( #100304 )
...
This work introduces include-what-you-use support for c10 by a CMake option defaulting to off. We also remove some unused header inclusions and fix a trivial inclusion error.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/100304
Approved by: https://github.com/ezyang
2023-05-10 15:42:43 +00:00
44cc873fba
[PyTorch] Autoformat c10 ( #56830 )
...
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/56830
Opt into formatting on GitHub and format everything. This is a trial run before turning on formatting for more and eventually all of the codebase.
Test Plan: CI
Reviewed By: zertosh
Differential Revision: D27979080
fbshipit-source-id: a80f0c48691c08ae8ca0af06377b87e6a2351151
2021-04-30 21:23:28 -07:00
ec3b355a0f
Update ostream << TensorOptions printer. ( #35892 )
...
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/35892
A couple recent property additions were missing, plus we weren't
distinguishing between defaults and bona fide property values.
Test Plan: Imported from OSS
Differential Revision: D20834147
Pulled By: bhosmer
fbshipit-source-id: 26a7e433414e0cde1eee2a9a67472f03ba970897
2020-04-03 15:01:59 -07:00
5ae909b443
Revert D15920763: Move TensorOptions to ATen/core
...
Differential Revision:
D15920763
Original commit changeset: c3429973180a
fbshipit-source-id: 0efb27722b371e1047f02240f071bc222b52e51d
2019-08-13 12:07:18 -07:00
bde73860c6
Move TensorOptions to ATen/core ( #22020 )
...
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22020
ghimport-source-id: 62766d49658ee84b8076c555432b50e13d104bc6
Test Plan: Imported from OSS
Differential Revision: D15920763
Pulled By: zou3519
fbshipit-source-id: c3429973180a65606da82face5c0ee377035e716
2019-08-12 07:41:12 -07:00
d408324350
Move files to/from c10/core and c10/util ( #15316 )
...
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15316
This starts cleaning up the files in c10 according to the module structure we decided on.
Move to c10/util:
- Half.h, Half-inl.h, Half.cpp, bitcasts.h
Move to c10/core:
- Device.h, Device.cpp
- DeviceType.h, DeviceType.cpp
i-am-not-moving-c2-to-c10
Reviewed By: dzhulgakov
Differential Revision: D13498493
fbshipit-source-id: dfcf1c490474a12ab950c72ca686b8ad86428f63
2019-01-10 16:22:22 -08:00
ada8f828f9
Move TensorOptions, DefaultTensorOptions to c10
...
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/14746
Reviewed By: ezyang
Differential Revision: D13318644
fbshipit-source-id: b703d7dc67e75d9e9571c80d62a100c5fc4e84df
2018-12-06 15:59:04 -08:00
7e4a5b89fe
Back out "Move TensorOptions, DefaultTensorOptions and OptionsGuard to c10" ( #14745 )
...
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14745
Original commit changeset: c62e7f9b0255
Reviewed By: suo
Differential Revision: D13318594
fbshipit-source-id: 4d7dc35ca01b627accc3ee512bfcd6f2e805a533
2018-12-04 08:59:10 -08:00
46772dba0c
Move TensorOptions, DefaultTensorOptions and OptionsGuard to c10
...
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/14646
Reviewed By: ezyang
Differential Revision: D13283494
fbshipit-source-id: c62e7f9b02551926bf8f1e3ddf6ede4ec925d28d
2018-12-03 21:53:24 -08:00