Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*

Optimization code path

janez-makovsek
New Contributor I
1,000 Views

Dear All,

In the previous version of Intel C++, there was a switch /Qax, which had the behavior to implement multiple code paths specific to different supported CPU instruction sets. The resolution, which code path to load, was done at library load time. 

The latest version of Intel oneAPI C++ no longer has Qax, but only Qx, which allows a single code path selection. Is there some other switch, which replaces Qax? How can we get the same behavior as we had with Qax?

Thanks!
Atmapuri

0 Kudos
3 Replies
VidyalathaB_Intel
Moderator
971 Views

Hi,

Thanks for reaching out to us.

We are looking into this issue internally. we will get back to you soon.

Regards,

Vidya.


0 Kudos
Subarnarek_G_Intel
946 Views

Hi Janez,

/Qax flag implementation is on the queue. But before that is implemented I can give you an work aound with which you can build for multiple architechtures.

Cpu_dispatch and ‘target’ multiversioning are the current multiversioning dispatch mechanisms (besides manual dispatch)

CPU-dispatch option provides multiple versions of the same function optimized for different architectures)

With CPU-dispatch we can do something like:

 

__attribute__((cpu_dispatch(list, of, architectures, and, things, here)))

void the_function();

 

__attribute__((cpu_specific(list, of, architectures, and, things, here)))

void the_function() { the implementation; }

 

If we have a special implementation for one of those, we can remove it from the cpu_specific declaration, and create a ‘new’ cpu_specific declaration with only that architecture (or subset of architectures).

 

So, the difference between using cpu_dispatch and using -ax<arch> is that with -ax<arch> the compiler figures out when it’s useful to have a CPU-specific clone, but with cpu_dispatch the user has to guess at that and specify it at the source level for each function to be multiversioned.

Let me know if that helps.

 

Regards,

Subarna


0 Kudos
Subarnarek_G_Intel
867 Views

Closing this case as there is no response from the customer. As soon as /Qax is implemented it will be a part of the release notes.


0 Kudos
Reply