Intel® High Level Design
Support for Intel® High Level Synthesis Compiler, DSP Builder, OneAPI for Intel® FPGAs, Intel® FPGA SDK for OpenCL™
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
511 Discussions

Tensor libraries in C/C++ compatible with HLS

messn036
Novice
380 Views

Hello Intel Community,

I am working on a project that is porting a neural network written in pytorch into C so that it can be modified/optimized and then put on an FPGA. My current approach is just rewriting the code base in C, however, the functions relating to Tensors are not easy to understand or re-implement. There are very few libraries that implement tensor functions (multiplication, min, max, mean, view) in C (Xtensor, Libtorch, Eigen) and none that are supported by the HLS compiler.

Before writing my own, I wanted to post here to see if any work like this had already been done or if I am missing a compatible or builtin library.

Note: I am not familiar with the industry as this is for student research.

Thanks.

0 Kudos
4 Replies
BoonBengT_Intel
Moderator
367 Views

Hi @messn036,

Thank you for posting in Intel community forum and hope all is well.
We do have reusable function library bake in for HLS dealing with numbers, more details can be found here for random precision as well as advance math involved.
Please do have a look if that helps.

 

Best Wishes
BB

messn036
Novice
307 Views

I was hoping to find a library that doesnt use dynamic memory location so that it would work out of the box with the intel HLS compiler. I ended up writing my own, though the matrix_mult function from intel's extended math library did help.

BoonBengT_Intel
Moderator
332 Views

Hi @messn036,

 

Good day, just checking in to see if there is any further doubts in regards to this matter.
Hope we have clarify your doubts.

Best Wishes
BB

BoonBengT_Intel
Moderator
281 Views

Hi @messn036,

 

Greetings, as we do not receive any further clarification on what is provided. Hence thread will now be transitioned to community support for further help on doubts in this thread. Pleasure having you here.

 

Best Wishes
BB

Reply