weld icon indicating copy to clipboard operation
weld copied to clipboard

No vectorization for simple loop with type cast in the body

Open mihai-varga opened this issue 7 years ago • 1 comments

The following loop is not vectorized: |x:vec[i64]| result(for(x, appender[i64], |b, i, n| merge(b, n * i64(2)))) not even with the "vectorize" annotation |x:vec[i64]| result(@(vectorize:true)for(x, appender[i64], |b, i, n| merge(b, n * i64(2)))) and not even if the cast is redundant |x:vec[i64]| result(@(vectorize:true)for(x, appender[i64], |b, i, n| merge(b, n * i64(2L))))

mihai-varga avatar May 10 '18 13:05 mihai-varga

Try removing the i64 cast in the last case (so it’s just n * 2L), the issue is probably that we don’t support casting in the vectorizer at the moment.

On Thu, May 10, 2018 at 6:34 AM Mihai Varga [email protected] wrote:

The following loop is not vectorized: |x:vec[i64]| result(for(x, appender[i64], |b, i, n| merge(b, n * i64(2)))) not even with the "vectorize" annotation |x:vec[i64]| result(@(vectorize:true)for(x, appender[i64], |b, i, n| merge(b, n * i64(2)))) and not even if the cast is redundant |x:vec[i64]| result(@(vectorize:true)for(x, appender[i64], |b, i, n| merge(b, n * i64(2L))))

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/weld-project/weld/issues/352, or mute the thread https://github.com/notifications/unsubscribe-auth/ABTCY8GvWtjrKVM8_fYJtgDzgltS0DXiks5txEHvgaJpZM4T55rq .

-- Shoumik

sppalkia avatar May 10 '18 16:05 sppalkia