cyy
41bd0c900a
[1/N] Deprecate c10::string_view and at::string ( #151972 )
...
The calls of `c10::string_view` in the code base are replaced by `std::string_view`. The calls of `at::string` are replaced by `std::string`
Pull Request resolved: https://github.com/pytorch/pytorch/pull/151972
Approved by: https://github.com/malfet
2025-04-29 07:23:52 +00:00
Anthony Shoumikhin
e2f9759bd0
Fix broken URLs ( #152237 )
...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/152237
Approved by: https://github.com/huydhn , https://github.com/malfet
2025-04-27 09:56:42 +00:00
inventshah
bf28d1cafc
Expose bicubic mode for torch::nn::functional::grid_sample in LibTorch ( #150817 )
...
When bicubic interpolation was added to grid_sampler in #44780 , `GridSampleFuncOptions` was not updated to allow a user to use bicubic mode in LibTorch, even though the function could handle it. This PR fixes the parity such that LibTorch's `torch::nn::functional::grid_sample` behaves the same as PyTorch's `torch.nn.functional.grid_sample`.
Existing users can directly use `torch::grid_sampler` but must know what int to pass for the interpolation (2 for bicubic) and padding mode parameters, which is not ideal.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/150817
Approved by: https://github.com/Skylion007
2025-04-21 08:55:27 +00:00
PyTorch MergeBot
4926bd6004
Revert "Fix the Problems About Defining Static Variable in Inline Function ( #147095 )"
...
This reverts commit 3da14d38bd .
Reverted https://github.com/pytorch/pytorch/pull/147095 on behalf of https://github.com/atalman due to breaks internally ([comment](https://github.com/pytorch/pytorch/pull/147095#issuecomment-2787129770 ))
2025-04-08 17:10:36 +00:00
FFFrog
3da14d38bd
Fix the Problems About Defining Static Variable in Inline Function ( #147095 )
...
Refer to https://github.com/pytorch/pytorch/issues/125465 for more informations
- Remove unused header files
- Move the inline function that defines the static variable to .cc
Pull Request resolved: https://github.com/pytorch/pytorch/pull/147095
Approved by: https://github.com/cyyever , https://github.com/albanD
2025-04-08 10:23:02 +00:00
Nikita Shulga
8bece88655
[BE] Eliminate TODO for 2022 ( #149557 )
...
Need to think a bit more about what types.h includes
Fixes #ISSUE_NUMBER
Pull Request resolved: https://github.com/pytorch/pytorch/pull/149557
Approved by: https://github.com/albanD
2025-03-23 05:35:54 +00:00
Jane Xu
fcb633fafa
Introduce TORCH_ABI_VERSION and a runtime aoti_torch_abi_version C shim ABI ( #148892 )
...
Importable https://github.com/pytorch/pytorch/pull/148836
Pull Request resolved: https://github.com/pytorch/pytorch/pull/148892
Approved by: https://github.com/albanD
2025-03-10 22:22:10 +00:00
cyy
9aa897b992
Remove unnecessary tensor clone ( #148159 )
...
Fixes #ISSUE_NUMBER
Pull Request resolved: https://github.com/pytorch/pytorch/pull/148159
Approved by: https://github.com/Skylion007
2025-03-02 16:21:39 +00:00
cyy
6293d1446b
[2/N] Remove NOLINT suppressions ( #146402 )
...
Fixes #ISSUE_NUMBER
Pull Request resolved: https://github.com/pytorch/pytorch/pull/146402
Approved by: https://github.com/soulitzer
2025-02-05 08:38:52 +00:00
cyy
9a841f9321
Enable bugprone-unchecked-optional-access ( #144226 )
...
We can actually enable bugprone-unchecked-optional-access without the risk of hang.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/144226
Approved by: https://github.com/albanD
2025-01-10 03:16:56 +00:00
cyy
b0be30dd79
[19/N] Fix extra warnings brought by clang-tidy-17 ( #144448 )
...
Apply more clang-tidy fixes. There was a bug introduced by #144014 due to incorrect namespace concatenation which is reverted here.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/144448
Approved by: https://github.com/albanD
2025-01-09 15:58:05 +00:00
cyy
d0070ca07e
[18/N] Fix extra warnings brought by clang-tidy-17 ( #144014 )
...
Fixes #ISSUE_NUMBER
Pull Request resolved: https://github.com/pytorch/pytorch/pull/144014
Approved by: https://github.com/Skylion007 , https://github.com/albanD
2025-01-08 17:21:55 +00:00
Richard Barnes
3beb7006dd
c10::optional -> std::optional in a few places ( #144340 )
...
Test Plan: Sandcastle
Pull Request resolved: https://github.com/pytorch/pytorch/pull/144340
Approved by: https://github.com/malfet
2025-01-07 21:09:39 +00:00
cyy
dca443835e
Enable more readability-redundant checks ( #143963 )
...
They are helpful to simplifying code.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/143963
Approved by: https://github.com/albanD
2024-12-30 14:49:33 +00:00
cyy
1feae27ed6
[16/N] Fix extra warnings brought by clang-tidy-17 ( #143714 )
...
Fixes #ISSUE_NUMBER
Pull Request resolved: https://github.com/pytorch/pytorch/pull/143714
Approved by: https://github.com/Skylion007 , https://github.com/albanD
2024-12-24 03:29:38 +00:00
Richard Barnes
e2d47a133b
Disable c10::optional macros ( #138912 )
...
Test Plan: Sandcastle
Pull Request resolved: https://github.com/pytorch/pytorch/pull/138912
Approved by: https://github.com/Skylion007 , https://github.com/malfet
2024-12-17 09:22:47 +00:00
cyy
4273e1a059
[5/N] Apply bugprone-unchecked-optional-access ( #143111 )
...
Fixes #ISSUE_NUMBER
Pull Request resolved: https://github.com/pytorch/pytorch/pull/143111
Approved by: https://github.com/Skylion007
2024-12-15 01:07:28 +00:00
cyy
075905b7bd
[14/N] Fix extra warnings brought by clang-tidy-17 ( #141644 )
...
Fixes #ISSUE_NUMBER
Pull Request resolved: https://github.com/pytorch/pytorch/pull/141644
Approved by: https://github.com/ezyang
Co-authored-by: Eli Uriegas <1700823+seemethere@users.noreply.github.com>
2024-12-13 06:22:13 +00:00
Richard Barnes
82ce888273
c10::string_view -> std::string_view in more places ( #142517 )
...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/142517
Approved by: https://github.com/malfet
2024-12-12 19:45:59 +00:00
PyTorch MergeBot
2f0fe82f6d
Revert "[14/N] Fix extra warnings brought by clang-tidy-17 ( #141644 )"
...
This reverts commit 24a5a2ef25 .
Reverted https://github.com/pytorch/pytorch/pull/141644 on behalf of https://github.com/clee2000 due to failing internally D67112938 ([comment](https://github.com/pytorch/pytorch/pull/141644#issuecomment-2539602023 ))
2024-12-12 17:43:36 +00:00
cyy
f7b9533c3f
[4/N] Apply bugprone-unchecked-optional-access ( #142832 )
...
Fixes #ISSUE_NUMBER
Pull Request resolved: https://github.com/pytorch/pytorch/pull/142832
Approved by: https://github.com/albanD
2024-12-12 04:33:32 +00:00
cyy
24a5a2ef25
[14/N] Fix extra warnings brought by clang-tidy-17 ( #141644 )
...
Fixes #ISSUE_NUMBER
Pull Request resolved: https://github.com/pytorch/pytorch/pull/141644
Approved by: https://github.com/ezyang
2024-12-11 18:40:42 +00:00
cyy
b4c0973b59
[2/N] Apply bugprone-unchecked-optional-access ( #141091 )
...
Fixes #ISSUE_NUMBER
Pull Request resolved: https://github.com/pytorch/pytorch/pull/141091
Approved by: https://github.com/Skylion007 , https://github.com/albanD
Co-authored-by: Aaron Gokaslan <aaronGokaslan@gmail.com>
2024-12-09 19:30:19 +00:00
cyy
96be048f06
[1/N] Avoid copy in std::get ( #141812 )
...
Fixes #ISSUE_NUMBER
Pull Request resolved: https://github.com/pytorch/pytorch/pull/141812
Approved by: https://github.com/Skylion007
2024-12-01 03:53:35 +00:00
FFFrog
0f1a88cfba
Make Context to be Device-agnostic Step by Step (2/N) ( #136526 )
...
----
- add new method(getDefaultGenerator, getNewGenerator) into AcceleratorHooksInterface
Pull Request resolved: https://github.com/pytorch/pytorch/pull/136526
Approved by: https://github.com/ezyang , https://github.com/EikanWang
2024-11-18 18:21:17 +00:00
PyTorch MergeBot
80d0356b11
Revert "Make Context to be Device-agnostic Step by Step (2/N) ( #136526 )"
...
This reverts commit c03324de2d .
Reverted https://github.com/pytorch/pytorch/pull/136526 on behalf of https://github.com/ZainRizvi due to This fails to build internally. See D65604944 for more details ([comment](https://github.com/pytorch/pytorch/pull/136526#issuecomment-2465790157 ))
2024-11-08 21:40:10 +00:00
FFFrog
c03324de2d
Make Context to be Device-agnostic Step by Step (2/N) ( #136526 )
...
----
- add new method(getDefaultGenerator, getNewGenerator) into AcceleratorHooksInterface
Pull Request resolved: https://github.com/pytorch/pytorch/pull/136526
Approved by: https://github.com/ezyang , https://github.com/EikanWang
2024-11-07 06:28:47 +00:00
Richard Barnes
6b8e3022f2
Remove c10::optional usages in PyTorch ( #139525 )
...
Test Plan: Sandcastle
Reviewed By: swolchok
Pull Request resolved: https://github.com/pytorch/pytorch/pull/139525
Approved by: https://github.com/malfet , https://github.com/Skylion007
2024-11-04 15:35:23 +00:00
cyy
419a7e197d
[6/N] Fix Wextra-semi warning ( #139605 )
...
Fixes #ISSUE_NUMBER
Pull Request resolved: https://github.com/pytorch/pytorch/pull/139605
Approved by: https://github.com/ezyang
2024-11-04 13:43:16 +00:00
cyy
f95c71867e
[9/N] Fix extra warnings brought by clang-tidy-17 ( #139286 )
...
Fixes #ISSUE_NUMBER
Pull Request resolved: https://github.com/pytorch/pytorch/pull/139286
Approved by: https://github.com/ezyang
2024-10-31 05:20:31 +00:00
cyyever
456c87c8a2
[8/N] Fix extra warnings brought by clang-tidy-17 ( #139151 )
...
Fixes #ISSUE_NUMBER
Pull Request resolved: https://github.com/pytorch/pytorch/pull/139151
Approved by: https://github.com/ezyang
Co-authored-by: Aaron Gokaslan <aaronGokaslan@gmail.com>
2024-10-30 14:20:08 +00:00
cyy
d8f99f39cb
Avoid unnecessary tensor constructions ( #139039 )
...
Because Variable is an alias of Tensor
Pull Request resolved: https://github.com/pytorch/pytorch/pull/139039
Approved by: https://github.com/Skylion007
2024-10-29 02:23:23 +00:00
Richard Barnes
068f7e7a78
torch::optional -> std::optional ( #138987 )
...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/138987
Approved by: https://github.com/Skylion007
2024-10-28 19:09:46 +00:00
Richard Barnes
42994234a6
std::value/std::type -> std::_v/std::_t ( #138746 )
...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/138746
Approved by: https://github.com/cyyever , https://github.com/malfet
2024-10-26 20:59:24 +00:00
PyTorch MergeBot
10f16cc7da
Revert "Make Context to be Device-agnostic Step by Step (2/N) ( #136526 )"
...
This reverts commit 8aacbee8e0 .
Reverted https://github.com/pytorch/pytorch/pull/136526 on behalf of https://github.com/wdvr due to this one has failing internal tests, not related to a landrace with #138398 - reverting this one ([comment](https://github.com/pytorch/pytorch/pull/136526#issuecomment-2430460176 ))
2024-10-22 22:53:56 +00:00
FFFrog
af0bc75460
Remove deprecated alias macro(1/3) ( #137556 )
...
**Detailed Descriptions:**
- Remove AT_ERROR Macro
Pull Request resolved: https://github.com/pytorch/pytorch/pull/137556
Approved by: https://github.com/ezyang
2024-10-21 17:32:32 +00:00
cyy
7ec21a6f0f
Enable clang-tidy on torch/csrc/api ( #138437 )
...
Fixes #ISSUE_NUMBER
Pull Request resolved: https://github.com/pytorch/pytorch/pull/138437
Approved by: https://github.com/r-barnes
2024-10-21 14:22:38 +00:00
FFFrog
8aacbee8e0
Make Context to be Device-agnostic Step by Step (2/N) ( #136526 )
...
----
- add new method(getDefaultGenerator, getNewGenerator) into AcceleratorHooksInterface
Pull Request resolved: https://github.com/pytorch/pytorch/pull/136526
Approved by: https://github.com/ezyang , https://github.com/EikanWang
ghstack dependencies: #138323
2024-10-21 13:51:54 +00:00
cyy
14fc6b70ea
Remove torch/csrc/api/include/torch/linalg.h ( #138435 )
...
Only one place in OSS uses it.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/138435
Approved by: https://github.com/r-barnes
2024-10-21 07:04:27 +00:00
cyy
e7b8a9a4c1
[5/N] Fix clang-tidy warnings in torch/csrc/api/ ( #138389 )
...
Follows #138382
Pull Request resolved: https://github.com/pytorch/pytorch/pull/138389
Approved by: https://github.com/ezyang
2024-10-21 01:12:37 +00:00
cyy
cdc9f14227
[4/N] Fix clang-tidy warnings in torch/csrc/api/ ( #138382 )
...
Follows #138328
Pull Request resolved: https://github.com/pytorch/pytorch/pull/138382
Approved by: https://github.com/ezyang
2024-10-19 13:32:51 +00:00
Richard Barnes
fddabc6e0b
C10_UNUSED to [[maybe_unused]] ( #6357 ) ( #138364 )
...
Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/6357
Pull Request resolved: https://github.com/pytorch/pytorch/pull/138364
Approved by: https://github.com/Skylion007 , https://github.com/eqy
2024-10-19 13:17:43 +00:00
cyy
675e16e137
[3/N] Fix clang-tidy warnings in torch/csrc/api/ ( #138328 )
...
Follows #136998
Pull Request resolved: https://github.com/pytorch/pytorch/pull/138328
Approved by: https://github.com/ezyang
2024-10-19 07:07:39 +00:00
cyyever
deaf0418b2
[2/N] Fix clang-tidy warnings in torch/csrc/api/ ( #136998 )
...
Follows #134545
Pull Request resolved: https://github.com/pytorch/pytorch/pull/136998
Approved by: https://github.com/ezyang
2024-10-16 07:50:59 +00:00
PyTorch MergeBot
9af4e0d2aa
Revert "Make Context to be Device-agnostic Step by Step (2/N) ( #136526 )"
...
This reverts commit a6eb020522 .
Reverted https://github.com/pytorch/pytorch/pull/136526 on behalf of https://github.com/clee2000 due to breaking internal tests related to MITA, @ezyang has a forward fix? ([comment](https://github.com/pytorch/pytorch/pull/136519#issuecomment-2414588302 ))
2024-10-15 17:19:15 +00:00
Richard Barnes
b7f798caa4
Use C10_UNUSED instead of (void)X ( #137239 )
...
Summary:
Auto-generated with
```
buck run //scripts/rbarnes/regex_multiline_replacer:regex_multiline_replacer -- --find '^(\s*for\s*\()(const.*\n)\s*\(void\)[A-Za-z]+;\s*//\s*Suppress.*\s*\n(.*)' --replace '\1C10_UNUSED \2\3' `find caffe2/ -regex ".*\.\(cpp\|h\)"`
```
Differential Revision: D33432600
Pull Request resolved: https://github.com/pytorch/pytorch/pull/137239
Approved by: https://github.com/Skylion007
2024-10-15 14:32:59 +00:00
FFFrog
a6eb020522
Make Context to be Device-agnostic Step by Step (2/N) ( #136526 )
...
----
- add new method(getDefaultGenerator, getNewGenerator) into AcceleratorHooksInterface
Pull Request resolved: https://github.com/pytorch/pytorch/pull/136526
Approved by: https://github.com/ezyang , https://github.com/EikanWang
2024-10-15 01:53:28 +00:00
PyTorch MergeBot
33e5921e6b
Revert "Make Context to be Device-agnostic Step by Step (2/N) ( #136526 )"
...
This reverts commit 72ad1b8c6c .
Reverted https://github.com/pytorch/pytorch/pull/136526 on behalf of https://github.com/jovianjaison due to this pr is causing errors internally ([comment](https://github.com/pytorch/pytorch/pull/136519#issuecomment-2405781093 ))
2024-10-10 18:32:16 +00:00
FFFrog
72ad1b8c6c
Make Context to be Device-agnostic Step by Step (2/N) ( #136526 )
...
- add new method(getDefaultGenerator, getNewGenerator) into AcceleratorHooksInterface
Pull Request resolved: https://github.com/pytorch/pytorch/pull/136526
Approved by: https://github.com/ezyang , https://github.com/EikanWang
ghstack dependencies: #136519
2024-10-09 07:34:30 +00:00
cyy
a2396b2dd8
[2/N] Fix extra warnings brought by clang-tidy-17 ( #137459 )
...
Follows #137407
Pull Request resolved: https://github.com/pytorch/pytorch/pull/137459
Approved by: https://github.com/Skylion007
2024-10-08 19:05:02 +00:00