cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
lematthias
Observer
Observer
1,450 Views
Registered: ‎09-15-2018

Including immintrin.h causes HLS Synthesis to fail with 'undefined identifier' errrors

Simply including immintrin.h (or directly including SSE/SSE2 headers xmmintrin.h or emmintrin.h) causes HLS Synthesis to fail in Vivado 2018.3, 2019.1 and 2019.2. Earlier versions up to 2018.2 synthesize without errors. (Tested on Centos7 and Ubuntu 18.04)

This has been reported in a different context but probably the same issue here:
https://forums.xilinx.com/t5/High-Level-Synthesis-HLS/use-of-undeclared-identifier-builtin-ia32-and-csynth-design/m-p/923782

Minimal example top level function:

#include <immintrin.h>
void top(){}

Error message:

ERROR: [HLS 214-124] use of undeclared identifier '__builtin_ia32_storeups': /opt/Xilinx/Vivado/2019.2/lnx64/tools/clang/lib/clang/3.1/include/xmmintrin.h:630
ERROR: [HLS 214-124] use of undeclared identifier '__builtin_ia32_movntps'; did you mean '__builtin_ia32_movntss'?: /opt/Xilinx/Vivado/2019.2/lnx64/tools/clang/lib/clang/3.1/include/xmmintrin.h:678
ERROR: [HLS 214-124] use of undeclared identifier '__builtin_ia32_cvtps2pd': /opt/Xilinx/Vivado/2019.2/lnx64/tools/clang/lib/clang/3.1/include/emmintrin.h:380
ERROR: [HLS 214-124] use of undeclared identifier '__builtin_ia32_cvtdq2pd'; did you mean '__builtin_ia32_cvtdq2ps'?: /opt/Xilinx/Vivado/2019.2/lnx64/tools/clang/lib/clang/3.1/include/emmintrin.h:386
ERROR: [HLS 214-124] use of undeclared identifier '__builtin_ia32_storeupd': /opt/Xilinx/Vivado/2019.2/lnx64/tools/clang/lib/clang/3.1/include/emmintrin.h:586
ERROR: [HLS 214-124] use of undeclared identifier '__builtin_ia32_pavgb128': /opt/Xilinx/Vivado/2019.2/lnx64/tools/clang/lib/clang/3.1/include/emmintrin.h:671
ERROR: [HLS 214-124] use of undeclared identifier '__builtin_ia32_pavgw128': /opt/Xilinx/Vivado/2019.2/lnx64/tools/clang/lib/clang/3.1/include/emmintrin.h:677
ERROR: [HLS 214-124] use of undeclared identifier '__builtin_ia32_storedqu': /opt/Xilinx/Vivado/2019.2/lnx64/tools/clang/lib/clang/3.1/include/emmintrin.h:1177
ERROR: [HLS 214-124] use of undeclared identifier '__builtin_ia32_storelv4si'; did you mean '__builtin_ia32_storelps'?: /opt/Xilinx/Vivado/2019.2/lnx64/tools/clang/lib/clang/3.1/include/emmintrin.h:1189
ERROR: [HLS 214-124] use of undeclared identifier '__builtin_ia32_movntpd'; did you mean '__builtin_ia32_movntsd'?: /opt/Xilinx/Vivado/2019.2/lnx64/tools/clang/lib/clang/3.1/include/emmintrin.h:1195
ERROR: [HLS 214-124] use of undeclared identifier '__builtin_ia32_movntdq'; did you mean '__builtin_ia32_movntq'?: /opt/Xilinx/Vivado/2019.2/lnx64/tools/clang/lib/clang/3.1/include/emmintrin.h:1201
Wrong pragma usage.

Is this a bug or expected behaviour? Thank you very much in advance!

6 Replies
haggaie
Adventurer
Adventurer
1,211 Views
Registered: ‎06-28-2016

Hi, did you ever find the solution to this issue?
0 Kudos
anoopkrishna
Contributor
Contributor
1,009 Views
Registered: ‎02-09-2019

I had this error.

by removing the below mentioned libraries

//#include <windows.h>
//#include <windef.h>

the conflict was resolved

0 Kudos
fengcheng
Adventurer
Adventurer
661 Views
Registered: ‎11-27-2020

Did you solve this problem? If you did, can you share your method, thank you !

0 Kudos
fengcheng
Adventurer
Adventurer
645 Views
Registered: ‎11-27-2020

Did you solve this problem? If you did, can you share your method with me, thank you !

0 Kudos
anoopkrishna
Contributor
Contributor
559 Views
Registered: ‎02-09-2019

Hi the issue was resolved, when I removed the above mentioned libraries

0 Kudos
Gamdok
Newbie
Newbie
274 Views
Registered: ‎03-12-2021

I don't include such header files.

0 Kudos