- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am developing a fpga project using oneAPI, and I want to use the code which is written by intel HLS. (Migrating to oneAPI is the least thing I want to do becasue the code in HLS is huge)
so I use fpga_crossgen to compile the hls code to a library. and it generate a lot lines of error:
In file included from /home/myname/workspace/fpga/toe/arp_intel/toe/toe.cpp:29:
In file included from /home/myname/workspace/fpga/toe/arp_intel/toe/toe.hpp:31:
In file included from /home/myname/workspace/fpga/toe/arp_intel/toe/../axi_utils.hpp:33:
In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/iostream:39:
In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/ostream:38:
In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/ios:42:
In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/ios_base.h:41:
In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/locale_classes.h:40:
In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/string:49:
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/ext/numeric_traits.h:130:58: error: __int128 is not supported on this target
__extension__ template<> struct __is_integer_nonstrict<__int128> { enum { __value = 1 }; typedef std::__true_type __type; enum { __width = 128 }; }; __extension__ template<> struct __is_integer_nonstrict<unsigned __int128> { enum { __value = 1 }; typedef std::__true_type __type; enum { __width = 128 }; };
^
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/ext/numeric_traits.h:130:216: error: __int128 is not supported on this target
__extension__ template<> struct __is_integer_nonstrict<__int128> { enum { __value = 1 }; typedef std::__true_type __type; enum { __width = 128 }; }; __extension__ template<> struct __is_integer_nonstrict<unsigned __int128> { enum { __value = 1 }; typedef std::__true_type __type; enum { __width = 128 }; };
^
In file included from /home/myname/workspace/fpga/toe/arp_intel/toe/toe.cpp:29:
In file included from /home/myname/workspace/fpga/toe/arp_intel/toe/toe.hpp:31:
In file included from /home/myname/workspace/fpga/toe/arp_intel/toe/../axi_utils.hpp:41:
In file included from /media/myname/oneapi/2023.2.0/compiler/2023.2.0/linux/lib/oclfpga/include/HLS/ac_int.h:112:
In file included from /media/myname/oneapi/2023.2.0/compiler/2023.2.0/linux/lib/oclfpga/include/HLS/math.h:108:
In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/math.h:36:
In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/cmath:1935:
In file included from /usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/specfun.h:46:
/usr/lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/limits:1658:50: error: __int128 is not supported on this target
__extension__ template<> struct numeric_limits<__int128> { static constexpr bool is_specialized = true; static constexpr __int128 min() noexcept { return (((__int128)(-1) < 0) ? -(((__int128)(-1) < 0) ? (((((__int128)1 << ((128 - ((__int128)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(__int128)0) - 1 : (__int128)0); } static constexpr __int128 max() noexcept { return (((__int128)(-1) < 0) ? (((((__int128)1 << ((128 - ((__int128)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(__int128)0); } static constexpr int digits = 128 - 1; static constexpr int digits10 = (128 - 1) * 643L / 2136; static constexpr bool is_signed = true; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr __int128 epsilon() noexcept { return 0; } static constexpr __int128 round_error() noexcept { return 0; } static constexpr __int128 lowest() noexcept { return min(); } static constexpr int max_digits10 = 0; static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr __int128 infinity() noexcept { return static_cast<__int128>(0); } static constexpr __int128 quiet_NaN() noexcept { return static_cast<__int128>(0); } static constexpr __int128 signaling_NaN() noexcept { return static_cast<__int128>(0); } static constexpr __int128 denorm_min() noexcept { return static_cast<__int128>(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = false; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; }; __extension__ template<> struct numeric_limits<unsigned __int128> { static constexpr bool is_specialized = true; static constexpr unsigned __int128 min() noexcept { return 0; } static constexpr unsigned __int128 max() noexcept { return (((unsigned __int128)(-1) < 0) ? (((((unsigned __int128)1 << ((128 - ((unsigned __int128)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(unsigned __int128)0); } static constexpr unsigned __int128 lowest() noexcept { return min(); } static constexpr int max_digits10 = 0; static constexpr int digits = 128; static constexpr int digits10 = 128 * 643L / 2136; static constexpr bool is_signed = false; static constexpr bool is_integer = true; static constexpr bool is_exact = true; static constexpr int radix = 2; static constexpr unsigned __int128 epsilon() noexcept { return 0; } static constexpr unsigned __int128 round_error() noexcept { return 0; } static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr float_denorm_style has_denorm = denorm_absent; static constexpr bool has_denorm_loss = false; static constexpr unsigned __int128 infinity() noexcept { return static_cast<unsigned __int128>(0); } static constexpr unsigned __int128 quiet_NaN() noexcept { return static_cast<unsigned __int128>(0); } static constexpr unsigned __int128 signaling_NaN() noexcept { return static_cast<unsigned __int128>(0); } static constexpr unsigned __int128 denorm_min() noexcept { return static_cast<unsigned __int128>(0); } static constexpr bool is_iec559 = false; static constexpr bool is_bounded = true; static constexpr bool is_modulo = true; static constexpr bool traps = true; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; };
44 errors generated.
Error: OpenCL parser FAILED
seems the error occurs when include ac_int.h which is necessary for the code to use.
any ideas on this problem?
B.R.&thanks
Jia
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Jia3Xu,
Thank you for posting in Intel community forum and hope all is well.
Just for your information creating library object you may need to specify the target to sycl as per the optimization guide:
- https://www.intel.com/content/dam/develop/external/us/en/documents/oneapi-programming-guide.pdf (page 132)
As for the error mention, it seems to be mentioning none supported int128, there are some discussion online on the targeted platform or the compiler version, hence would recommend to check on that.
-https://community.intel.com/t5/Intel-C-Compiler/128-bit-Integer-Arithmetic/m-p/962306
Hope that clarify.
Best Wishes
BB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Jia3Xu,
Good day, just following up on the previous clarification.
By any chances did you managed to look into the it?
Best Wishes
BB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Boonbeng,
Sorry for the late reply, Yes I've read the document, I've tried to compile that into an RTL way (which is synthsis the HLS code to an RTL module and use the rtl module and a c-sim function as the input of the fpga_crossgen, but because the HLS code is quite complicated which includes many streams_in /stream_out(avalon ST) interface, so I failed to manage complete the crossgen successfully according to the document you mentioned . But the document also mention the input arguments and the usage of fpga_corssgen( by invoke fpga_crossgen --help) also indicate that I can input a .cpp file and choose hls as the source (--source hls) and select target as sycl (--target sycl) to generate an object file suitable for sycl.
fpga_crossgen ./compute_kernel.cpp --source hls --target sycl -o compute_kernel.o
and that cause the problem in my first post. is that a valid operation?
if ture, then comes to the int128 problem. I tried to solve the int128 problem but not work. here are my attempts.
the website you mentioned , the url provided by jimdempseyatthecove is not able to access.
I've tried the http://mx-3.cz/tringi/www/int128 class but the class is used not for oneAPI or hls kernel because of the usage of "throw" etc. is not allowed.
I guess the problem may be some library include problem becasue when I use ipcx to compile the code with -fhls flag it exit with out error. (but this seems not able to make the hls code interact with the oneAPI kernel).
Best Regards,
Jia
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Jia3Xu,
Thanks for getting back with updates, yes that is valid command to generate a object files for sycl.
Coming to the second issues on the int128, unfortunately there is no direct answer for this, but based on the situation you explain and tried. Im align that possible some included library are causing the compiler to error out.
Hence possible actions here is to identify the mention library by isolating them
Hope that clarify.
Best Wishes
BB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Jia3Xu,
Greetings, just checking in to see if there is any further doubts in regards to this matter.
Hope your doubts have been clarified.
Best Wishes
BB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Jia3Xu,
Greetings, as we do not receive any further clarification/updates on the matter, hence would assume challenge are overcome. Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. For new queries, please feel free to open a new thread and we will be right with you. Pleasure having you here.
Best Wishes
BB
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page