Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- FPGAs and Programmable Solutions
- Intel® Quartus® Prime Software
- Difference float calculation on FPGA and CPU

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-14-2017
08:18 AM

786 Views

Difference float calculation on FPGA and CPU

Hi,

I use float point calculation in convolution neural network (opencl). Result of calcultaion on FPGA and CPU is similar, but in low byte I get some difference. How can I fix this problem ? How can I get result on FPGA identical to result of CPU.Link Copied

3 Replies

Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-14-2017
02:59 PM

39 Views

Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-14-2017
09:49 PM

39 Views

--- Quote Start --- Hi, I use float point calculation in convolution neural network (opencl). Result of calcultaion on FPGA and CPU is similar, but in low byte I get some difference. How can I fix this problem ? How can I get result on FPGA identical to result of CPU. --- Quote End --- Unless the FP add/sub/mul/div algorithms are EXACTLY the same in each implementation (eg, how rounding is handled) you can reasonably expect a few bits of difference in the mantissa of the final result. This is an age old problem in software using floating point. You should compare the expected and received values to be equal within some error bound, and not expect them to be EXACTLY equal. IE, use:

Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-16-2017
07:49 AM

39 Views

This link can help you: https://www.altera.com/en_us/pdfs/literature/wp/wp-01028.pdf

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.