Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Issue 1892643003: Revert of Move CPU feature detection to its own file. (Closed)

Created:
4 years, 8 months ago by mtklein
Modified:
4 years, 8 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Revert of Move CPU feature detection to its own file. (patchset #7 id:120001 of https://codereview.chromium.org/1890483002/ ) Reason for revert: many unexpected GM diffs across GPU+CPU configs on Windows (hopefully just text masks on GPU?). seems like we pick a different srcover variant in some places. Original issue's description: > Move CPU feature detection to its own file. > > - Moves CPU feature detection to its own file. > - Cleans up some redundant feature detection scattered around core/ and opts/. > - Can now detect a few new CPU features: > * F16C -> Intel f16<->f32 instructions, added between AVX and AVX2 > * FMA -> Intel FMA instructions, added at the same time as AVX2 > * VFP_FP16 -> ARM f16<->f32 instructions, quite common > * NEON_FMA -> ARM FMA instructions, also quite common > * SSE and SSE3... why not? > > This new internal API makes it very cheap to do fine-grained runtime CPU > feature detection. Redundant calls to SkCpu::Supports() should be eliminated > and it's hoistable out of loops. It compiles away entirely when we have the > appropriate instructions available at compile time. > > This means we can call it to guard even a little snippet of 1 or 2 instructions > right where needed and let inlining hoist the check (if any at all) up to > somewhere that doesn't hurt performance. I've explained how I made this work > in the private section of the new header. > > Once this lands and bakes a bit, I'll start following up with CLs to use it more > and to add a bunch of those little 1-2 instruction snippets we've been wanting, > e.g. cvtps2ph, cvtph2ps, ptest, pmulld, pmovzxbd, blendvps, pshufb, roundps > (for floor) on x86, and vcvt.f32.f16, vcvt.f16.f32 on ARM. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1890483002 > CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot > > Committed: https://skia.googlesource.com/skia/+/872ea29357439f05b1f6995dd300fc054733e607 TBR=fmalita@chromium.org,herb@google.com,reed@google.com,mtklein@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Committed: https://skia.googlesource.com/skia/+/86498fbfcb93a9048bbe1c28cc0df40d8d0c96e9

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+306 lines, -239 lines) Patch
M gyp/core.gyp View 1 chunk +7 lines, -0 lines 0 comments Download
M gyp/core.gypi View 1 chunk +0 lines, -2 lines 0 comments Download
D src/core/SkCpu.h View 1 chunk +0 lines, -123 lines 0 comments Download
D src/core/SkCpu.cpp View 1 chunk +0 lines, -90 lines 0 comments Download
M src/core/SkOpts.cpp View 3 chunks +50 lines, -10 lines 0 comments Download
M src/core/SkUtilsArm.h View 2 chunks +9 lines, -5 lines 0 comments Download
M src/core/SkUtilsArm.cpp View 1 chunk +138 lines, -1 line 0 comments Download
M src/opts/opts_check_x86.cpp View 7 chunks +102 lines, -8 lines 0 comments Download

Messages

Total messages: 4 (1 generated)
mtklein
Created Revert of Move CPU feature detection to its own file.
4 years, 8 months ago (2016-04-15 15:40:06 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1892643003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1892643003/1
4 years, 8 months ago (2016-04-15 15:40:17 UTC) #2
commit-bot: I haz the power
4 years, 8 months ago (2016-04-15 15:40:25 UTC) #4
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://skia.googlesource.com/skia/+/86498fbfcb93a9048bbe1c28cc0df40d8d0c96e9

Powered by Google App Engine
This is Rietveld 408576698