patchGNU Autoconf Archive - Patches: patch #8727, AX_EXT(ax_ext.m4) support for...

 
 

patch #8727: AX_EXT(ax_ext.m4) support for AVX2/AVX512 and other CPU extensions

Submitter:  Michael Petch <mdpetch>
Submitted:  Wed 26 Aug 2015 05:56:36 AM UTC
   
 
Priority:  5 - Normal Status:  Done
Assigned to:  None Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 26 Aug 2015 09:46:30 AM UTC, comment #1: 
Peter Simons <simons>
Group administrator
Wed 26 Aug 2015 05:56:36 AM UTC, original submission:  

Attached is a patch for AX_EXT(ax_ext.m4) that should remain backwards compatible with the current version (serial 13) in git with support for AVX/AVX2/AVX512 as well as existing SIMD extensions. There is also a new environment variable returned - AC_SUBST(CPUEXT_FLAGS) . CPUEXT_FLAGS works in the same fashion as SIMD_FLAGS except it contains a list of GCC compiler options to enable the non-SIMD extensions that a processor may support.

Proper OS and CPU checking is performed as well as a compiler test.

This patch really needs to be tested on newer architectures as I didn't have access to AVX2 and AVX512 systems. The checks are based upon information gathered across Intel specifications. This type of functionality has been requested a lot over the past year so anyone who stumbles on this patch submission can try it out.

The defines current supported are:

AH_TEMPLATE([HAVE_MMX],[Define to 1 to support Multimedia Extensions])
  AH_TEMPLATE([HAVE_RDRND],[Define to 1 to support Digital Random Number
Generator])
  AH_TEMPLATE([HAVE_BMI1],[Define to 1 to support Bit Manipulation
Instruction Set 1])
  AH_TEMPLATE([HAVE_BMI2],[Define to 1 to support Bit Manipulation
Instruction Set 2])
  AH_TEMPLATE([HAVE_ADX],[Define to 1 to support Multi-Precision
Add-Carry Instruction Extensions])
  AH_TEMPLATE([HAVE_MPX],[Define to 1 to support Memory Protection
Extensions])
  AH_TEMPLATE([HAVE_PREFETCHWT1],[Define to 1 to support Prefetch Vector
Data Into Caches WT1])
  AH_TEMPLATE([HAVE_ABM],[Define to 1 to support Advanced Bit Manipulation])
  AH_TEMPLATE([HAVE_SSE],[Define to 1 to support Streaming SIMD Extensions])
  AH_TEMPLATE([HAVE_SSE2],[Define to 1 to support Streaming SIMD
Extensions])
  AH_TEMPLATE([HAVE_SSE3],[Define to 1 to support Streaming SIMD
Extensions 3])
  AH_TEMPLATE([HAVE_SSSE3],[Define to 1 to support Supplemental
Streaming SIMD Extensions 3])
  AH_TEMPLATE([HAVE_SSE4_1],[Define to 1 to support Streaming SIMD
Extensions 4.1])
  AH_TEMPLATE([HAVE_SSE4_2],[Define to 1 to support Streaming SIMD
Extensions 4.2])
  AH_TEMPLATE([HAVE_SSE4a],[Define to 1 to support AMD Streaming SIMD
Extensions 4a])
  AH_TEMPLATE([HAVE_SHA],[Define to 1 to support Secure Hash Algorithm
Extension])
  AH_TEMPLATE([HAVE_AES],[Define to 1 to support Advanced Encryption
Standard New Instruction Set (AES-NI)])
  AH_TEMPLATE([HAVE_AVX],[Define to 1 to support Advanced Vector
Extensions])
  AH_TEMPLATE([HAVE_FMA3],[Define to 1 to support  Fused Multiply-Add
Extensions 3])
  AH_TEMPLATE([HAVE_FMA4],[Define to 1 to support Fused Multiply-Add
Extensions 3])
  AH_TEMPLATE([HAVE_XOP],[Define to 1 to support eXtended Operations
Extensions])
  AH_TEMPLATE([HAVE_AVX2],[Define to 1 to support Advanced Vector
Extensions 2])
  AH_TEMPLATE([HAVE_AVX512_F],[Define to 1 to support AVX-512 Foundation
Extensions])
  AH_TEMPLATE([HAVE_AVX512_CD],[Define to 1 to support AVX-512 Conflict
Detection Instructions])
  AH_TEMPLATE([HAVE_AVX512_PF],[Define to 1 to support AVX-512 Conflict
Prefetch Instructions])
  AH_TEMPLATE([HAVE_AVX512_ER],[Define to 1 to support AVX-512
Exponential & Reciprocal Instructions])
  AH_TEMPLATE([HAVE_AVX512_VL],[Define to 1 to support AVX-512 Vector
Length Extensions])
  AH_TEMPLATE([HAVE_AVX512_BW],[Define to 1 to support AVX-512 Byte and
Word Instructions])
  AH_TEMPLATE([HAVE_AVX512_DQ],[Define to 1 to support AVX-512
Doubleword and Quadword Instructions])
  AH_TEMPLATE([HAVE_AVX512_IFMA],[Define to 1 to support AVX-512 Integer
Fused Multiply Add Instructions])
  AH_TEMPLATE([HAVE_AVX512_VBMI],[Define to 1 to support AVX-512 Vector
Byte Manipulation Instructions])

Michael Petch <mdpetch>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #34731:  ax_ext.patch added by mdpetch (20KiB - application/octet-stream - ax_ext.m4 patch to be applied to Serial 13 to support AVX/AVX/AVX512)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by simons (Posted a comment)
  • -email is unavailable- added by simons
  • -email is unavailable- added by mdpetch (Submitted the item)
  •  

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-09-25 simons StatusReady For Test Done
        Open/ClosedOpen Closed
    2015-08-26 simons StatusNone Ready For Test
        Carbon-Copy- Added christophe tournayre <turn3r@users.sourceforge.net>
    2015-08-26 mdpetch Attached File- Added ax_ext.patch, #34731

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code