hanchenye-llvm-project/polly
Roman Gareev be5299af0b Change the determination of parameters of macro-kernel
Typically processor architectures do not include an L3 cache, which means that
Nc, the parameter of the micro-kernel, is, for all practical purposes,
redundant ([1]). However, its small values can cause the redundant packing of
the same elements of the matrix A, the first operand of the matrix
multiplication. At the same time, big values of the parameter Nc can cause
segmentation faults in case the available stack is exceeded.

This patch adds an option to specify the parameter Nc as a multiple of
the parameter of the micro-kernel Nr.

In case of Intel Core i7-3820 SandyBridge and the following options,

clang -O3 gemm.c -I utilities/ utilities/polybench.c -DPOLYBENCH_TIME
-march=native -mllvm -polly -mllvm -polly-pattern-matching-based-opts=true
-DPOLYBENCH_USE_SCALAR_LB -mllvm -polly-target-cache-level-associativity=8,8
-mllvm -polly-target-cache-level-sizes=32768,262144 -mllvm
-polly-target-latency-vector-fma=8

it helps to improve the performance from 11.303 GFlops/sec (39,247% of
theoretical peak) to 17.896 GFlops/sec (62,14% of theoretical peak).

Refs.:

[1] - http://www.cs.utexas.edu/users/flame/pubs/TOMS-BLIS-Analytical.pdf

Reviewed-by: Tobias Grosser <tobias@grosser.es>

Differential Revision: https://reviews.llvm.org/D28019

llvm-svn: 290256
2016-12-21 12:51:12 +00:00
..
cmake Remove -fvisibility=hidden and FORCE_STATIC. 2016-09-12 18:25:00 +00:00
docs docs: Remove reference to PoCC 2016-05-17 19:44:16 +00:00
include/polly Add isl_multi_pw_aff to GICHelper 2016-12-16 23:41:26 +00:00
lib Change the determination of parameters of macro-kernel 2016-12-21 12:51:12 +00:00
test Change the determination of parameters of macro-kernel 2016-12-21 12:51:12 +00:00
tools GPURuntime: ensure compilation with C99 2016-09-11 07:32:50 +00:00
unittests Add unittests for foreach(Elt|Piece). NFC. 2016-12-07 17:48:02 +00:00
utils
www www: Add Loopy publication 2016-09-29 18:17:30 +00:00
.arcconfig Upgrade all the .arcconfigs to https. 2016-07-14 13:15:37 +00:00
.arclint
.gitattributes
.gitignore
CMakeLists.txt Remove POLLY_LINK_LIBS, it is not used 2016-11-04 00:32:32 +00:00
CREDITS.txt
LICENSE.txt Update copyright year to 2016. 2016-03-30 22:41:38 +00:00
README

README

Polly - Polyhedral optimizations for LLVM
-----------------------------------------
http://polly.llvm.org/

Polly uses a mathematical representation, the polyhedral model, to represent and
transform loops and other control flow structures. Using an abstract
representation it is possible to reason about transformations in a more general
way and to use highly optimized linear programming libraries to figure out the
optimal loop structure. These transformations can be used to do constant
propagation through arrays, remove dead loop iterations, optimize loops for
cache locality, optimize arrays, apply advanced automatic parallelization, drive
vectorization, or they can be used to do software pipelining.