GithubHelp home page GithubHelp logo

Comments (26)

lemire avatar lemire commented on June 12, 2024 2

@dagorander Great. We will create a new release soon.

cc @anonrig

from simdutf.

lemire avatar lemire commented on June 12, 2024 1

Patch release upcoming.

from simdutf.

dagorander avatar dagorander commented on June 12, 2024 1

Impressive turnaround time by literally any metric, thank you all for the effort.

(And as a personal note: this report constitutes my first contribution to a FOSS project in general and also first contribution to making OpenBSD better. So extra thanks for that. :) )

from simdutf.

lemire avatar lemire commented on June 12, 2024 1

@easyaspi314 Right. So I have brought back your code:

#243

As I stress in the PR, you get your signature on the commit, for fairness.

from simdutf.

lemire avatar lemire commented on June 12, 2024 1

This has been released.

@dagorander You help was appreciated.

from simdutf.

lemire avatar lemire commented on June 12, 2024 1

@anonrig is pushing an update to node.js.

from simdutf.

clausecker avatar clausecker commented on June 12, 2024

Your CPU does not have AVX512VBMI2 and AVX512BITALG, which are required to run this kernel. Something must be up with our CPU capability detection routines.

This is interesting though; in theory, your CPU should have the required instructions. They don't show up in the dmesg log though.

from simdutf.

clausecker avatar clausecker commented on June 12, 2024

The disassembly is unfortunately fairly useless as your gdb is too old to support AVX-512 instructions.

from simdutf.

dagorander avatar dagorander commented on June 12, 2024

That is my bad, I accidentally used gdb command (old version 6.3 shipped with the system itself) instead of egdb. Proper dissassembly attached below. I have updated my initial report as well, and updated the core trace to the correct version of gdb as well. Apologies for that.

node_core_disassembled.txt

from simdutf.

lemire avatar lemire commented on June 12, 2024

It is a tiger lake processor which supports AVX-512. We have a recent OpenBSD.

I am puzzled.

from simdutf.

clausecker avatar clausecker commented on June 12, 2024

This is quite interesting. The code crashes on the first AVX-512 instruction. Does perhaps OpenBSD not support AVX-512? Or is AVX-512 disabled in the BIOS?

@lemire Do you check if AVX-512 is actually supported by the OS or only if it is present in cpuid? The former can be done by checking with xgetbv if the OS has set up saving/restoring AVX-512 registers on context switch.

from simdutf.

dagorander avatar dagorander commented on June 12, 2024

For completeness, I took a dive into the UEFI on the laptop (it is a Framework), looking to see if there might be some setting somewhere that disables certain instructions. I could not find any such.

The current install began as 7.2 Release, then went to 7.2-current, then 7.3-current. So there shouldn't be much baggage in the install.

from simdutf.

lemire avatar lemire commented on June 12, 2024

Your CPU does not have AVX512VBMI2 and AVX512BITALG

The CPU does have this support.

from simdutf.

clausecker avatar clausecker commented on June 12, 2024

@lemire I wrote that because the extensions don't show up in the dmesg output. Seems like OpenBSD didn't put the relevant bits in their dmesg parser yet.

from simdutf.

lemire avatar lemire commented on June 12, 2024

@dagorander Can you do something for us? Make sure you have a recent cmake as well as a recent C++ compiler.

git clone https://github.com/simdutf/simdutf
cd simdutf
cmake -B build
cmake --build build
ctest   --test-dir build --verbose

What do you see?

from simdutf.

lemire avatar lemire commented on June 12, 2024

@clausecker Is there any way to run OpenBSD on AWS?

Or to launch OpenBDS inside a Linux server?

from simdutf.

dagorander avatar dagorander commented on June 12, 2024

@lemire It looks like the system uses clang v13, so that's from '21. If that's not recent enough for this exercise, that might be an interesting data point itself, perhaps?

As a side note as well, I have sent a notice to the maintainer of the OpenBSD node package, just in case they might have input or relevant domain knowledge.

The steps you indicate result in this:


0% tests passed, 52 tests failed out of 52

Total Test time (real) =   0.47 sec

