Giter Site home page Giter Site logo

Architecture Detection about simdutf HOT 4 CLOSED

bkmgit avatar bkmgit commented on June 19, 2024
Architecture Detection

from simdutf.

Comments (4)

lemire avatar lemire commented on June 19, 2024

Consider querying the available CPU instructions that are available and then choosing the appropriate SIMD instruction set to use.

What makes you think that we do not do this already?

I am closing this issue.

If the reporter thinks that there is an issue with the library, I invite them to thoroughly document it, starting with an analysis of our source code.

from simdutf.

bkmgit avatar bkmgit commented on June 19, 2024

Thanks for the code and for responding to issues. It takes some time to fully understand source of the error. Ran the regression tests on Celeron processor, and they fail since all architectures are built for x86 and then unless an architecture is specified, all available architectures that have been built are run by https://github.com/simdutf/simdutf/blob/master/tests/helpers/test.cpp

The header only example https://github.com/simdutf/simdutf/blob/master/singleheader/amalgamation_demo.cpp works as it does automatic detection of the architecture and uses the best available one, as would occur in normal use. Can contribute a modification to the testing harness to only run supported instruction sets.

from simdutf.

bkmgit avatar bkmgit commented on June 19, 2024

To get failing tests, on a Celeron processor without AVX2, try:

git clone https://github.com/simdutf/simdutf
cd simdutf
mkdir build
cd build
cmake ..
make
ctest .

Please let me know if further documentation would be helpful.

When doing automated testing of libraries, the architecture may not be known in advance, so it would be helpful if the testing harness can check this, though if that further complicates maintenance, it is also possible to build a further external test harness that will check available architectures.

from simdutf.

lemire avatar lemire commented on June 19, 2024

The code does not actually test whether the processor is haswell, it tests whether it supports the needed features.
It has been extensively tested across a wide range of architectures. We do not invite pull requests if you find a bug in how we handle processor feature detection.

from simdutf.

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.