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

Internal compiler error #22

Open
kpu opened this issue Jul 5, 2019 · 3 comments
Open

Internal compiler error #22

kpu opened this issue Jul 5, 2019 · 3 comments
Assignees

Comments

@kpu
Copy link
Owner

kpu commented Jul 5, 2019

In file included from /home/heafield/intgemm/./sse2_gemm.h:6:0,
                 from /home/heafield/intgemm/./intgemm.h:48,
                 from /home/heafield/intgemm/test/multiply_test.cc:4:
/home/heafield/intgemm/./multiply.h: In function ‘static void intgemm::AVX512_16bit::Multiply(const int16_t*, const int16_t*, float*, PostprocessPipeline, intgemm::Index, intgemm::Index, intgemm::Index) [with PostprocessPipeline = std::tuple<intgemm::Unquantize, intgemm::AddBias>]’:
/home/heafield/intgemm/./multiply.h:16:50: internal compiler error: in convert_move, at expr.c:315
   *reinterpret_cast<__m256*>(C + offset) = result;
                                                  ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
CMakeFiles/tests.dir/build.make:62: recipe for target 'CMakeFiles/tests.dir/test/multiply_test.cc.o' failed
@kpu
Copy link
Owner Author

kpu commented Jul 5, 2019

In any case the writer shouldn't be in multiply.h anymore but that's a longer issue...

@kpu
Copy link
Owner Author

kpu commented Jul 8, 2019

@XapaJIaMnu Can you help with your internal compiler error expertise?

@XapaJIaMnu
Copy link
Collaborator

I've encountered this bug before ( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77952 ) and I've referenced it a pull request comment here: #3 (comment) .

I believe this crash happens when you have a mismatch in the target attribute in some cases, despite them being compatible. In my pull request, this happened because we were using AVX512BW functions inside functions annotated with AVX512F and we fixed it by having everything annotated as AVX512BW.

In this case, it seems the writer is annotated with AVX2, but it's being used inside AVX512BW annotated function (the multiply) and it crashes. A workaround, would be to have two separate functions with two different annotations, but function multiversioning is inherently broken especially on old GCC, so we would need #DEFINE it with two differet target attributes.

Or. use writer and writerAVX512DUMMY, and change the multiply function.

Cheers,

Nick

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

3 participants