New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for illegal instruction
#13
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also `hamming_distance_sse41_byte_max_dist` and `hamming_distance_loop_byte_max_dist` added as underlying functions. Added 2 tests(for input args checks and calculations check) and 1 benchmark(with result check too). Version changed from 1.4 to 2.1
remove `result` from `test_check_bytes_arrays_within_dist_bench`
…nst uint8_t* a`).
…n `int`(this is a high cost operation for CPU) during distance calculation, and store it only at end.
- Fixes: Illegal instruction on Docker+qemu during usage. - Rollback old SSE4.1 popcount. - Added new function `set_algo` for internal testing and further developing, to see if all algorithms are correct. - +Refactor
moved author/email to right location.
`test_hamming_distance_byte`,`test_check_hexstrings_within_dist`, `test_check_bytes_arrays_within_dist_calculation` to use `set_algo` function to test all algorithms. will need some changes in future to be able to build/pass on arm.
@mrecachinas thats all, maybe a two-three weeks later i will add github actions and building for arm. |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Good time of a day.
I was wrong that we dont need a check for SSE CPU capabilities. I got many bug reports, some people got
Illegal instruction
immediately after install, during import of module and two persons had that problem during run.I Didn't know that time that Proxmox software by default uses kvm64 type of CPU(Pentium 4), and some people uses docker with qemu with custom CPU flags. My bad.
This pull request fixes that situations, i reverted calculation of popcount for bytes to your old code that uses SSE4, removed all
static const
vars of SSE init, added check for SSE support, and added functionset_algo
to change algorithms. That new func we might be used for test of algorithms(i suppose it is only for internal use).Made some small code refactor(mostly moved functions in different order for further development of arm algo version).
I added you name and email to setup.py file, some paranoic people check this fields during manual install.
Bumped version to 2.1.1 cause nothing new was added, only refactoring and bug fixes.
Made full tests that i was able to, on proxmox(qemu) / macos intel 8xxx / linux Intel 10xxx.
Waiting for this fixes appear on pypi =)