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*
734 Discussions

Will the AMX instruction provide an interface to C++ compilers?

BINKLINGS
Beginner
1,275 Views

Hello,

 

In MSVC or G++, I can easily use the AVX instructions by including header files like immintrin.h, but there doesn't seem to be a compiler that provides an interface to access AMX now. I'm looking forward to finding out if I can use amx instructions like avx instructions without using OneAPI/Intel One MKL or other libraries and toolkit, since this saves some effort in installing an accelerated library environment when migrating my codes.

 

If this doesn't receive support now, may I ask if it will in the future?

 

Thanks a lot.

0 Kudos
1 Solution
Alex_Y_Intel
Moderator
957 Views

You may find the AMX intrinsics from Intel intrinsic guide: https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#ig_expand=6859,6860,6860&techs=AMX

And here is an example using AMX intrinsics: https://www.intel.com/content/www/us/en/developer/articles/code-sample/advanced-matrix-extensions-intrinsics-functions.html (old programming model same as gcc. Developers need to specify the tile configuration)

The blog introduced new programming model (compiler will automatically do tile configuration) and also gave an example (see Intel® Advanced Matrix Extensions): https://www.intel.com/content/www/us/en/developer/articles/technical/whats-new-in-llvm-for-4th-gen-intel-xeon-processor.html

 

Both LLVM and Intel compiler supported the AMX intrinsics as well as gcc.

View solution in original post

0 Kudos
4 Replies
Alex_Y_Intel
Moderator
1,177 Views

Why are you asking the support of NOT using Intel's oneAPI and MKL in an Intel's DPC++/C++ compiler forum? 

0 Kudos
BINKLINGS
Beginner
1,157 Views

Hi, sorry for my mistake. I have tried to contact Intel and got a reply “We recommend that you submit the same topic to the DPC++/C++ compiler forum at this link: https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/bd-p/oneapi-data-parallel-c”

I really didn't find the right place to submit my question, and since Intel OneAPI has built-in support for the AMX instructions, I expect to find out whether this interface will be supported out of the MKL environment.

I would appreciate it if there are other ways to get the support.

0 Kudos
BINKLINGS
Beginner
998 Views

I don't think the key is MKL or something, it's the Intel c++ compiler.

at this link
I mean, if the AMX instruction set can be supported in the Intel oneAPI C++ Compiler, I'll also be able to use them in places like msvc or g++, since the header files are provided by Intel® and the technical documentation points to the Intel oneAPI C++ Compiler documentation.
But the truth is that I didn't find the interface to the AMX instruction set here, I only found it in MKL, that is why I mentioned MKL

In short, I'm just trying to find out when the AMX instruction set will be supported in the Intel c++ compiler

Thanks.

0 Kudos
Alex_Y_Intel
Moderator
958 Views

You may find the AMX intrinsics from Intel intrinsic guide: https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#ig_expand=6859,6860,6860&techs=AMX

And here is an example using AMX intrinsics: https://www.intel.com/content/www/us/en/developer/articles/code-sample/advanced-matrix-extensions-intrinsics-functions.html (old programming model same as gcc. Developers need to specify the tile configuration)

The blog introduced new programming model (compiler will automatically do tile configuration) and also gave an example (see Intel® Advanced Matrix Extensions): https://www.intel.com/content/www/us/en/developer/articles/technical/whats-new-in-llvm-for-4th-gen-intel-xeon-processor.html

 

Both LLVM and Intel compiler supported the AMX intrinsics as well as gcc.

0 Kudos
Reply