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

Enable emission of float16/32 casts on x86 #7837

Merged
merged 5 commits into from
Sep 6, 2023
Merged

Conversation

abadams
Copy link
Member

@abadams abadams commented Sep 5, 2023

Fixes #7836
Fixes #4166

These weren't enabled yet because the last time this code was touched, float16 wasn't a legal type in llvm on x86 (See https://bugs.llvm.org/show_bug.cgi?id=43065)

@@ -638,14 +644,17 @@ int main(int argc, char **argv) {
{
Target("x86-32-linux"),
Target("x86-32-linux-sse41"),
Target("x86-64-linux-sse41-avx"),
Target("x86-64-linux-sse41-avx-avx2"),
// Always turn on f16c when using avx. Haswell had avx without f16c,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, Haswell had F16C (together with newly-added AVX2+FMA). Even IvyBridge supported F16C (without AVX2 or FMA). Only SandyBridge was pure AVX.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I had haswell and ivy bridge in the wrong order in my head. I'll fix the comment.

@abadams
Copy link
Member Author

abadams commented Sep 6, 2023

Failures unrelated.

@abadams abadams merged commit 836879e into main Sep 6, 2023
ardier pushed a commit to ardier/Halide-mutation that referenced this pull request Mar 3, 2024
* Enable emission of float16/32 casts on x86

Fixes halide#7836
Fixes halide#4166

* Fix comment

* Don't catch bfloat casts

* Fix missing word in comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants