- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am currently building an infrastructure (in MATLAB) to allow people to automatically use the SIMD optimizations in Simulink model (or Matlab) on their target hardware.
However, I have encountered the following difficulty
For different INTEL SIMD instruction sets, e.g. AVX512, AVX2, AVX, SSE4.1, SSE2, SSE Are there any dependencies?
By dependency, I mean the following:
(1) For example, if a CPU supports AVX512, it will need to have AVX and SSE.
Is this true? If so, is there a place where I can find such dependencies for all different intrinsic set
(2) If I want to enable optimization for AVX512, I will have to enable AVX and SSE
Is this true? If so, is there a place where I can find such dependencies for all different intrinsic set
I was not able to find the information in "INTEL Intrinsics Guide" https://software.intel.
Is there a documentation about the dependencies of different SIMD intrinsic set?
If not, can someone from INTEL provide one?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
>>>For (1), Is the list here
https://software.intel.com/sites/landingpage/IntrinsicsGuide/#
Ordered according to dependency I was referring to? (e.g. FMA depends on AVX2)
Also, for different versions of AVX512 (or AMX), are they also have dependency or they are independent?>>>
The order of SIMD ISA (in Intrinsic Guide) is due to its following succession i.e MMX->SSE->SSE2->SSSE3->SSE4.1->SSE4.2->AVX->AVX2>AVX512.
FMA instructions were introduced in AVX2 technology (so yes it depends on AVX2 support).
I do not know how at machine level the AMX is implemented (probably it has its own register file and execution circuitry), so it is irrelevant to AVX512.
>>>When two versions of AVX512 are used together, is there a priority which one of them will be used or different versions are mapped to completely different operation/functions during optimization?>.>>
I presume, that you mean different subsets of AVX512. Compiler can determine the exact architectural details of the target processor and may generate the appropriate code. See this.
>>>Will this enable simd optimization for its prerequisites, such as AVX, SSE4, SSE2, SSE?>>>
Here is the exact answer
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
>>>For example, if a CPU supports AVX512, it will need to have AVX and SSE.
Is this true? If so, is there a place where I can find such dependencies for all different intrinsic set>>>
Yes, it is true. There is a backward compatibility and even the old 80-bit x87 floating-point ISA is supported by the newest CPU.
>>>(2) If I want to enable optimization for AVX512, I will have to enable AVX and SSE
Is this true? If so, is there a place where I can find such dependencies for all different intrinsic set>>>
Enable optimization for AVX512 exactly where? -- Compilation settings? Can you be more precise.
In the case of supported SIMD ISA the Intrinsic guide provides the CPUID flags. You can verify support of the specific CPU by using lscpu or cpuid Linux command, or programmatically by issuing CPUID machine code instruction:
Support for different SIMD ISA (Intrinsic guide excerpt). Pay attention to CPUID flag per specific intrinsic.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bernard,
Thanks for the reply.
I have two follow-up questions
For (1), Is the list here
https://software.intel.com/sites/landingpage/IntrinsicsGuide/#
Ordered according to dependency I was referring to? (e.g. FMA depends on AVX2)
Also, for different versions of AVX512 (or AMX), are they also have dependency or they are independent?
When two versions of AVX512 are used together, is there a priority which one of them will be used or different versions are mapped to completely different operation/functions during optimization?
For (2), I am referring to the compiler flags we need to add to enable them.
Assume I have avx2 and add compiler flag -mavx2 (or MSVC equivalent),
Will this enable simd optimization for its prerequisites, such as AVX, SSE4, SSE2, SSE?
Or do I need to add comopiler flags to all of them?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
>>>For (1), Is the list here
https://software.intel.com/sites/landingpage/IntrinsicsGuide/#
Ordered according to dependency I was referring to? (e.g. FMA depends on AVX2)
Also, for different versions of AVX512 (or AMX), are they also have dependency or they are independent?>>>
The order of SIMD ISA (in Intrinsic Guide) is due to its following succession i.e MMX->SSE->SSE2->SSSE3->SSE4.1->SSE4.2->AVX->AVX2>AVX512.
FMA instructions were introduced in AVX2 technology (so yes it depends on AVX2 support).
I do not know how at machine level the AMX is implemented (probably it has its own register file and execution circuitry), so it is irrelevant to AVX512.
>>>When two versions of AVX512 are used together, is there a priority which one of them will be used or different versions are mapped to completely different operation/functions during optimization?>.>>
I presume, that you mean different subsets of AVX512. Compiler can determine the exact architectural details of the target processor and may generate the appropriate code. See this.
>>>Will this enable simd optimization for its prerequisites, such as AVX, SSE4, SSE2, SSE?>>>
Here is the exact answer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page