Application Acceleration With FPGAs
Programmable Acceleration Cards (PACs), DCP, DLA, Software Stack, and Reference Designs
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.
424 Discussions

shift register cause computational results error????

zjinf
New Contributor I
545 Views

Hi inteler/alteraer

i refer p130~131 on https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/opencl-sdk/aocl-best-pra... write my code.

i found shift register will cause computational results error (1.0e-3f), that is integer parts and the first 2 bit of decimal also ok, no problem, but from the 3 bit , it will difference from PC ' results(for example : pc' results : 100.11234[FPGA without shift register also 100.11234], and fpga with shift register is 100.11341)

if i don't use shift register, the fpga's results is OK!

how can i fix the computational error!

 

thanks for your help!

 

 

0 Kudos
1 Solution
zjinf
New Contributor I
239 Views

hi HRZ

Thanks for your explanation ! it seems like what you say above

View solution in original post

2 Replies
HRZ
Valued Contributor II
239 Views

There is no "computational error" to fix. You are changing the order of the floating-point computations using that optimization, which will result in minor differences in the output due to rounding differences. Floating-point computations are not associative. If your application does not allow re-ordering of floating-point operations, you should not use that optimization. If you are using Arria 10/Stratix 10, that optimization is not required for single-precision floating-point reduction and you can use single-cycle accumulation instead. Check Intel's guides for more info.

zjinf
New Contributor I
240 Views

hi HRZ

Thanks for your explanation ! it seems like what you say above

Reply