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

Multiple definitions regression #6

Open
XapaJIaMnu opened this issue Sep 15, 2023 · 3 comments
Open

Multiple definitions regression #6

XapaJIaMnu opened this issue Sep 15, 2023 · 3 comments

Comments

@XapaJIaMnu
Copy link

Trying to upgrade I have some multiple definition issue:

In file included from /home/nik/marian-dev/src/3rd_party/simd_utils/simd_utils_constants.h:19,
                 from /home/nik/marian-dev/src/3rd_party/simd_utils/simd_utils.h:27,
                 from /home/nik/marian-dev/src/3rd_party/faiss/VectorTransform.cpp:23:
/home/nik/marian-dev/src/3rd_party/simd_utils/sse2neon_wrapper.h:74:22: error: redefinition of ‘__m128i _mm_aesdec_si128(__m128i, __m128i)’
   74 | FORCE_INLINE __m128i _mm_aesdec_si128(__m128i a, __m128i RoundKey)
      |                      ^~~~~~~~~~~~~~~~
In file included from /home/nik/marian-dev/src/3rd_party/simd_utils/sse2neon_wrapper.h:11,
                 from /home/nik/marian-dev/src/3rd_party/simd_utils/simd_utils_constants.h:19,
                 from /home/nik/marian-dev/src/3rd_party/simd_utils/simd_utils.h:27,
                 from /home/nik/marian-dev/src/3rd_party/faiss/VectorTransform.cpp:23:
/home/nik/marian-dev/src/3rd_party/simd_utils/sse2neon.h:8969:22: note: ‘__m128i _mm_aesdec_si128(__m128i, __m128i)’ previously defined here
 8969 | FORCE_INLINE __m128i _mm_aesdec_si128(__m128i a, __m128i RoundKey)
      |                      ^~~~~~~~~~~~~~~~
In file included from /home/nik/marian-dev/src/3rd_party/simd_utils/simd_utils_constants.h:19,
                 from /home/nik/marian-dev/src/3rd_party/simd_utils/simd_utils.h:27,
                 from /home/nik/marian-dev/src/3rd_party/faiss/VectorTransform.cpp:23:
/home/nik/marian-dev/src/3rd_party/simd_utils/sse2neon_wrapper.h:79:22: error: redefinition of ‘__m128i _mm_aesdeclast_si128(__m128i, __m128i)’
   79 | FORCE_INLINE __m128i _mm_aesdeclast_si128(__m128i a, __m128i RoundKey)
      |                      ^~~~~~~~~~~~~~~~~~~~
In file included from /home/nik/marian-dev/src/3rd_party/simd_utils/sse2neon_wrapper.h:11,
                 from /home/nik/marian-dev/src/3rd_party/simd_utils/simd_utils_constants.h:19,
                 from /home/nik/marian-dev/src/3rd_party/simd_utils/simd_utils.h:27,
                 from /home/nik/marian-dev/src/3rd_party/faiss/VectorTransform.cpp:23:
/home/nik/marian-dev/src/3rd_party/simd_utils/sse2neon.h:8989:22: note: ‘__m128i _mm_aesdeclast_si128(__m128i, __m128i)’ previously defined here
 8989 | FORCE_INLINE __m128i _mm_aesdeclast_si128(__m128i a, __m128i RoundKey)
      |                      ^~~~~~~~~~~~~~~~~~~~
In file included from /home/nik/marian-dev/src/3rd_party/simd_utils/simd_utils_constants.h:19,
                 from /home/nik/marian-dev/src/3rd_party/simd_utils/simd_utils.h:27,
                 from /home/nik/marian-dev/src/3rd_party/faiss/VectorTransform.cpp:23:
/home/nik/marian-dev/src/3rd_party/simd_utils/sse2neon_wrapper.h:84:16: error: redefinition of ‘__m128i _mm_aesimc_si128(__m128i)’
   84 | inline __m128i _mm_aesimc_si128(__m128i a)
      |                ^~~~~~~~~~~~~~~~
In file included from /home/nik/marian-dev/src/3rd_party/simd_utils/sse2neon_wrapper.h:11,
                 from /home/nik/marian-dev/src/3rd_party/simd_utils/simd_utils_constants.h:19,
                 from /home/nik/marian-dev/src/3rd_party/simd_utils/simd_utils.h:27,
                 from /home/nik/marian-dev/src/3rd_party/faiss/VectorTransform.cpp:23:
/home/nik/marian-dev/src/3rd_party/simd_utils/sse2neon.h:8998:22: note: ‘__m128i _mm_aesimc_si128(__m128i)’ previously defined here
 8998 | FORCE_INLINE __m128i _mm_aesimc_si128(__m128i a)

However when using 6960362 this problem doesn't appear.
Ideas?

@JishinMaster
Copy link
Owner

The latest commit should fix this (Thanks to @JoachimSchurig). sse2neon now inlcudes aes intrinsics.
I do not see the link between that and the _mm_stream_pd function.
It seems @jerinphilip did not propose this patch to sse2neon directly yet. I have reapplied the fix.

@XapaJIaMnu
Copy link
Author

Do those patches need to be proposed to the sse2neon project explicitly?

@JishinMaster
Copy link
Owner

For the AES ones they are now included in the sse2neon project. The _mm_stream_pd patch could be directly proposed to sse2neon.

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