onnxruntime
f9b87e94 - Improve CPU provider build time with Eigen PCH (#32616)

Commit
12 days ago
Improve CPU provider build time with Eigen PCH (#32616) ### Description Add `core/util/math_cpuonly.h` to the existing MSVC precompiled header for the CPU providers target. This allows Eigen headers and templates used by the provider translation units to be parsed once and reused. ### Build performance The vcperf baseline identified `math_cpuonly.h` as the most expensive included file for `onnxruntime_providers.vcxproj`: - WCTR: 35.205 seconds - Include count: 107 After the change, `math_cpuonly.h` no longer appeared in the top 15 included-file hotspots. Five uninstrumented full CPU Release clean rebuilds were measured before and after the change with MSVC and `--parallel 8`: | Variant | Mean (s) | StdDev (s) | |---|---:|---:| | Baseline | 2519.522 | 136.238 | | With PCH change | 2363.976 | 187.319 | The average clean rebuild improved by 155.546 seconds (6.17%). ### Validation - Two full CPU Release vcperf trace builds completed successfully. - Five baseline and five post-change full CPU Release clean rebuilds completed successfully. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Author
Parents
Loading