Commit c355682d authored by THIBAULT Samuel's avatar THIBAULT Samuel
Browse files

Fix optimization and benchmark more than one tile size

parent 2070f0d0
Pipeline #217391 passed with stages
in 1 minute and 29 seconds
......@@ -3,7 +3,7 @@ STARPU_VERSION=1.3
CPPFLAGS += $(shell pkg-config --cflags starpu-$(STARPU_VERSION))
LDLIBS += $(shell pkg-config --libs starpu-$(STARPU_VERSION))
CFLAGS += -Wall -Wextra
CFLAGS += -O3 -Wall -Wextra
# to avoid having to use LD_LIBRARY_PATH
LDLIBS += -Wl,-rpath -Wl,$(shell pkg-config --variable=libdir starpu-$(STARPU_VERSION))
......
/* StarPU --- Runtime system for heterogeneous multicore architectures.
*
* Copyright (C) 2010-2011, 2013-2014, 2020 Université de Bordeaux 1
* Copyright (C) 2010-2011, 2013-2014, 2020-2021 Université de Bordeaux 1
* Copyright (C) 2010 Mehdi Juhoor <mjuhoor@gmail.com>
* Copyright (C) 2010, 2011, 2012, 2013, 2014 Centre National de la Recherche Scientifique
*
......@@ -59,6 +59,7 @@ int main(int argc, char **argv)
{
int ret;
unsigned ncpus, n, i;
unsigned dim;
parse_args(argc, argv);
......@@ -79,10 +80,14 @@ int main(int argc, char **argv)
/* Run about 30 tasks per CPU core */
n = ncpus * 30 / (nslicesx * nslicesy) + 1;
for (dim = 128; dim <= 4096; dim *= 2)
{
float *A[n], *B[n], *C[n];
starpu_data_handle_t A_handle[n], B_handle[n], C_handle[n];
xdim = ydim = dim;
printf("calibrating tile size %dx%d\n", dim / nslicesx, dim / nslicesy);
for (i = 0; i < n; i++)
{
/* initialize matrices A, B and C and register them to StarPU */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment