You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit dad4443
Browse filesBrowse the repository at this point in the historyBrowse files
Give targets that link torch_cpu_library torch's compile settings back
Linking the torch target does more than link. It also adds torch's
include directories as system headers and TORCH_CXX_FLAGS to every
target that links it. torch_cpu_library, which these targets now link
instead so that a CPU-only torch can load them, carries neither.
So two things changed for those targets. torch/csrc/api/include became a
normal include directory, so warnings inside torch's headers are now
reported as if they were our code. And a TORCH_CXX_FLAGS set at
configure time no longer reached them. For example, compiling
kernels/portable/cpu/op_allclose.cpp with -Wall -Wextra -Werror went
from no errors to 25 errors, all inside torch's headers. Default builds
were not affected.
Add a small helper, executorch_target_torch_compile_settings, that gives
a target those two settings, and call it for each target that links
torch_cpu_library.
0 commit comments