Halide icon indicating copy to clipboard operation
Halide copied to clipboard

We should make a cleanly-vectorizing fast-approximation for atan2f.

Open mcourteaux opened this issue 1 year ago • 4 comments

This article seems amazing reference:

https://mazzo.li/posts/vectorized-atan2.html

You may assign me, I think I'll do it. I think I'm seeing bad performance due to 8 calls to glibc's atan2f, instead of something that vectorizes cleanly.

mcourteaux avatar May 29 '24 12:05 mcourteaux

Or this one, indeed: https://github.com/boulos/syrah/blob/4ac08d54daa09fc4e7ac8424898d21deda18e103/src/include/syrah/FixedVectorMath.h#L288-L348

mcourteaux avatar May 29 '24 12:05 mcourteaux

Tagging zvookin because he's looked into doing this for some other similar cases (eg tanh)

steven-johnson avatar May 29 '24 15:05 steven-johnson

Tagging @mcourteaux because nothing has happened -- assign to me instead if you don't have bandwidth

steven-johnson avatar Jul 30 '24 17:07 steven-johnson

Assigning me is great! I just wanted to turn this idea into an issue, and have me assigned. It's still on my backlog. Will definitely get to this, but it's low priority right now. Somewhere in the coming month or two ideally.

PS: I cannot assign anyone. I don't have those permissions, it seems. 😢

mcourteaux avatar Jul 30 '24 18:07 mcourteaux