UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor vemulo
Visitor
3,959 Views
Registered: ‎01-12-2017

Built-in math functions and 'undef' latency information

Jump to solution

Hello,

 

I recently started using 2016.2 and I have a simple OpenCL kernel which has loops with constant number of iteration and reqd_work_group_size(1, 1, 1). 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.

 

Can someone explain me why the latency information is not available for 'exp'?

And is there any drawback of using 'native_exp'?

 

Best regards

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
7,237 Views
Registered: ‎11-28-2007

Re: Built-in math functions and 'undef' latency information

Jump to solution

Below descriptions will be in the next Optimization UG  that answers your question:

 

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.

 


@vemulo wrote:

Hello,

 

I recently started using 2016.2 and I have a simple OpenCL kernel which has loops with constant number of iteration and reqd_work_group_size(1, 1, 1). 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.

 

Can someone explain me why the latency information is not available for 'exp'?

And is there any drawback of using 'native_exp'?

 

Best regards


 

 

Cheers,
Jim
0 Kudos
3 Replies
Highlighted
Xilinx Employee
Xilinx Employee
7,238 Views
Registered: ‎11-28-2007

Re: Built-in math functions and 'undef' latency information

Jump to solution

Below descriptions will be in the next Optimization UG  that answers your question:

 

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.

 


@vemulo wrote:

Hello,

 

I recently started using 2016.2 and I have a simple OpenCL kernel which has loops with constant number of iteration and reqd_work_group_size(1, 1, 1). 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.

 

Can someone explain me why the latency information is not available for 'exp'?

And is there any drawback of using 'native_exp'?

 

Best regards


 

 

Cheers,
Jim
0 Kudos
Visitor vemulo
Visitor
3,918 Views
Registered: ‎01-12-2017

Re: Built-in math functions and 'undef' latency information

Jump to solution

Thank you for the information.

0 Kudos
845 Views
Registered: ‎07-25-2018

Re: Built-in math functions and 'undef' latency information

Jump to solution

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 :)

0 Kudos