Commit Graph

7 Commits

Author SHA1 Message Date
cyy
968b94bef2 [8/N] Fixes clang-tidy warnings in c10/{core,util}/*.h (#116082)
This patch enables clang-tidy coverage on c10/**/*.h and contains other fixes.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/116082
Approved by: https://github.com/Skylion007
2023-12-20 12:22:21 +00:00
Sunita Nadampalli
88207b10ca Enable thp(transparent huge pages) for buffer sizes >=2MB (#107697)
The 2MB thp pages provide better allocation latencies compared to the standard 4KB pages. This change has shown substantial improvement for batch mode usecases where the tensor sizes are larger than 100MB.

Only enabled if THP_MEM_ALLOC_ENABLE environment variable is set.

Relanding https://github.com/pytorch/pytorch/pull/93888 with functionality disabled for Android

Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/107697
Approved by: https://github.com/malfet
2023-12-16 18:16:19 +00:00
PyTorch MergeBot
a22b92d8ba Revert "Enable thp(transparent huge pages) for buffer sizes >=2MB (#95963)"
This reverts commit 3bb16a0842.

Reverted https://github.com/pytorch/pytorch/pull/95963 on behalf of https://github.com/izaitsevfb due to Breaks internal android builds: unused function c10_compute_alignment  [-Werror,-Wunused-function]
2023-03-14 02:15:08 +00:00
Sunita Nadampalli
3bb16a0842 Enable thp(transparent huge pages) for buffer sizes >=2MB (#95963)
The 2MB thp pages provide better allocation latencies compared to the standard 4KB pages. This change has shown substantial improvement for batch mode usecases where the tensor sizes are larger than 100MB.

Only enabled if THP_MEM_ALLOC_ENABLE environment variable is set.

re-landing https://github.com/pytorch/pytorch/pull/93888

Pull Request resolved: https://github.com/pytorch/pytorch/pull/95963
Approved by: https://github.com/malfet
2023-03-10 13:58:01 +00:00
PyTorch MergeBot
2936c8b9ce Revert "Enable thp(transparent huge pages) for buffer sizes >=2MB (#93888)"
This reverts commit 2cc845eb1a.

Reverted https://github.com/pytorch/pytorch/pull/93888 on behalf of https://github.com/seemethere due to Reverting due to internal build issues, Meta employees see: https://fburl.com/sandcastle/1p4zvldk
2023-03-01 22:33:04 +00:00
Sunita Nadampalli
2cc845eb1a Enable thp(transparent huge pages) for buffer sizes >=2MB (#93888)
The 2MB thp pages provide better allocation latencies compared to the standard 4KB pages. This change has shown significant improvement for batch mode usecases where the tensor sizes are larger than 100MB.

Only enabled if `THP_MEM_ALLOC_ENABLE` environment variable is set.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/93888
Approved by: https://github.com/jgong5, https://github.com/malfet
2023-02-28 21:12:46 +00:00
mikey dagitses
fc6a488e9a extract out //c10/core:alignment (#70858)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/70858

ghstack-source-id: 147642533

Test Plan: Extracted a constant to a new header, trusting CI build to validate.

Reviewed By: malfet

Differential Revision: D33329689

fbshipit-source-id: 8697bb81a5cc3366462ebdf1f214b62d478fa77c
(cherry picked from commit 16663847e1)
2022-01-27 07:34:52 +00:00