diff options
Diffstat (limited to 'test/monniaux')
-rw-r--r-- | test/monniaux/cycles.h | 2 | ||||
-rw-r--r-- | test/monniaux/loop_nest/syrk.c | 28 | ||||
-rw-r--r-- | test/monniaux/rules.mk | 6 | ||||
-rw-r--r-- | test/monniaux/scheduling/mal_schedule.c | 14 | ||||
-rw-r--r-- | test/monniaux/yarpgen/Makefile | 3 |
5 files changed, 48 insertions, 5 deletions
diff --git a/test/monniaux/cycles.h b/test/monniaux/cycles.h index 1f7a991a..f26060a7 100644 --- a/test/monniaux/cycles.h +++ b/test/monniaux/cycles.h @@ -6,7 +6,7 @@ typedef uint64_t cycle_t; #define PRcycle PRId64 -#include <../../k1-cos/include/hal/cos_registers.h> +#include <../../kvx-cos/include/hal/cos_registers.h> static inline void cycle_count_config(void) { diff --git a/test/monniaux/loop_nest/syrk.c b/test/monniaux/loop_nest/syrk.c new file mode 100644 index 00000000..490d0a01 --- /dev/null +++ b/test/monniaux/loop_nest/syrk.c @@ -0,0 +1,28 @@ +/* Include polybench common header. */ +#include "polybench.h" + +/* Include benchmark-specific header. */ +/* Default data type is double, default size is 4000. */ +#include "syrk.h" + +/* Main computational kernel. The whole function will be timed, + including the call and return. */ +void kernel_syrk(int ni, int nj, + DATA_TYPE alpha, + DATA_TYPE beta, + DATA_TYPE POLYBENCH_2D(C,NI,NI,ni,ni), + DATA_TYPE POLYBENCH_2D(A,NI,NJ,ni,nj)) +{ + int i, j, k; + + /* C := alpha*A*A' + beta*C */ +#if 0 + for (i = 0; i < _PB_NI; i++) + for (j = 0; j < _PB_NI; j++) + C[i][j] *= beta; +#endif + for (i = 0; i < _PB_NI; i++) + for (j = 0; j < _PB_NI; j++) + for (k = 0; k < _PB_NJ; k++) + C[i][j] += alpha * A[i][k] * A[j][k]; +} diff --git a/test/monniaux/rules.mk b/test/monniaux/rules.mk index f0db6afa..c0594ef9 100644 --- a/test/monniaux/rules.mk +++ b/test/monniaux/rules.mk @@ -24,12 +24,12 @@ ALL_GCCFLAGS+=$(ALL_CFLAGS) -std=c99 -Wextra -Werror=implicit ALL_CCOMPFLAGS+=$(ALL_CFLAGS) # The compilers -KVX_CC?=k1-cos-gcc +KVX_CC?=kvx-cos-gcc KVX_CCOMP?=ccomp # Command to execute -#EXECUTE_CYCLES?=timeout --signal=SIGTERM 3m k1-cluster --syscall=libstd_scalls.so --cycle-based -- -EXECUTE_CYCLES?=k1-cluster --syscall=libstd_scalls.so --cycle-based -- +#EXECUTE_CYCLES?=timeout --signal=SIGTERM 3m kvx-cluster --syscall=libstd_scalls.so --cycle-based -- +EXECUTE_CYCLES?=kvx-cluster --syscall=libstd_scalls.so --cycle-based -- # You can define up to GCC4FLAGS and CCOMP4FLAGS GCC0FLAGS?=$(ALL_GCCFLAGS) -O0 diff --git a/test/monniaux/scheduling/mal_schedule.c b/test/monniaux/scheduling/mal_schedule.c new file mode 100644 index 00000000..a6ba967f --- /dev/null +++ b/test/monniaux/scheduling/mal_schedule.c @@ -0,0 +1,14 @@ +#include <stdint.h> +int16_t meuh; +extern int uv_encode(double, double, int); +void f(int *ab, int e) { + uint32_t *ao = (uint32_t *)ab; + int16_t *aq = &meuh; + while (e) { + int ar, as; + ar = 1. / 2147483647; + as = uv_encode(5, *aq, *ab); + if (as) + *ao++ = ar; + } +} diff --git a/test/monniaux/yarpgen/Makefile b/test/monniaux/yarpgen/Makefile index 28bd5ae0..24dd19c3 100644 --- a/test/monniaux/yarpgen/Makefile +++ b/test/monniaux/yarpgen/Makefile @@ -1,5 +1,6 @@ TARGET_CCOMP=../../../ccomp TARGET_CC=gcc +#EXECUTE=kvx-cluster -- all: @@ -19,7 +20,7 @@ MAX=129 PREFIX=ran%06.f CCOMPOPTS=-static -CCOMPFLAGS+=-funprototyped -fbitfields -fno-cse2 -stdlib ../../../runtime # FIXME +CCOMPFLAGS+= -funprototyped -fbitfields -fno-cse2 -stdlib ../../../runtime TESTS_C=$(shell seq --format $(PREFIX)/func.c 1 $(MAX)) \ $(shell seq --format $(PREFIX)/driver.c 1 $(MAX)) \ |