Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

[SYCL] Fix scan tests for multiplication #404

Merged
merged 3 commits into from
Aug 20, 2021

Conversation

Michoumichmich
Copy link

@Michoumichmich Michoumichmich commented Aug 15, 2021

The testing vector starts with a 0 which means that testing inclusive and exclusive scans with sycl::multiplies will always return a vector of zeros . This is why the bug intel/llvm#4337 went unnoticed (as it used 0 for multiplication identity which made the scan always return a vector of 0).

This commit adds a testing over a small vector of size 12 which starts at 1. Computing the inclusive scan with sycl::multiplies should give a vector of factorials and not overflow the int.

Signed-off-by: Michel Migdal [email protected]

@Michoumichmich
Copy link
Author

Maybe we should consider starting all test vectors at 2 which would avoid conflicts with identities. As an example, right now if an implementation uses 0 as the identity for sycl::minimum, the error will never be caught. It would also have prevented the multiplies bug.

@vladimirlaz vladimirlaz merged commit 1101f64 into intel:intel Aug 20, 2021
@Michoumichmich Michoumichmich deleted the fix_scan_functions_tests branch August 20, 2021 10:07
aelovikov-intel pushed a commit to aelovikov-intel/llvm that referenced this pull request Mar 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants