Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LTO type mismatch on xnn_table_exp2minus_k_over_* kernels #7261

Open
Skylion007 opened this issue Oct 14, 2024 · 2 comments
Open

LTO type mismatch on xnn_table_exp2minus_k_over_* kernels #7261

Skylion007 opened this issue Oct 14, 2024 · 2 comments

Comments

@Skylion007
Copy link

This is an issue at commit: 87ee0b4

I tried enabling GCC LTO for PyTorch in this PR: pytorch/pytorch#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
@Skylion007
Copy link
Author

Actually seems like it's a duplicate of this issue which is still open: #6806

@alankelly
Copy link
Collaborator

Could you please open a PR with a fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants