Fix ex_bits=0 slot in excode IP dispatch table - #71
Merged
gouyt13 merged 2 commits intoAug 26, 2026
Conversation
This file contains hidden or 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
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.
resolve_excode_ip_table()fills index 0 (zero extra bits) with a duplicateof
ip16_fxu1_avx{512,2}, the 1-bit kernel, instead of a function thatcontributes zero to the inner product. Since
select_excode_ipfunc(ex_bits)indexes this table directly by
ex_bits, any code path with zero extra bitsends up calling the 1-bit kernel on nonexistent extra-code data, corrupting
the inner product.
This adds a small
ip_fxu0stub that always returns0.0Fand puts it atindex 0 for both the AVX-512 and AVX2 tables, and adds a regression test
(
Select_IP_Func.zero_ex_bits_contributes_nothing) that fails on the oldcode and passes with the fix.
Tested: full CMake build +
ctestsuite (32/32 passing), formatting cleanagainst
.clang-format.