Code Monkey home page Code Monkey logo

Comments (6)

jan-wassenberg avatar jan-wassenberg commented on July 16, 2024

Hi @Jamaika1, thanks for reporting this. It seems to be specific to JPEG XL, we are looking into this but do not yet understand the cause.

Do you specify any compiler flags such as -mavx2?

from highway.

Jamaika1 avatar Jamaika1 commented on July 16, 2024

Our codecs are on the doom9 forum. I also added open source.
In version highway 2f14bd0 AVX2 compiled.
I used the command:

g++.exe -std=gnu++11 -ftree-vectorize -g0 -O3 -fPIC -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4a -msse4.1 -msse4.2 -mavx -mavx2 -DWINVER=0x0602 -D_WIN32_WINNT=0x0602 -DJXL_DEBUG_WARNING=1 -DJXL_CRASH_ON_ERROR=1 -DJXL_DEBUG_ON_ALL_ERROR=1 -DJPEGXL_ENABLE_SKCMS=1 -DCMS_IS_WINDOWS_ -DCMS_RELY_ON_WINDOWS_STATIC_MUTEX_INIT -D__LITTLE_ENDIAN__ -DPNG_DEBUG=0 -DBITS_IN_JSAMPLE=8 -DINLINE="inline __attribute__((always_inline))" -DLOCAL(type)="static type" -DJPEGXL_MAJOR_VERSION=0 -DJPEGXL_MINOR_VERSION=3 -DJPEGXL_PATCH_VERSION=7 -DJPEGXL_ENABLE_JPEG=1 -DJPEGXL_ENABLE_GIF=1 -DJPEGXL_ENABLE_APNG=1 -DJPEGXL_ENABLE_EXR=1 -DJPEGXL_ENABLE_SJPEG=1 -DHWY_COMPILE_ONLY_STATIC -DJPEGXL_VERSION=\"0.3.7-30ea86ab\" -DHWY_STATIC_TARGET=HWY_AVX2 -DZLIB_WINAPI -DUSE_WINDOWS_MESSAGEBOX -DALIGN_SIZE=32 -c dec_xyb.cc -o dec_xyb.o

from highway.

Jamaika1 avatar Jamaika1 commented on July 16, 2024

Sorry for the confusion. I downloaded latest GCC 12.0.0 on 5/19/2021 and the problem disappeared.

from highway.

jan-wassenberg avatar jan-wassenberg commented on July 16, 2024

@Jamaika1 thanks for sharing the command. Good to know the current GCC fixes this, but I'd still recommend removing the flags -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4a -msse4.1 -msse4.2 -mavx -mavx2. These are dangerous (can lead to such errors) and not necessary - Highway is able to generate x86 vector code even without them.

from highway.

Jamaika1 avatar Jamaika1 commented on July 16, 2024

Again. For AVX2 not need mavx2

Edit:
I have another question. Should I use mavx2 when jpegxl is in addition to metric butteraugli? The whole codec of liheif, libavif, libweb2 has mavx2 so jpegxl static without mavx2 in gcc doesn't work.

from highway.

jan-wassenberg avatar jan-wassenberg commented on July 16, 2024

@Jamaika1

so jpegxl static without mavx2 in gcc doesn't work.

That's surprising. If you remove -DHWY_STATIC_TARGET and -DHWY_COMPILE_ONLY_STATIC and -mavx2, we should still be able to use AVX2: see targets.h:253:

#if HWY_ARCH_X86
#define HWY_ATTAINABLE_TARGETS \
  HWY_ENABLED(HWY_SCALAR | HWY_SSE4 | HWY_AVX2 | HWY_AVX3)

Should I use mavx2 when jpegxl is in addition to metric butteraugli?

If we are talking about the Butteraugli from the JPEG XL repository, that one also does not need -mavx2, it uses the same Highway SIMD as JPEG XL.

from highway.

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.