Git Product home page Git Product logo

Comments (5)

mrgreywater avatar mrgreywater commented on June 23, 2024

Seems like the allowed deviation need to be loosened a little for the failing fixtures to accommodate your architecture and compiler configuration. Functionally I wouldn't worry about it though.

from earcut.hpp.

musicinmybrain avatar musicinmybrain commented on June 23, 2024

I agree, and I’m planning to patch in a looser bound downstream as I package this library for Fedora Linux.

If it matters, the compiler is gcc 11.2.1, and there are no particularly exotic compiler flags in use.

Is there any interest in special-casing this test to accommodate these architectures upstream? If not, it’s probably best to close this issue.

Thanks for your feedback.

from earcut.hpp.

mrgreywater avatar mrgreywater commented on June 23, 2024

I'm not averse to merging changes to support the library/tests on more platforms. That being said, unless we create travis-ci instances testing the builds on these architectures, there is no guarantee there won't be changes in the future breaking it for those arch's again.

from earcut.hpp.

marcoffee avatar marcoffee commented on June 23, 2024

I had a similar problem in aarch64 which was solved by passing the flag -ffp-contract=off to the compiler.
Such flag disables MADD / MSUB instructions, which, as I found out, behave differently on aarch64 architectures when compared to x86.
Here is the topic that led me to do this: https://bugs.mysql.com/bug.php?id=82760

from earcut.hpp.

musicinmybrain avatar musicinmybrain commented on June 23, 2024

I had a similar problem in aarch64 which was solved by passing the flag -ffp-contract=off to the compiler. Such flag disables MADD / MSUB instructions, which, as I found out, behave differently on aarch64 architectures when compared to x86. Here is the topic that led me to do this: https://bugs.mysql.com/bug.php?id=82760

Thanks. This is a good suggestion. I can confirm that it fixes this test on all three architectures without needing to loosen the tolerance.

Whether it is actually necessary or appropriate to disable floating-point contraction, or whether perhaps the tolerance is simply tighter than it needs to be, seems still to be an open question. For now, I’m going to leave the compiler flags as they are in Fedora, and keep loosening the tolerance.

from earcut.hpp.

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.