Comments (26)
@dagorander Great. We will create a new release soon.
cc @anonrig
from simdutf.
Patch release upcoming.
from simdutf.
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.
@easyaspi314 Right. So I have brought back your code:
As I stress in the PR, you get your signature on the commit, for fairness.
from simdutf.
This has been released.
@dagorander You help was appreciated.
from simdutf.
@anonrig is pushing an update to node.js.
from simdutf.
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.
The disassembly is unfortunately fairly useless as your gdb is too old to support AVX-512 instructions.
from simdutf.
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.
from simdutf.
It is a tiger lake processor which supports AVX-512. We have a recent OpenBSD.
I am puzzled.
from simdutf.
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.
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.
Your CPU does not have AVX512VBMI2 and AVX512BITALG
The CPU does have this support.
from simdutf.
@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.
@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.
@clausecker Is there any way to run OpenBSD on AWS?
Or to launch OpenBDS inside a Linux server?
from simdutf.
@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.
No. I don't think that it is case where your software is too old.
from simdutf.
@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.
See this answer for how to detect if the OS supports AVX-512: https://stackoverflow.com/a/72523150/417501
from simdutf.
@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.
@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.
@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.
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.
@dagorander Great. We will create a new release soon.
cc @anonrig
Upon new version, I'll update Node.js as well.
from simdutf.
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)
- Add SVE support HOT 3
- Feature request: UTF8 Byte Length HOT 6
- Split out `simdutf::validate_utf8()` HOT 3
- Add support for Big Endian systems HOT 3
- Add support for WebAssembly SIMD128 HOT 2
- For short strings `convert_utf8_to_utf16le_with_errors` may sometimes cause buffer overflows by reading before the buffer when the input is not UTF-8 HOT 8
- Add Windows on ARM support HOT 3
- v3.2.1 build failure on arm64 macOS HOT 2
- Single-header version requires two files to be included HOT 7
- Compiling with clang on windows fails HOT 1
- Detect best implementation at compile time HOT 2
- `convert_valid_utf16_to_utf8` produces incorrect result HOT 1
- Excessive check for CLMUL on "Westmere" path HOT 8
- Implement latin 1 to UTF-8 "length" functions
- Compiler warning (level 2) C4146 with VS 2022 latest version HOT 3
- Build failure on CPU without popcnt HOT 8
- crash when converting during the initialization of a static object. HOT 3
- Dual license clarification HOT 1
- Any plan to add string iterator? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simdutf.