Community
cancel
Showing results for 
Search instead for 
Did you mean: 
janez-makovsek
Beginner
80 Views

Optimization code path

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
2 Replies
VidyalathaB_Intel
Moderator
51 Views

Hi,

Thanks for reaching out to us.

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

Regards,

Vidya.


26 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


Reply