Repository navigation
testdata: compare activation_functions.txt with the same machine's scalar build - #17
Merged
Merged
Conversation
…alar build activation_functions.txt hashes float bits and compares both builds with testmain/output, which was recorded on amd64. It passes on arm64 only because its loops pass the input NaN through and never create one: with an alpha of 0, LeakyReLU computes 0 times -Inf, whose NaN has the sign bit set on amd64 and clear on arm64, and the script then fails on arm64 against the recording. It now compares the recording only on amd64 and the simd build with the scalar build of the same machine, as #8 did for three other scripts. Those three scripts also compared the simd build with the recording on amd64. That adds nothing, since the scalar build matches the recording there and the simd build matches the scalar build, and as the last comparison it is the one -update recorded, so a simd build that differed from the scalar one would have been written into the recording. Only the scalar build is compared with the recording now. Their comments also named the square root of a negative number in two scripts that have no square root.
mauri870
enabled auto-merge (squash)
November 3, 2026 22:37
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.
activation_functions.txthashes float bits and compares both builds withtestmain/output, which was recorded on amd64. It passes on arm64 only because none of its loops creates a NaN: they just pass the input NaN through. With an alpha of 0,LeakyReLUcomputes0 * -Inf. The resulting NaN has the sign bit set on amd64 and clear on arm64, so the script fails on arm64 against the recording. This change gives it #8's treatment: the recording is compared only on amd64, and on every target the simd build is compared with the scalar build of the same machine.It also changes the three scripts from #8:
-updaterecorded. A simd build that differed from the scalar one would have been written into the recording. Now only the scalar build is compared with the recording, and that's what-updaterecords.Tested locally:
activation_functions.txtwith alpha set to 0, recorded the expected output on amd64, and ran both on arm64 under qemu. The old script fails atcmp stdout testmain/output, and the new one passes.-updateleaves them unchanged.