Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

_mm512_tanpi_pd wrong declaration

AFog
Beginner
1,093 Views

ICC version 2022.1 Linux

 

__m512d test (__m512d x) {
    return _mm512_tanpi_pd(x);
}

warning #167: argument of type "__m512d" is incompatible with parameter of type "__m512"

The declaration of _mm512_tanpi_pd appears to be wrong.

This intrinsic is available only with ICC. It should be available with ICPX as well.

 

 

0 Kudos
9 Replies
NoorjahanSk_Intel
Moderator
1,056 Views

Hi,

 

Thanks for reaching out to us.

 

>>The declaration of _mm512_tanpi_pd appears to be wrong

 

As per the intel intrinsic guide, we could not find any information related to _mm512_tanpi_pd intrinsic.

 

Please refer to the below link for an available list of intrinsics with the tan operation

https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#ig_expand=7147,7163,244,245,415,417,416&text=_mm512_tan

 

Could you please try with the available intrinsics which are listed in the above document?

We have tried with _mm512_tan_pd and could not see any such warnings.

 

>>It should be available with ICPX as well.

You can make use of the -march option to use intrinsic-based code with the ICPX compiler so that the compiler recognizes the processor-specific or architecture-specific intrinsic.

You can use -march=native if you are compiling for your own machine. That will enable everything your CPU has, and set tuning options.

 

Please refer to the below link for more details:

https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compiler-reference/compiler-options/code-generation-options/march.html#march

 

Hope this helps to resolve your issue. If not, could you please let us know from where you are using _mm512_tanpi_pd intrinsic(Reference to any document) along with a complete reproducer so that we can investigate it from our end?

 

Thanks & Regards,

Noorjahan.

 

0 Kudos
AFog
Beginner
1,043 Views

Thank you for your reply.

The functions sinpi, cospi, and tanpi are available in SVML. They are not documented in the online intrinsics guide, but they are defined in the header files.

These functions are defined in the official IEEE754 floating point standard (see https://en.wikipedia.org/wiki/IEEE_754 ).

These functions are included in the intrinsic functions header files for ICC and ICL Linux and Windows.

They are not in the header files for ICPX (2022.1), yet they work if you call them directly. I assume that they will be added in a later version?

I have verified that these functions in SVML are working correctly for both single and double precision under Linux and Windows, except for the apparent typo for _mm512_tanpi_pd.

I assume that the documentation is just not up to date.

 

0 Kudos
NoorjahanSk_Intel
Moderator
983 Views

Hi,


Thanks for providing the details.

We are working on your issue. We will get back to you soon.


Thanks & Regards,

Noorjahan.


0 Kudos
Viet_H_Intel
Moderator
969 Views

There is no such intrinsic in Intel compilers. Can you let us know which Intel's header file defined mm512_tanpi_pd()?

And please keep in mind that not every SVML internal function has corresponding external intrinsic.

 

0 Kudos
AFog
Beginner
928 Views

Thank you.

Strangely, _mm512_sinpi_pd etc. work on both ICC and ICL even though they are not found in any visible header file. _mm512_tanpi_pd also works with this workaround:

_mm512_castps_pd(_mm512_tanpi_pd(_mm512_castpd_ps(x)))

I have verified that this function gives correct results.

0 Kudos
Viet_H_Intel
Moderator
919 Views

Hi,


Since this intrinsic isn't defined in the header files nor on our Intrinsics Guide website, please don't use it.


Thanks,



0 Kudos
Viet_H_Intel
Moderator
878 Views

Please let us know if you have any additional questions. If not, we would like to close this topic.


Thanks,


0 Kudos
AFog
Beginner
870 Views

The _mm512_tanpi_pd function is recognized by the compiler without a header, but with the wrong vector register type. If you don't want to fix the error in this undocumented function then you can close the issue.

0 Kudos
Viet_H_Intel
Moderator
860 Views

Not sure if you knew it already, but Intel Classic Compiler will be end of life. Please see this link for more details.


https://www.intel.com/content/www/us/en/developer/articles/technical/adoption-of-llvm-complete-icx.html


Also, I've escalated this issue to our developer team for supporting on ICX.


Thanks for report this issue to us. We are closing this ticket.

Regards.

Viet


0 Kudos
Reply