Turn on suggestions

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

Showing results for

- Community Forums
- :
- Forums
- :
- Software Development and Acceleration
- :
- Vitis Acceleration, SDAccel, SDSoC
- :
- Re: Built-in math functions and 'undef' latency in...

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

Highlighted

vemulo

Visitor

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

01-12-2017 01:45 AM

4,061 Views

Registered:
01-12-2017

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`

1 Solution

Accepted Solutions

Highlighted

ywu

Xilinx Employee

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

01-12-2017 08:04 AM

7,339 Views

Registered:
11-28-2007

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

Jim

3 Replies

Highlighted

ywu

Xilinx Employee

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

01-12-2017 08:04 AM

7,340 Views

Registered:
11-28-2007

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

Jim

Highlighted
##

Jump to solution

vemulo

Visitor

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

01-12-2017 11:12 AM

4,020 Views

Registered:
01-12-2017

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

Thank you for the information.

Highlighted
##

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

ramin_rasoulinezhad

Visitor

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

07-25-2018 07:55 PM - edited 07-25-2018 07:59 PM

947 Views

Registered:
07-25-2018

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