Giter Site home page Giter Site logo

Unexpected error for huge data about zstd HOT 7 CLOSED

facebook avatar facebook commented on May 4, 2024
Unexpected error for huge data

from zstd.

Comments (7)

Cyan4973 avatar Cyan4973 commented on May 4, 2024

Thanks Takayuki

I suspect that, in my hastiness to release zStd, I forgot to re-enable a match offset limit, which is useless in most circumstances, but should prove useful in such a case.

I'll look into it.

from zstd.

Cyan4973 avatar Cyan4973 commented on May 4, 2024

There's a new version available in the "dev" branch which is supposed to fix this issue.
I can't test it directly, since my system would not allow me to allocated that much memory.
Would you mind having a look ?

Regards

from zstd.

t-mat avatar t-mat commented on May 4, 2024

Confirmed. New logic works fine both Ubuntu and Windows.

But new code has another problem.

Using defined(_INCLUDED_IMM) for AVX2 detection is really problematic. It detects just a existence of the header. But it does not indicate compiler's code generation capability and target architecture. For example, currently we can't genarete generic x86-64 binary for non-AVX2 environment.

Please remove defined(_INCLUDED_IMM) from AVX2 detection.

from zstd.

Cyan4973 avatar Cyan4973 commented on May 4, 2024

OK.
Is __AVX2__ macro detection enough for this, on both Unix & Windows ?

from zstd.

t-mat avatar t-mat commented on May 4, 2024

Yes. Recent gcc, clang, icc and MSVC has predefined __AVX2__ macro for AVX2 target.

$ gcc -march=core-avx-i -dM -E -x c /dev/null | grep "AVX"
#define __AVX__ 1

$ gcc -march=core-avx2 -dM -E -x c /dev/null | grep "AVX"
#define __AVX__ 1
#define __AVX2__ 1

$ clang -march=core-avx-i -dM -E -x c /dev/null | grep "AVX"
#define __AVX__ 1

$ clang -march=core-avx2 -dM -E -x c /dev/null | grep "AVX"
#define __AVX2__ 1
#define __AVX__ 1

I'm not sure we should support older compiler or not, but optional configure macro (eg. ZSTD_ENABLE_AVX2) would be nice for some people.

from zstd.

Cyan4973 avatar Cyan4973 commented on May 4, 2024

Excellent suggestion. Thanks Takayuki.

from zstd.

Cyan4973 avatar Cyan4973 commented on May 4, 2024

I've changed AVX2 detection macro to __AVX2__
The idea of providing a manual switch to turn on/turn off AVX2 is a good one, and will probably be achieved in a later revision.

from zstd.

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.