topic Re: Built-in math functions and 'undef' latency information in Vitis Acceleration, SDAccel, SDSoC
https://forums.xilinx.com/t5/Vitis-Acceleration-SDAccel-SDSoC/Built-in-math-functions-and-undef-latency-information/m-p/742705#M2854
<P>Below descriptions will be in the next Optimization UG that answers your question:</P>
<P> </P>
<P>OpenCL Specification provides a wealth of math built-in functions. All math built-in functions with the native_ prefix are mapped to one or more native device instructions and will typically have better performance compared to the corresponding functions (without the native__ prefix). The accuracy and in some cases the input ranges of these functions is implementation-defined. In SDAccel environment these native_ built-in functions use the equivalent functions in Vivado HLS Math library, which are already optimized for Xilinx FPGAs in terms of area and performance. It’s recommended to use native_ built-in functions if the accuracy meets the application requirement.</P>
<P> </P>
<BLOCKQUOTE><HR /><LI-USER uid="86181"></LI-USER> wrote:<BR />
<P>Hello,</P>
<P> </P>
<P>I recently started using 2016.2 and I have a simple OpenCL kernel which has loops with constant number of iteration and <CODE class="constant"><EM>reqd_work_group_size</EM>(<SPAN class="emphasis"><EM>1</EM></SPAN>, <SPAN class="emphasis"><EM>1</EM></SPAN>,<EM> 1). </EM>In the latency information of the report shows 'undef' for the kernel. I realized that using math functions like 'exp' and 'atan' cause this therefore I replaced them with 'native_*' versions. Now I can observe the latency information and the kernel uses less area resources. </CODE></P>
<P> </P>
<P><CODE class="constant">Can someone explain me why the latency information is not available for 'exp'? </CODE></P>
<P><CODE class="constant">And is there any drawback of using 'native_exp'?</CODE></P>
<P> </P>
<P><CODE class="constant">Best regards</CODE></P>
<HR /></BLOCKQUOTE>
<P> </P>
<P> </P>Thu, 12 Jan 2017 16:04:49 GMTywu2017-01-12T16:04:49ZBuilt-in math functions and 'undef' latency information
https://forums.xilinx.com/t5/Vitis-Acceleration-SDAccel-SDSoC/Built-in-math-functions-and-undef-latency-information/m-p/742648#M2853
<P>Hello,</P>
<P> </P>
<P>I recently started using 2016.2 and I have a simple OpenCL kernel which has loops with constant number of iteration and <CODE class="constant"><EM>reqd_work_group_size</EM>(<SPAN class="emphasis"><EM>1</EM></SPAN>, <SPAN class="emphasis"><EM>1</EM></SPAN>,<EM> 1). </EM>In the latency information of the report shows 'undef' for the kernel. I realized that using math functions like 'exp' and 'atan' cause this therefore I replaced them with 'native_*' versions. Now I can observe the latency information and the kernel uses less area resources. </CODE></P>
<P> </P>
<P><CODE class="constant">Can someone explain me why the latency information is not available for 'exp'? </CODE></P>
<P><CODE class="constant">And is there any drawback of using 'native_exp'?</CODE></P>
<P> </P>
<P><CODE class="constant">Best regards</CODE></P>Thu, 12 Jan 2017 09:45:38 GMThttps://forums.xilinx.com/t5/Vitis-Acceleration-SDAccel-SDSoC/Built-in-math-functions-and-undef-latency-information/m-p/742648#M2853vemulo2017-01-12T09:45:38ZRe: Built-in math functions and 'undef' latency information
https://forums.xilinx.com/t5/Vitis-Acceleration-SDAccel-SDSoC/Built-in-math-functions-and-undef-latency-information/m-p/742705#M2854
<P>Below descriptions will be in the next Optimization UG that answers your question:</P>
<P> </P>
<P>OpenCL Specification provides a wealth of math built-in functions. All math built-in functions with the native_ prefix are mapped to one or more native device instructions and will typically have better performance compared to the corresponding functions (without the native__ prefix). The accuracy and in some cases the input ranges of these functions is implementation-defined. In SDAccel environment these native_ built-in functions use the equivalent functions in Vivado HLS Math library, which are already optimized for Xilinx FPGAs in terms of area and performance. It’s recommended to use native_ built-in functions if the accuracy meets the application requirement.</P>
<P> </P>
<BLOCKQUOTE><HR /><LI-USER uid="86181"></LI-USER> wrote:<BR />
<P>Hello,</P>
<P> </P>
<P>I recently started using 2016.2 and I have a simple OpenCL kernel which has loops with constant number of iteration and <CODE class="constant"><EM>reqd_work_group_size</EM>(<SPAN class="emphasis"><EM>1</EM></SPAN>, <SPAN class="emphasis"><EM>1</EM></SPAN>,<EM> 1). </EM>In the latency information of the report shows 'undef' for the kernel. I realized that using math functions like 'exp' and 'atan' cause this therefore I replaced them with 'native_*' versions. Now I can observe the latency information and the kernel uses less area resources. </CODE></P>
<P> </P>
<P><CODE class="constant">Can someone explain me why the latency information is not available for 'exp'? </CODE></P>
<P><CODE class="constant">And is there any drawback of using 'native_exp'?</CODE></P>
<P> </P>
<P><CODE class="constant">Best regards</CODE></P>
<HR /></BLOCKQUOTE>
<P> </P>
<P> </P>Thu, 12 Jan 2017 16:04:49 GMThttps://forums.xilinx.com/t5/Vitis-Acceleration-SDAccel-SDSoC/Built-in-math-functions-and-undef-latency-information/m-p/742705#M2854ywu2017-01-12T16:04:49ZRe: Built-in math functions and 'undef' latency information
https://forums.xilinx.com/t5/Vitis-Acceleration-SDAccel-SDSoC/Built-in-math-functions-and-undef-latency-information/m-p/742732#M2855
<P>Thank you for the information.</P>Thu, 12 Jan 2017 19:12:45 GMThttps://forums.xilinx.com/t5/Vitis-Acceleration-SDAccel-SDSoC/Built-in-math-functions-and-undef-latency-information/m-p/742732#M2855vemulo2017-01-12T19:12:45ZRe: Built-in math functions and 'undef' latency information
https://forums.xilinx.com/t5/Vitis-Acceleration-SDAccel-SDSoC/Built-in-math-functions-and-undef-latency-information/m-p/876547#M2856
<P>I want to use efr and erfc functions. but they don't work by "native_erfc(10.0)" and "native_erfcf(10.0)" and ... ? Could you please help me as well :)</P>Thu, 26 Jul 2018 02:59:12 GMThttps://forums.xilinx.com/t5/Vitis-Acceleration-SDAccel-SDSoC/Built-in-math-functions-and-undef-latency-information/m-p/876547#M2856ramin_rasoulinezhad2018-07-26T02:59:12Z