Commit Graph

10 Commits

Author SHA1 Message Date
cyy
288df042c5 [1/N] Change static functions in headers to inline (#127727)
So that it may fix some tricky linking issues.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/127727
Approved by: https://github.com/ezyang
2024-06-03 04:34:36 +00:00
cyy
9a0c217a0a [9/N] Fixes clang-tidy warnings in c10/util/*.h (#116185)
Continued work to clean headers in c10/util.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/116185
Approved by: https://github.com/Skylion007
2023-12-22 09:35:44 +00:00
Kazuaki Ishizaki
64b8d20a5c Fix typos under c10 directory (#98079)
This PR fixes typos in comments and messages of files under `c10` directory

Pull Request resolved: https://github.com/pytorch/pytorch/pull/98079
Approved by: https://github.com/Skylion007
2023-03-31 18:31:11 +00:00
lezcano
a3909d958a Golf the function contiguous_strides (#82709)
This provides a small optimisation as the code generated is different
https://godbolt.org/z/M95qcnYsf, and runs faster
https://quick-bench.com/q/HEdCSw5CBvumdLlOvX-OfvdjH0M
Pull Request resolved: https://github.com/pytorch/pytorch/pull/82709
Approved by: https://github.com/ezyang
2022-08-03 16:44:54 +00:00
Yukio Siraichi
ecde870d4e Move ATen/core/DimVector.h to c10/util/DimVector.h.
This PR moves `ATen/core/DimVector.h`, as suggested in:
https://github.com/pytorch/pytorch/pull/76812#discussion_r866875924

The changes can be summarized as:

- Changing includes from `ATen/core/DimVector.h` to `c10/util/DimVector.h`
- Re-declaring both the type and constant size in `at` namespace
- Making `c10::contiguous_strides` return a `DimVector`

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

Approved by: https://github.com/peterbell10, https://github.com/ezyang
2022-05-11 01:30:56 +00:00
Yukio Siraichi
2e6ed5d0cc Move contiguous_strides to c10/util/strides.h.
This PR moves `contiguous_strides` implementation from `LinearAlgebraUtils.h` to a broader
scope: `c10/util/strides.h`. This should make it easier to reuse this implementation on
other parts of the codebase.

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

Approved by: https://github.com/ezyang
2022-05-10 19:38:25 +00:00
PyTorch MergeBot
13a8471792 Revert "Move contiguous_strides to c10/util/strides.h."
This reverts commit 2ec60944c7.

Reverted https://github.com/pytorch/pytorch/pull/76812 on behalf of https://github.com/malfet
2022-05-09 19:01:29 +00:00
Yukio Siraichi
2ec60944c7 Move contiguous_strides to c10/util/strides.h.
This PR moves `contiguous_strides` implementation from `LinearAlgebraUtils.h` to a broader
scope: `c10/util/strides.h`. This should make it easier to reuse this implementation on
other parts of the codebase.

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

Approved by: https://github.com/ezyang
2022-05-08 12:49:41 +00:00
PyTorch MergeBot
95adb322e0 Revert "Move contiguous_strides to c10/util/strides.h."
This reverts commit 84316cc389.

Reverted https://github.com/pytorch/pytorch/pull/76812 on behalf of https://github.com/ezyang
2022-05-08 02:47:12 +00:00
Yukio Siraichi
84316cc389 Move contiguous_strides to c10/util/strides.h.
This PR moves `contiguous_strides` implementation from `LinearAlgebraUtils.h` to a broader
scope: `c10/util/strides.h`. This should make it easier to reuse this implementation on
other parts of the codebase.

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

Approved by: https://github.com/ezyang
2022-05-08 02:33:22 +00:00