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

CodeQL seems to produce many warnings when compiling source that includes AVX-512 extensions #16999

Open
flowerhack opened this issue Jul 16, 2024 · 1 comment
Labels
question Further information is requested

Comments

@flowerhack
Copy link

Hi there,

I'm filing this all as one bug in case they share a root cause, because it seems somewhat likely to me they all share the same root cause. Please let me know if that's not the case and I can parse these out into separate bug reports.

But: when compiling Chromium, we see a lot of warnings (on the order of ~190,000) related to the inclusion of the following Clang headers:

  • avx512vlbf16intrin.h
  • avx512vlfp16intrin.h
  • avx512fintrin.h

Some sample warnings include:

Warning[extractor-c++]: In construct_text_message: "/b/s/w/ir/x/w/src/third_party/llvm-build/Release+Asserts/lib/clang/19/include/avx512vlbf16intrin.h", line 41: error: invalid type conversion
    return (__m128bh)__builtin_ia32_cvtne2ps2bf16_128((__v4sf) __A,
           ^

and

Warning[extractor-c++]: In construct_text_message: "/b/s/w/ir/x/w/src/third_party/llvm-build/Release+Asserts/lib/clang/19/include/avx512vlbf16intrin.h", line 65: error: argument of type "__v8bf" is incompatible with parameter of type "__attribute((vector_size(32))) __bf16"
                                               (__v8bf)_mm_cvtne2ps_pbh(__A, __B),
                                               ^

and

Warning[extractor-c++]: In construct_text_message: "/b/s/w/ir/x/w/src/third_party/llvm-build/Release+Asserts/lib/clang/19/include/avx512vlfp16intrin.h", line 967: error: invalid type conversion
    return (__m128i)__builtin_ia32_vcvtph2udq128_mask(
           ^

and

Warning[extractor-c++]: In construct_text_message: "/b/s/w/ir/x/w/src/third_party/llvm-build/Release+Asserts/lib/clang/19/include/avx512fintrin.h", line 484: error: identifier "__builtin_nondeterministic_value" is undefined
    __m256i __B = __builtin_nondeterministic_value(__B);
                  ^

I'm wondering if this is already a known issue / something on the roadmap to support (perhaps SIMD-related code requires extra support)? If not, would it be helpful for me to provide a reproducer for one of these instances (as a representative sample), or do you think these in fact represent many different classes of issue and you'd like more of a breakdown than that?

Thanks very much!

@flowerhack flowerhack added the question Further information is requested label Jul 16, 2024
@jketema
Copy link
Contributor

jketema commented Jul 16, 2024

Hi @flowerhack ,

The first three are definitely related, and seem related to float 16 support, which we should support, but the support might not be good enough for AVX512 (float 16 support is relatively new). The last one is different. We should support __builtin_nondeterministic_value, but it somehow not picked up here. A preprocessed file demonstrating these issues would help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants