Improve build time of register_symbols.cpp without compiler hacks (#14911)
authorGiuseppe Ottaviano <ott@fb.com>
Mon, 10 Dec 2018 19:54:45 +0000 (11:54 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 10 Dec 2018 19:57:11 +0000 (11:57 -0800)
commite77de074488b28597426067c5ac365f77f73491f
tree5bfc0174c1e81991f0c33504f4d9d631d7ad169c
parent18c93b87c2c5cbee029cd7655635538cf5764be2
Improve build time of register_symbols.cpp without compiler hacks (#14911)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14911

In optimized modes the compiler tries to inline all the
`unordered_map::operator[]` calls, creating a massive amount of code
which takes several minutes to optimize. Instead, create a table of
PODs and populate the maps using a simple loop.

Reviewed By: soumith, luciang

Differential Revision: D13382948

fbshipit-source-id: b6752921e0f7213595d26b39e4397f6a3897960b
aten/src/ATen/core/CMakeLists.txt
aten/src/ATen/core/register_symbols.cpp