Repository navigation
Fix the red test on main from the #7578 / #7580 merge interaction - #7590
Merged
Merged
Conversation
#7578 and #7580 landed within a minute of each other and compose correctly in kernels/utils.py, but the source-text assertion #7578 added does not: it looked for the literal "bnb.functional.lib" under the guard, and #7580 renamed that binding to "bnb_functional.lib" to survive a half-imported bitsandbytes. Git merged both cleanly because they touch different lines, so the break only shows at test time. Match "lib.cdequantize_blockwise_fp32" instead. That still pins the binds to the guard, which is what the test is for, and no longer breaks when the module alias changes.
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.
mainis red at7b068090b:tests/python/test_bitsandbytes_kernel_readiness.py::test_the_ctypes_binds_are_gated_on_the_same_verdictfails.My fault, and it is a merge interaction rather than either change being wrong. #7578 and #7580 landed 32 seconds apart and touch neighbouring lines in
unsloth/kernels/utils.py, so git merged them cleanly and the runtime behaviour is correct:What did not compose is the source-text assertion #7578 added. It looked for the literal
bnb.functional.libunder that guard, and #7580 renamed the binding tobnb_functional.libso it survives a half-imported bitsandbytes. Neither PR could see the conflict on its own branch.Anchored on
lib.cdequantize_blockwise_fp32instead. That still pins the ctypes binds to the guard, which is the whole point of the test, and it no longer breaks when the module alias changes.Verification
tests/python/test_bitsandbytes_kernel_readiness.py: 10 passed.tests/pythonon mergedmainunder the CI shape (torch 2.10.0+cpu, bitsandbytes 0.50.0, no GPU): this was the only new failure. The other two red items are pre-existing and unrelated (test_negative_control_no_tokenizers, plus apydanticcollection error in my scratch env).ALLOW_BITSANDBYTES True,get_ptrreal, 109Linear4bitmodules, 10/10 steps, generation clean.Test-only change.