Commit Graph

10 Commits

Author SHA1 Message Date
cyy
f172feae0d More tidy fixes (#93069)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/93069
Approved by: https://github.com/Skylion007
2023-01-27 06:40:50 +00:00
Gabor Kertesz
c4ff49f4c7 Enable win-arm64
This patch enables Pytorch build from source with Ninja and
'Visual Studio 16 2019' CMake generator on Windows on Arm.

Tests:
- Build from source: 'python setup.py develop'.
- Run simple Pytorch example: passed
- python test\test_torch.py:
-- same results as on x64
-- Ran 1344 tests, failures=2
Pull Request resolved: https://github.com/pytorch/pytorch/pull/72424
2022-02-28 17:17:56 +00:00
Scott Wolchok
0a66d5b325 [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
2021-08-19 18:54:51 -07:00
Scott Wolchok
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
Sam Estep
8c798e0622 Forbid trailing whitespace (#53406)
Summary:
Context: https://github.com/pytorch/pytorch/pull/53299#discussion_r587882857

These are the only hand-written parts of this diff:
- the addition to `.github/workflows/lint.yml`
- the file endings changed in these four files (to appease FB-internal land-blocking lints):
  - `GLOSSARY.md`
  - `aten/src/ATen/core/op_registration/README.md`
  - `scripts/README.md`
  - `torch/csrc/jit/codegen/fuser/README.md`

The rest was generated by running this command (on macOS):
```
git grep -I -l ' $' -- . ':(exclude)**/contrib/**' ':(exclude)third_party' | xargs gsed -i 's/ *$//'
```

I looked over the auto-generated changes and didn't see anything that looked problematic.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/53406

Test Plan:
This run (after adding the lint but before removing existing trailing spaces) failed:
- https://github.com/pytorch/pytorch/runs/2043032377

This run (on the tip of this PR) succeeded:
- https://github.com/pytorch/pytorch/runs/2043296348

Reviewed By: walterddr, seemethere

Differential Revision: D26856620

Pulled By: samestep

fbshipit-source-id: 3f0de7f7c2e4b0f1c089eac9b5085a58dd7e0d97
2021-03-05 17:22:55 -08:00
Samuel Marks
8aad66a7bd [c10/**] Fix typos (#49815)
Summary:
All pretty minor. I avoided renaming `class DestructableMock` to `class DestructibleMock` and similar such symbol renames (in this PR).

Pull Request resolved: https://github.com/pytorch/pytorch/pull/49815

Reviewed By: VitalyFedyunin

Differential Revision: D25734507

Pulled By: mruberry

fbshipit-source-id: bbe8874a99d047e9d9814bf92ea8c036a5c6a3fd
2021-01-01 02:11:56 -08:00
peter
ab169fa5ac Fix find_first_set for x86 MSVC (Updated) (#38706)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/38706

Differential Revision: D21640477

Pulled By: ezyang

fbshipit-source-id: fc7ff5c35fc3f776553e93f485532cc805a2af9c
2020-05-19 14:14:56 -07:00
peter
378956b481 Make find_first_set works on x86 MSVC (#38637)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/38322#issuecomment-630031072.
Tested locally.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/38637

Differential Revision: D21620059

Pulled By: ezyang

fbshipit-source-id: 50af50ce29e46759f11a196fa0fedca2740214bb
2020-05-18 14:40:10 -07:00
Zhang, Xiaobing
4d2502a0c2 fix explicitly defaulted constexpr assignment operator fails to compile error for gcc 5.3.0 (#36561)
Summary:
gcc 5.3.0 has an issue which can't define default function as constexpr, see  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68754. for works for gcc 5.3.0, not define default function as constexpr function now.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/36561

Differential Revision: D21024109

Pulled By: ezyang

fbshipit-source-id: 58fce704625b7d0926e40b6b12841ebbe392c59c
2020-04-20 13:19:10 -07:00
Sebastian Messmer
7b9ab91614 Improve boxed dispatch performance (#33313)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/33313

Instead of just remembering the number of arguments and iterating over the stack,
the DispatchKeyExtractor now remembers the exact locations of the dispatch relevant arguments
(i.e. Tensor arguments) and only looks at those.
ghstack-source-id: 101908386

Test Plan: unit tests, benchmarks

Differential Revision: D19748549

fbshipit-source-id: b5b9ff2233b3507e0b600460f422912cfa9e3f0f
2020-04-11 12:04:27 -07:00