This is an issue at commit: 87ee0b46b834f67bad9025d4a82ed5654f3403d3
I tried enabling GCC LTO for PyTorch in this PR: https://github.com/pytorch/pytorch/pull/137866 and hit this warning that is treated as an error. Seems like a potentially straightforward fix upstream and would let XNNPack be properly LTO compiled by GCC without warning.
/var/lib/jenkins/workspace/third_party/XNNPACK/src/amalgam/gen/sse2.c:2482: error: type of ‘xnn_table_exp2minus_k_over_64’ does not match original declaration [-Werror=lto-type-mismatch]
2482 | extern XNN_INTERNAL const float xnn_table_exp2minus_k_over_64[64];
|
/var/lib/jenkins/workspace/third_party/XNNPACK/src/tables/exp2minus-k-over-64.c:12: note: type ‘const uint32_t’ should match type ‘const float’
12 | XNN_INTERNAL const uint32_t xnn_table_exp2minus_k_over_64[64] = {
|
/var/lib/jenkins/workspace/third_party/XNNPACK/src/tables/exp2minus-k-over-64.c:12: note: ‘xnn_table_exp2minus_k_over_64’ was previously declared here
/var/lib/jenkins/workspace/third_party/XNNPACK/src/amalgam/gen/sse2.c:1931: error: type of ‘xnn_table_exp2minus_k_over_16’ does not match original declaration [-Werror=lto-type-mismatch]
1931 | extern XNN_INTERNAL const float xnn_table_exp2minus_k_over_16[16];
|
/var/lib/jenkins/workspace/third_party/XNNPACK/src/tables/exp2minus-k-over-16.c:12: note: type ‘const uint32_t’ should match type ‘const float’
12 | XNN_INTERNAL const uint32_t xnn_table_exp2minus_k_over_16[16] = {
|
/var/lib/jenkins/workspace/third_party/XNNPACK/src/tables/exp2minus-k-over-16.c:12: note: ‘xnn_table_exp2minus_k_over_16’ was previously declared here
lto1: all warnings being treated as errors
This is an issue at commit: 87ee0b46b834f67bad9025d4a82ed5654f3403d3
I tried enabling GCC LTO for PyTorch in this PR: https://github.com/pytorch/pytorch/pull/137866 and hit this warning that is treated as an error. Seems like a potentially straightforward fix upstream and would let XNNPack be properly LTO compiled by GCC without warning.