pytorch/torch/utils
Han, Xu 5ed60477a7 Optimize load inline via pch (#106696)
Add PreCompiled Header(PCH) to reduce load_inline build time.
PCH is gcc built-in mechanism: https://gcc.gnu.org/onlinedocs/gcc-4.0.4/gcc/Precompiled-Headers.html

Add PCH for '#include <torch/extension.h>'. This file will used in all load_inline modules. All load_inline modules can take benifit from this PR.

Changes:
1. Add PCH signature to guarantee PCH(gch) file take effect.
2. Unification get cxx compiler funtions.
3. Unification get build flags funtions.

Before this PR:
![image](https://github.com/pytorch/pytorch/assets/8433590/f190cdcb-236c-4312-b165-d419a7efafe3)

Added this PR:
![image](https://github.com/pytorch/pytorch/assets/8433590/b45c5ad3-e902-4fc8-b450-743cf73505a4)

Compiling time is reduced from 14.06s to 7.36s.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/106696
Approved by: https://github.com/jgong5, https://github.com/jansel
2023-08-21 10:08:30 +00:00
..
_sympy
backcompat
benchmark
bottleneck
data [BE]: Update ruff to 0.285 (#107519) 2023-08-20 01:36:18 +00:00
hipify [BE]: Update ruff to 0.285 (#107519) 2023-08-20 01:36:18 +00:00
jit
model_dump
tensorboard
viz
__init__.py
_content_store.py
_contextlib.py grad_mode decorators without paren (#107086) 2023-08-15 05:25:33 +00:00
_cpp_extension_versioner.py
_cuda_trace.py
_device.py asarray: take the default device into consideration. (#106779) 2023-08-11 13:16:42 +00:00
_foreach_utils.py
_freeze.py
_mode_utils.py
_python_dispatch.py
_pytree.py
_stats.py
_traceback.py Revamp guard debug logging (#107505) 2023-08-20 06:50:27 +00:00
_zip.py
backend_registration.py
bundled_inputs.py [BE]: Update ruff to 0.285 (#107519) 2023-08-20 01:36:18 +00:00
checkpoint.py Improve activation checkpoint docs wording (#107296) 2023-08-16 17:36:52 +00:00
collect_env.py
cpp_backtrace.py
cpp_extension.py Optimize load inline via pch (#106696) 2023-08-21 10:08:30 +00:00
dlpack.py
file_baton.py
flop_counter.py
hooks.py [BE]: Update ruff to 0.285 (#107519) 2023-08-20 01:36:18 +00:00
mkldnn.py
mobile_optimizer.py [BE]: Update ruff to 0.285 (#107519) 2023-08-20 01:36:18 +00:00
model_zoo.py
show_pickle.py
throughput_benchmark.py
weak.py