词条 | Advanced Vector Extensions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
释义 |
Advanced Vector Extensions (AVX, also known as Sandy Bridge New Extensions) are extensions to the x86 instruction set architecture for microprocessors from Intel and AMD proposed by Intel in March 2008 and first supported by Intel with the Sandy Bridge[1] processor shipping in Q1 2011 and later on by AMD with the Bulldozer[2] processor shipping in Q3 2011. AVX provides new features, new instructions and a new coding scheme. AVX2 expands most integer commands to 256 bits and introduces fused multiply-accumulate (FMA) operations. AVX-512 expands AVX to 512-bit support using a new EVEX prefix encoding proposed by Intel in July 2013 and first supported by Intel with the Knights Landing processor, which shipped in 2016.[3][4]{{Anchor|AVX1}}Advanced Vector ExtensionsAVX uses sixteen YMM registers. Each YMM register contains:
The width of the SIMD register file is increased from 128 bits to 256 bits, and renamed from XMM0–XMM7 to YMM0–YMM7 (in x86-64 mode, YMM0–YMM15). In processors with AVX support, the legacy SSE instructions (which previously operated on 128-bit XMM registers) can be extended using the VEX prefix to operate on the lower 128 bits of the YMM registers.
AVX introduces a three-operand SIMD instruction format, where the destination register is distinct from the two source operands. For example, an SSE instruction using the conventional two-operand form a = a + b can now use a non-destructive three-operand form c = a + b, preserving both source operands. AVX's three-operand format is limited to the instructions with SIMD operands (YMM), and does not include instructions with general purpose registers (e.g. EAX). Such support will first appear in AVX2.[5] The alignment requirement of SIMD memory operands is relaxed.[5] The new VEX coding scheme introduces a new set of code prefixes that extends the opcode space, allows instructions to have more than two operands, and allows SIMD vector registers to be longer than 128 bits. The VEX prefix can also be used on the legacy SSE instructions giving them a three-operand form, and making them interact more efficiently with AVX instructions without the need for VZEROUPPER and VZEROALL. The AVX instructions support both 128-bit and 256-bit SIMD. The 128-bit versions can be useful to improve old code without needing to widen the vectorization, and avoid the penalty of going from SSE to AVX, they are also faster on some early AMD implementations of AVX. This mode is sometimes known as AVX-128.[6] New instructionsThese AVX instructions are in addition to the ones that are 256-bit extensions of the legacy 128-bit SSE instructions; most are usable on both 128-bit and 256-bit operands.
CPUs with AVX
Note: Not all CPUs from the listed families support AVX. Generally, CPUs with the commercial denomination "Core i3/i5/i7" support them, whereas "Pentium" and "Celeron" CPUs don't.
Issues regarding compatibility between future Intel and AMD processors are discussed under XOP instruction set. Compiler and assembler supportGCC starting with version 4.6 (although there was a 4.3 branch with certain support) and the Intel Compiler Suite starting with version 11.1 support AVX. The Visual Studio 2010/2012 compiler supports AVX via intrinsic and /arch:AVX switch. The Open64 compiler version 4.5.1 supports AVX with -mavx flag. Absoft supports with -mavx flag. PathScale supports via the -mavx flag. The Free Pascal compiler supports AVX and AVX2 with the -CfAVX and -CfAVX2 switches from version 2.7.1. The Vector Pascal compiler supports AVX via the -cpuAVX32 flag. The GNU Assembler (GAS) inline assembly functions support these instructions (accessible via GCC), as do Intel primitives and the Intel inline assembler (closely compatible to GAS, although more general in its handling of local references within inline code). Other assemblers such as MASM VS2010 version, YASM,[13] FASM, NASM and JWASM. Operating system supportAVX adds new register-state through the 256-bit wide YMM register file, so explicit operating system support is required to properly save and restore AVX's expanded registers between context switches. The following operating system versions support AVX:
{{Anchor|AVX2}}Advanced Vector Extensions 2Advanced Vector Extensions 2 (AVX2), also known as Haswell New Instructions,[21] is an expansion of the AVX instruction set introduced in Intel's Haswell microarchitecture. AVX2 makes the following additions:
Sometimes another extension using a different cpuid flag is considered part of AVX2; those instructions are listed on their own page and not below:
New instructions
CPUs with AVX2
AVX-512{{Main article|AVX-512}}AVX-512 are 512-bit extensions to the 256-bit Advanced Vector Extensions SIMD instructions for x86 instruction set architecture proposed by Intel in July 2013, and scheduled to be supported in 2015 with Intel's Knights Landing processor.[3]AVX-512 instruction are encoded with the new EVEX prefix. It allows 4 operands, 7 new 64-bit opmask registers, scalar memory mode with automatic broadcast, explicit rounding control, and compressed displacement memory addressing mode. The width of the register file is increased to 512 bits and total register count increased to 32 (registers ZMM0-ZMM31) in x86-64 mode. AVX-512 consists of multiple extensions not all meant to be supported by all processors implementing them. The instruction set consists of the following:
Only the core extension AVX-512F (AVX-512 Foundation) is required by all implementations, though all current processors also support CD (conflict detection); computing coprocessors will additionally support ER, PF, 4VNNIW, 4FMAPS, and VPOPCNTDQ, while desktop processors will support VL, DQ, BW, IFMA, VBMI, VPOPCNTDQ, VPCLMULQDQ etc. The updated SSE/AVX instructions in AVX-512F use the same mnemonics as AVX versions; they can operate on 512-bit ZMM registers, and will also support 128/256 bit XMM/YMM registers (with AVX-512VL) and byte, word, doubleword and quadword integer operands (with AVX-512BW/DQ and VBMI).[23]{{rp|23}} CPUs with AVX-512
Compilers supporting AVX-512
Applications
Software
See also
References1. ^{{Cite web|url=http://www.realworldtech.com/sandy-bridge/6/|title=Intel's Sandy Bridge Microarchitecture|last=Kanter|first=David|date=September 25, 2010|website=www.realworldtech.com|language=en-US|access-date=February 17, 2018}} 2. ^{{Cite news|url=https://www.extremetech.com/computing/100583-analyzing-bulldozers-scaling-single-thread-performance/4|title=Analyzing Bulldozer: Why AMD's chip is so disappointing - Page 4 of 5 - ExtremeTech|last=Hruska|first=Joel|date=October 24, 2011|work=ExtremeTech|access-date=February 17, 2018|language=en-US}} 3. ^1 2 3 4 {{citation |url= http://software.intel.com/en-us/blogs/2013/avx-512-instructions |title= AVX-512 Instructions |date= July 23, 2013 |author= James Reinders |publisher= Intel |accessdate= August 20, 2013}} 4. ^{{Cite news|url=http://ark.intel.com/products/94033/Intel-Xeon-Phi-Processor-7210-16GB-1_30-GHz-64-core|title=Intel Xeon Phi Processor 7210 (16GB, 1.30 GHz, 64 core) Product Specifications|access-date=March 16, 2018|newspaper=Intel ARK (Product Specs)}} 5. ^{{cite book|title=Intel 64 and IA-32 Architectures Software Developer's Manual Volume 1: Basic Architecture|publisher=Intel Corporation|page=349|edition=-051US|url=http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-1-manual.pdf|accessdate=August 23, 2014|chapter=14.9|quote=Memory arguments for most instructions with VEX prefix operate normally without causing #GP(0) on any byte-granularity alignment (unlike Legacy SSE instructions).}} 6. ^{{cite web|url=https://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/i386-and-x86-64-Options.html#i386-and-x86-64-Options|title=i386 and x86-64 Options - Using the GNU Compiler Collection (GCC)|accessdate=February 9, 2014}} 7. ^{{cite web |url=http://www.agner.org/optimize/microarchitecture.pdf |title=The microarchitecture of Intel, AMD and VIA CPUs: An optimization guide for assembly programmers and compiler makers |accessdate=October 17, 2016}} 8. ^{{cite web |url=https://chessprogramming.wikispaces.com/AVX2 |title=Chess programming AVX2 |accessdate=October 17, 2016}} 9. ^{{Cite web |url= http://www.extremetech.com/computing/80772-intel-offers-peek-at-nehalem-and-larrabee |title= Intel Offers Peek at Nehalem and Larrabee |date= March 17, 2008 |publisher= ExtremeTech}} 10. ^{{Cite web |url= http://ark.intel.com/products/63696/Intel-Core-i7-3960X-Processor-Extreme-Edition-%2815M-Cache-3_30-GHz%29 |title= Intel Core i7-3960X Processor Extreme Edition |accessdate= January 17, 2012}} 11. ^{{citation|url=http://developer.amd.com/2009/05/06/striking-a-balance/ |archive-url=https://archive.is/20131109140737/http://developer.amd.com/2009/05/06/striking-a-balance/ |dead-url=yes |archive-date=November 9, 2013 |title=Striking a balance |author=Dave Christie |publisher=AMD Developer blogs |date=May 7, 2009 |accessdate=January 17, 2012 }} 12. ^{{citation |url= http://developer.amd.com/wordpress/media/2012/10/New-Bulldozer-and-Piledriver-Instructions.pdf |title= New "Bulldozer" and "Piledriver" Instructions |publisher= AMD |date= October 2012}} 13. ^YASM 0.7.0 Release Notes http://yasm.tortall.net/releases/Release0.7.0.html 14. ^{{citation |url= http://svnweb.freebsd.org/base?view=revision&revision=230426 |title= Add support for the extended FPU states on amd64, both for native 64bit and 32bit ABIs |publisher= svnweb.freebsd.org |date= January 21, 2012 |accessdate= January 22, 2012}} 15. ^{{cite web |url= http://www.freebsd.org/releases/9.1R/announce.html |title= FreeBSD 9.1-RELEASE Announcement |accessdate= May 20, 2013}} 16. ^{{citation |url= https://git.kernel.org/linus/a30469e7921a6dd2067e9e836d7787cfa0105627 |title= x86: add linux kernel support for YMM state |accessdate= July 13, 2009}} 17. ^{{citation |url= http://kernelnewbies.org/Linux_2_6_30 |title= Linux 2.6.30 - Linux Kernel Newbies |accessdate= July 13, 2009}} 18. ^{{citation |url= https://twitter.com/comex/status/85401002349576192 |title= Twitter |accessdate= June 23, 2010}} {{Unreliable source?|date=January 2012}} 19. ^{{citation |url= http://marc.info/?l=openbsd-cvs&m=142697057503802&w=2 |title= Add support for saving/restoring FPU state using the XSAVE/XRSTOR. |accessdate= March 25, 2015}} 20. ^{{citation |url= http://msdn.microsoft.com/en-us/library/ff545910.aspx |title= Floating-Point Support for 64-Bit Drivers |accessdate= December 6, 2009}} 21. ^1 {{citation |url= http://software.intel.com/en-us/blogs/2011/06/13/haswell-new-instruction-descriptions-now-available/ |title= Haswell New Instruction Descriptions Now Available |publisher= Software.intel.com |date= |accessdate= January 17, 2012}} 22. ^1 2 {{cite web |url= https://software.intel.com/en-us/blogs/additional-avx-512-instructions |title= Additional AVX-512 instructions |date= July 17, 2014 |author= James Reinders |publisher= Intel |accessdate= August 3, 2014}} 23. ^1 {{cite web|url=https://software.intel.com/en-us/intel-architecture-instruction-set-extensions-programming-reference|title=Intel Architecture Instruction Set Extensions Programming Reference|publisher=Intel|format=PDF|accessdate=January 29, 2014}} 24. ^1 2 3 4 5 6 {{cite web|url=https://software.intel.com/en-us/intel-architecture-instruction-set-extensions-programming-reference|title=Intel® Architecture Instruction Set Extensions and Future Features Programming Reference|accessdate=October 16, 2017|publisher=Intel}} 25. ^{{Cite web|url=https://software.intel.com/en-us/articles/intel-software-development-emulator|title=Intel® Software Development Emulator {{!}} Intel® Software|website=software.intel.com|access-date=June 11, 2016}} 26. ^{{Cite web|url=https://gcc.gnu.org/gcc-4.9/changes.html#x86|title=GCC 4.9 Release Series — Changes, New Features, and Fixes{{snd}} GNU Project - Free Software Foundation (FSF)|website=gcc.gnu.org|language=en|access-date=April 3, 2017}} 27. ^{{Cite web|url=http://releases.llvm.org/3.9.0/docs/ReleaseNotes.html#id10|title=LLVM 3.9 Release Notes — LLVM 3.9 documentation|website=releases.llvm.org|access-date=April 3, 2017}} 28. ^{{Cite web|url=https://software.intel.com/en-us/articles/intel-parallel-studio-xe-2015-composer-edition-c-release-notes|title=Intel® Parallel Studio XE 2015 Composer Edition C++ Release Notes {{!}} Intel® Software|website=software.intel.com|language=en|access-date=April 3, 2017}} 29. ^{{Cite web|url=https://blogs.msdn.microsoft.com/vcblog/2017/07/11/microsoft-visual-studio-2017-supports-intel-avx-512/|language=en|title=Microsoft Visual Studio 2017 Supports Intel® AVX-512}} 30. ^{{Cite web|url=http://www.oracle.com/technetwork/java/javase/9-notes-3745703.html|language=en|title=JDK 9 Release Notes}} 31. ^{{Cite web |url= https://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=2c935842bdb46f5f557426feb4d2bdfdad1aa5f9 |archive-url= https://archive.is/20130415065954/https://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=2c935842bdb46f5f557426feb4d2bdfdad1aa5f9 |dead-url= yes |archive-date= April 15, 2013 |title= Linux RAID |date= February 17, 2013 |publisher= LWN }} 32. ^{{Cite web |title=Improving OpenSSL Performance|date=May 26, 2015|accessdate=February 28, 2017|url=https://software.intel.com/en-us/articles/improving-openssl-performance}} 33. ^{{Cite web |title=dav1d: performance and completion of the first release|date=November 21, 2018|accessdate=November 22, 2018|url=http://www.jbkempf.com/blog/post/2018/dav1d-toward-the-first-release}} 34. ^{{Cite web |title= Einstein@Home Applications | url= http://einsteinathome.org/apps.php}} 35. ^{{Cite web |title= Tensorflow 1.6 | url= https://github.com/tensorflow/tensorflow/releases/tag/v1.6.0}} External links
3 : X86 instructions|SIMD computing|Advanced Micro Devices technologies |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。