Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 8121d27

Browse files
Mike KleinSkia Commit-Bot
Mike Klein
authored and
Skia Commit-Bot
committed
stick to 256-bit ymm on skx
I haven't yet seen it slower, and it ought to avoid the most egregious downclocking from zmm use. Still gets to use all the fancy AVX-512 new instructions, so it does seem to run faster than just targeting AVX2. Change-Id: I5738bc28c490619e0303813d69e00c8b6d7bb184 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274592 Auto-Submit: Mike Klein <[email protected]> Commit-Queue: Herb Derby <[email protected]> Reviewed-by: Herb Derby <[email protected]>
1 parent 15902a5 commit 8121d27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/SkVM.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1901,8 +1901,8 @@ namespace skvm {
19011901
auto mod = std::make_unique<llvm::Module>("", ctx);
19021902
// All the scary bare pointers from here on are owned by ctx or mod, I think.
19031903

1904-
const int K = (true && SkCpu::Supports(SkCpu::SKX)) ? 16 :
1905-
(true && SkCpu::Supports(SkCpu::HSW)) ? 8 : 4;
1904+
// Everything I've tested runs faster at K=8 (using ymm) than K=16 (zmm) on SKX machines.
1905+
const int K = (true && SkCpu::Supports(SkCpu::HSW)) ? 8 : 4;
19061906

19071907
llvm::Type *ptr = llvm::Type::getInt8Ty(ctx)->getPointerTo(),
19081908
*i32 = llvm::Type::getInt32Ty(ctx);

0 commit comments

Comments
 (0)