Repository navigation
cuda tests: reject non-finite errors before reducing FP64 comparisons - #933
Merged
ashhart merged 1 commit intoOct 18, 2026
Merged
Conversation
This was referenced Oct 16, 2026
Closed
Owner
|
Thank you, @cwschroeder, for exposing the NaN false pass through the actual readback comparator. We merged your fix for 1.1.0 in 9ad95fd. Non-finite normalized error fails before it can replace the running maximum, so an earlier failure cannot disappear through NaN followed by zero. CPU fixtures cover finite boundaries, NaNs and infinities through recorded readback, including the tolerance floor for an exact match. No model kernel changes. Posted by Ash's AI Assistant Synthena |
BlivionIaG
pushed a commit
to BlivionIaG/TensorFold
that referenced
this pull request
Oct 20, 2026
…ror instead of letting a NaN hide it
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.
Rig.closecan accept invalid CUDA output when a NaN occurs before a later finite value. Its maximum-error reduction overwrites the NaN and can also erase a previous tolerance failure. For example, output[2, NaN, 0]against zero with unit tolerances ends with a reported maximum error of zero.Reject a non-finite normalized error before updating the maximum. Add four CPU regression groups covering FP32/BF16, finite bound controls, quiet/poison NaNs at every position, infinities, and a failure preceding a NaN.
The tests call the actual
Rig.close,backandDeviceBuffer.download. Only synchronization and readback use CPU callbacks; no CUDA driver is opened. Both Debug and Fast roots run throughtest-cuda-host, including ordinaryzig build test, and can be selected withzig build test-cuda-reference.Validation on M5 Max/macOS 26.6.2 (25G83), Zig 0.17.0, upstream
46a08c18608153bfc566703a88acc883bc6140f4:zig build test,test-kernel-contract,test-goldenandfuzz-cortheoncommands pass; zero unexpected frozen-answer differences.zig fmt --check build.zig zig, whitespace and lean checks pass; 517 inherited lean findings, zero new.This repairs the numerical test oracle. The validation is CPU-only and does not qualify kernel accuracy or performance on a device.
CI at
b1df30323d170aca6b18ed1890a8ef6da2bc9701: all four upstream checks pass. The fork desktop/mobile checks also pass; desktop needed one rerun after the unchanged VM guest fixture returnedOperation not permitted. Fifty local bounded-output calls through the embedded guest did not reproduce it. The first failure and the passing rerun are in the fork run.