Git Product home page Git Product logo

Comments (5)

ermig1979 avatar ermig1979 commented on June 16, 2024

Hi! The cross platform building of Simd Library for ARM is performed after each commit (see .github/workflows/cmake.yml). And there are no error for last month during this action. I tried to build Simd on ARM manually and it was fine. So I need more info to help you.

P.S. As to reducing of size of Simd Library binaries, I would check SIMD_SYNET cmake parameter. If it is off, the size of library can reduce in several times.

from simd.

robinvanemden avatar robinvanemden commented on June 16, 2024

Hi! Thank you for your fast response.

The building process for all architectures we support (ARMv7, AARCH64, X64) works seamlessly. However, issues arise only when I use the library to compile the final static binary. Specifically, the ARMv7 compilation using the compiled library fails, displaying an error: undefined reference to Simd::Neon::GetEnable(). It's important to note that SIMD_SYNET remains enabled, as it was before.

We actually did not change anything in our compilation scripts, we just updated SIMD source code from 5.2 to 5.4.

The issue is exclusive to ARMv7; AARCH64 and X64 architectures operate without any problems. Considering this, I wonder if you might have any insights into why ARMv7 SIMD versions 5.2 and 5.4 exhibit different behaviors, particularly regarding the 'undefined reference to Simd::Neon::GetEnable()' error that is being thrown.

I will see if there is some way to circumvent the issue on our side, and keep you posted!

from simd.

robinvanemden avatar robinvanemden commented on June 16, 2024

This issue originated from commit af571ee, which introduced a new condition in the test for Clang:

if( NOT (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_CXX_COMPILER MATCHES "clang"))
  set(CXX_NEON_FLAG "-mfpu=neon -mfpu=neon-fp16")
endif()

This condition incorrectly evaluates to false for any standard GNU compiler, leading to an improper setting of CXX_NEON_FLAG. It appears the intention was to exclude setting CXX_NEON_FLAG when both CMAKE_CXX_COMPILER_ID indicates Clang and CMAKE_CXX_COMPILER matches 'clang'. If so, the following would be correct:

if(NOT (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER MATCHES "clang"))
  # Set NEON flags only if the above condition is true
  set(CXX_NEON_FLAG "-mfpu=neon -mfpu=neon-fp16")
endif()

Alternatively, just using the original line without condition

set(CXX_NEON_FLAG "-mfpu=neon -mfpu=neon-fp16")

could also be a feasible solution. This approach is simpler and might be safer, assuming that potential warnings for Clang type compilers are acceptable and can be ignored.

I can of course create an MR for either option if that would be useful.

from simd.

ermig1979 avatar ermig1979 commented on June 16, 2024

Thank you for so detail bug report. I was able to reproduce the issue. The bug was fixed in last commit. It would be great if you perform independent checking.

from simd.

robinvanemden avatar robinvanemden commented on June 16, 2024

We tested extensively, and this has resolved our issue. Thanks again!

from simd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.