Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type-assert vconverts to circumvent inference restriction on recursion #109

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

GianlucaFuwa
Copy link
Contributor

Fixes JuliaSIMD/LoopVectorization.jl#526, building upon @chriselrod's last commits a month or two ago, by type-asserting the return types of vconvert in the relevant cases.

Digging around with Cthuhlu's @descend I found that the issue, at least when I tested on 1.10.2, originates from the recursive calling of _vconvert in promote which caused the compiler to give up on inference (I assume this became more restrictive in 1.10).
Not sure if this solution is "legal" in the sense that vconvert always returns the type I annotated.

If this is fine, I would also add tests in LV's "test/" directory.

@chriselrod chriselrod merged commit 6ff2f24 into JuliaSIMD:master Apr 15, 2024
2 of 20 checks passed
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.

type inference issue with vectors if ints and floats in julia 1.10
2 participants