The following tests FAILED:
	  1 - amalgamation_demo (ILLEGAL)
	  2 - random_fuzzer (ILLEGAL)
	  3 - special_tests (ILLEGAL)
	  4 - validate_ascii_basic_tests (ILLEGAL)
	  5 - validate_ascii_with_errors_tests (ILLEGAL)
	  6 - bele_tests (ILLEGAL)
	  7 - validate_utf8_basic_tests (ILLEGAL)
	  8 - select_implementation (ILLEGAL)
	  9 - validate_utf8_brute_force_tests (ILLEGAL)
	 10 - validate_utf8_puzzler_tests (ILLEGAL)
	 11 - validate_utf8_with_errors_tests (ILLEGAL)
	 12 - validate_utf16le_basic_tests (ILLEGAL)
	 13 - validate_utf16be_basic_tests (ILLEGAL)
	 14 - validate_utf16le_with_errors_tests (ILLEGAL)
	 15 - validate_utf16be_with_errors_tests (ILLEGAL)
	 16 - validate_utf32_basic_tests (ILLEGAL)
	 17 - validate_utf32_with_errors_tests (ILLEGAL)
	 18 - convert_valid_utf8_to_utf16le_tests (ILLEGAL)
	 19 - convert_valid_utf8_to_utf16be_tests (ILLEGAL)
	 20 - convert_valid_utf8_to_utf32_tests (ILLEGAL)
	 21 - convert_utf8_to_utf16le_tests (ILLEGAL)
	 22 - convert_utf8_to_utf16be_tests (ILLEGAL)
	 23 - convert_utf8_to_utf16le_with_errors_tests (ILLEGAL)
	 24 - convert_utf8_to_utf16be_with_errors_tests (ILLEGAL)
	 25 - convert_utf8_to_utf32_tests (ILLEGAL)
	 26 - convert_utf8_to_utf32_with_errors_tests (ILLEGAL)
	 27 - convert_utf16le_to_utf8_tests (ILLEGAL)
	 28 - convert_utf16be_to_utf8_tests (ILLEGAL)
	 29 - convert_utf16le_to_utf8_with_errors_tests (ILLEGAL)
	 30 - convert_utf16be_to_utf8_with_errors_tests (ILLEGAL)
	 31 - convert_utf32_to_utf8_tests (ILLEGAL)
	 32 - convert_utf32_to_utf8_with_errors_tests (ILLEGAL)
	 33 - convert_utf32_to_utf16le_tests (ILLEGAL)
	 34 - convert_utf32_to_utf16be_tests (ILLEGAL)
	 35 - convert_utf32_to_utf16le_with_errors_tests (ILLEGAL)
	 36 - convert_utf32_to_utf16be_with_errors_tests (ILLEGAL)
	 37 - convert_valid_utf16le_to_utf8_tests (ILLEGAL)
	 38 - convert_valid_utf16be_to_utf8_tests (ILLEGAL)
	 39 - convert_valid_utf32_to_utf8_tests (ILLEGAL)
	 40 - convert_valid_utf32_to_utf16le_tests (ILLEGAL)
	 41 - convert_valid_utf32_to_utf16be_tests (ILLEGAL)
	 42 - convert_utf16le_to_utf32_tests (ILLEGAL)
	 43 - convert_utf16be_to_utf32_tests (ILLEGAL)
	 44 - convert_utf16le_to_utf32_with_errors_tests (ILLEGAL)
	 45 - convert_utf16be_to_utf32_with_errors_tests (ILLEGAL)
	 46 - convert_valid_utf16le_to_utf32_tests (ILLEGAL)
	 47 - convert_valid_utf16be_to_utf32_tests (ILLEGAL)
	 48 - count_utf8 (ILLEGAL)
	 49 - count_utf16le (ILLEGAL)
	 50 - count_utf16be (ILLEGAL)
	 51 - detect_encodings_tests (ILLEGAL)
	 52 - basic_fuzzer (ILLEGAL)
Errors while running CTest
Output from these tests are in: /home/daniel/Temp/simdutf/build/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.

from simdutf.

lemire avatar lemire commented on June 12, 2024

No. I don't think that it is case where your software is too old.

from simdutf.

clausecker avatar clausecker commented on June 12, 2024

@lemire I don't know, I don't use AWS much. It does install just fine in standard VM software; perhaps you can just run it in a Linux box under KVM. There's also this:

https://chrispinnock.com/2021/05/18/openbsd-on-aws/

I think the problem is that OpenBSD doesn't have AVX-512 support and we don't check for this.

from simdutf.

clausecker avatar clausecker commented on June 12, 2024

See this answer for how to detect if the OS supports AVX-512: https://stackoverflow.com/a/72523150/417501

from simdutf.

lemire avatar lemire commented on June 12, 2024

@dagorander Can you do one more for me...

git clone https://github.com/easyaspi314/simdutf
cd altsimdutf
git checkout allow_nehalem
cmake -B build
cmake --build build
ctest   --test-dir build --verbose

from simdutf.

lemire avatar lemire commented on June 12, 2024

@clausecker We have a PR from @easyaspi314 that did additional checks. It broke simdutf for some users, but it might contain the necessary fix. If so, I could bring it back minus the components that caused problems.

That's why I am asking @dagorander to run it.

from simdutf.

dagorander avatar dagorander commented on June 12, 2024

@lemire I think I only need the last bit of this run. :)

100% tests passed, 0 tests failed out of 52

Total Test time (real) = 148.59 sec

Indeed, it does seem that the PR from @easyaspi314 contains a fix for this issue.

from simdutf.

clausecker avatar clausecker commented on June 12, 2024

Here's confirmation that OpenBSD does not support AVX-512: http://cvsweb.openbsd.org/src/sys/arch/amd64/amd64/mds.S?rev=1.4&content-type=text/x-cvsweb-markup

/* we don't support AVX512 yet */

from simdutf.

anonrig avatar anonrig commented on June 12, 2024

@dagorander Great. We will create a new release soon.

cc @anonrig

Upon new version, I'll update Node.js as well.

from simdutf.

easyaspi314 avatar easyaspi314 commented on June 12, 2024

If the only issue is macOS, then removing all the #ifdef __APPLE__ should fix things. However because of how I properly check for AVX-512, macOS will default to AVX2.

However, that will be 10000 times better than netbsd crashing.

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.