dinhminhquoi / webm

Automatically exported from code.google.com/p/webm
0 stars 0 forks source link

[vpx] AVX/2 runtime detection is incomplete #790

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
v1.3.0-2840-g0249531

Currently only the bits for AVX/2 are being tested, not OSXSAVE nor the result 
from xgetbv (111b AVX2 / 11b AVX).

From:
https://software.intel.com/en-us/articles/introduction-to-intel-advanced-vector-
extensions

Detecting Availability and Support
Detection of support for the four areas-Intel® AVX, FMA, AES, and PCLMULQDQ-are
similar and require similar steps consisting of checking for hardware and
operating system support for the desired feature (see Table 1). These steps are
(counting bits starting at bit 0):

1) Verify that the operating system supports XGETBV using CPUID.1:ECX.OSXSAVE 
bit 27 = 1.
2) At the same time, verify that CPUID.1:ECX bit 28=1 (Intel AVX supported)
   and/or bit 25=1 (AES supported) and/or bit 12=1 (FMA supported) and/or bit 1=1
   (PCLMULQDQ) are supported.
3) Issue XGETBV, and verify that the feature-enabled mask at bits 1 and 2 are
   11b (XMM state and YMM state enabled by the operating system).

Original issue reported on code.google.com by jz...@google.com on 19 May 2014 at 7:47

GoogleCodeExporter commented 8 years ago
I misread the check for avx2 or confused it with avx-512, the xgetbv mask is 
the same as avx: 110b (6).

Original comment by jz...@google.com on 21 May 2014 at 4:42

GoogleCodeExporter commented 8 years ago

Original comment by renganat...@google.com on 9 Oct 2014 at 10:22

GoogleCodeExporter commented 8 years ago
https://gerrit.chromium.org/gerrit/#/c/73502

has been merged.

1345836 Merge "fix AVX & AVX2 detection"

Original comment by jz...@google.com on 21 Jan 2015 at 9:01

GoogleCodeExporter commented 8 years ago
one more fix for this, I converted the webp check improperly:

https://gerrit.chromium.org/gerrit/#/c/73581/

Original comment by jz...@google.com on 23 Jan 2015 at 10:16