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

Does Polygeist Support AVX Instructions? #362

Open
jingyao-zhang opened this issue Sep 18, 2023 · 0 comments
Open

Does Polygeist Support AVX Instructions? #362

jingyao-zhang opened this issue Sep 18, 2023 · 0 comments

Comments

@jingyao-zhang
Copy link

Hello,

I am working on some performance-sensitive projects that make heavy use of AVX instructions. I've been exploring using Polygeist for code optimization and wanted to know how well it supports AVX.

While trying to compile some code that includes AVX instructions with cgeist, I encountered some errors related to unrecognized built-ins such as __builtin_ia32_addss. This led me to wonder about the level of support for AVX in Polygeist.

Here is a brief snippet that reproduces the issue:

#include <immintrin.h>

void example_function() {
    __m256i a;
    ......
}

The command I used to compile is:

cgeist -O0 example_code.c -I/usr/lib/gcc/x86_64-linux-gnu/9/include --function=example_function -S -o output.mlir

The error message was:

In file included from example_code.c:1:
/usr/lib/gcc/x86_64-linux-gnu/9/include/immintrin.h:29:
/usr/lib/gcc/x86_64-linux-gnu/9/include/xmmintrin.h:130:19: error: use of unknown builtin '__builtin_ia32_addss' [-Wimplicit-function-declaration]
  return (__m128) __builtin_ia32_addss ((__v4sf)__A, (__v4sf)__B);

Could you please confirm whether Polygeist currently supports AVX instructions? If not, are there any plans to add this support in future releases?

Thank you for your time and assistance.

Best regards

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

No branches or pull requests

1 participant