Skip to content

Make test_rounding to go over all the inputs#1318

Merged
serge-sans-paille merged 1 commit intoxtensor-stack:masterfrom
Andreas-Krebbel:fix_test_round
Apr 24, 2026
Merged

Make test_rounding to go over all the inputs#1318
serge-sans-paille merged 1 commit intoxtensor-stack:masterfrom
Andreas-Krebbel:fix_test_round

Conversation

@Andreas-Krebbel
Copy link
Copy Markdown
Contributor

@Andreas-Krebbel Andreas-Krebbel commented Apr 24, 2026

test_rounding calculates how many batches need to be run to cover all the input values in nb_batches. However, when the loops go over the number of batches, the batch count is increased by the batch size. This is probably not what was intended here.

What currently happens is that e.g. for a 128 bit float vector only the first four values are actually tested, leaving out some of the interesting ones coming later.

I've tested the change on x86 and s390x. Both are still clean.

On Power however, this reveals an oddity with the vec_round builtin on float vectors, where it uses a different rounding mode than for doubles. I'll try to address this with a separate PR.

@Andreas-Krebbel Andreas-Krebbel force-pushed the fix_test_round branch 2 times, most recently from 9780929 to f67da32 Compare April 24, 2026 08:34
@serge-sans-paille serge-sans-paille merged commit 5680ea9 into xtensor-stack:master Apr 24, 2026
76 checks passed
@serge-sans-paille
Copy link
Copy Markdown
Contributor

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants