diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/kvx/instr/Makefile | 10 | ||||
-rw-r--r-- | test/kvx/interop/Makefile | 6 | ||||
-rw-r--r-- | test/kvx/lib/Makefile | 6 | ||||
-rw-r--r-- | test/kvx/mmult/Makefile | 8 | ||||
-rw-r--r-- | test/kvx/prng/Makefile | 5 | ||||
-rw-r--r-- | test/kvx/sort/Makefile | 13 | ||||
-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 |
11 files changed, 78 insertions, 23 deletions
diff --git a/test/kvx/instr/Makefile b/test/kvx/instr/Makefile index e4f964b3..fce32178 100644 --- a/test/kvx/instr/Makefile +++ b/test/kvx/instr/Makefile @@ -1,15 +1,15 @@ SHELL := /bin/bash -KVXC ?= k1-cos-gcc +KVXC ?= kvx-elf-gcc CC ?= gcc CCOMP ?= ccomp OPTIM ?= -O2 CFLAGS ?= $(OPTIM) CCOMPFLAGS ?= $(CFLAGS) -SIMU ?= k1-mppa +SIMU ?= kvx-mppa TIMEOUT ?= --signal=SIGTERM 120s DIFF ?= python2.7 floatcmp.py -reltol .00001 -HARDRUN ?= k1-jtag-runner +HARDRUN ?= kvx-jtag-runner DIR=./ SRCDIR=$(DIR) @@ -64,7 +64,7 @@ simutest: $(X86_GCC_OUT) $(GCC_SIMUOUT) x86out=$(OUTDIR)/$$test.x86-gcc.out;\ gccout=$(OUTDIR)/$$test.gcc.simu.out;\ if grep "__KVX__" -q $$test.c; then\ - printf "$(YELLOW)UNTESTED: $$test.c contains an \`#ifdef __KVX__\`\n";\ + printf "$(YELLOW)UNTESTED: $$test.c contains an \`#ifdef __KVX__\`\n$(NC)";\ elif $(DIFF) $$x86out $$gccout > /dev/null; test $${PIPESTATUS[0]} -ne 0; then\ >&2 printf "$(RED)ERROR: $$x86out and $$gccout differ$(NC)\n";\ else\ @@ -92,7 +92,7 @@ hardtest: $(X86_GCC_OUT) $(GCC_HARDOUT) x86out=$(OUTDIR)/$$test.x86-gcc.out;\ gccout=$(OUTDIR)/$$test.gcc.hard.out;\ if grep "__KVX__" -q $$test.c; then\ - printf "$(YELLOW)UNTESTED: $$test.c contains an \`#ifdef __KVX__\`\n";\ + printf "$(YELLOW)UNTESTED: $$test.c contains an \`#ifdef __KVX__\`\n$(NC)";\ elif $(DIFF) $$x86out $$gccout > /dev/null; test $${PIPESTATUS[0]} -ne 0; then\ >&2 printf "$(RED)ERROR: $$x86out and $$gccout differ$(NC)\n";\ else\ diff --git a/test/kvx/interop/Makefile b/test/kvx/interop/Makefile index a0d4d7da..aa018aac 100644 --- a/test/kvx/interop/Makefile +++ b/test/kvx/interop/Makefile @@ -1,12 +1,12 @@ SHELL := /bin/bash -KVXC ?= k1-cos-gcc +KVXC ?= kvx-elf-gcc CC ?= gcc CCOMP ?= ccomp CFLAGS ?= -O2 -Wno-varargs -SIMU ?= k1-mppa +SIMU ?= kvx-mppa TIMEOUT ?= --signal=SIGTERM 120s -HARDRUN ?= k1-jtag-runner +HARDRUN ?= kvx-jtag-runner DIR=./ SRCDIR=$(DIR) diff --git a/test/kvx/lib/Makefile b/test/kvx/lib/Makefile index 5a947bb3..7df7dd16 100644 --- a/test/kvx/lib/Makefile +++ b/test/kvx/lib/Makefile @@ -1,10 +1,10 @@ -KVXC ?= k1-cos-gcc -K1AR ?= k1-cos-ar +KVXC ?= kvx-elf-gcc +K1AR ?= kvx-elf-ar CC ?= gcc AR ?= gcc-ar CCOMP ?= ccomp CFLAGS ?= -O1 -Wl,--wrap=printf -SIMU ?= k1-mppa +SIMU ?= kvx-mppa TIMEOUT ?= --signal=SIGTERM 60s DIR=./ diff --git a/test/kvx/mmult/Makefile b/test/kvx/mmult/Makefile index e7cd890e..252f8911 100644 --- a/test/kvx/mmult/Makefile +++ b/test/kvx/mmult/Makefile @@ -1,8 +1,8 @@ -KVXC ?= k1-cos-gcc +KVXC ?= kvx-elf-gcc CC ?= gcc CCOMP ?= ccomp CFLAGS ?= -O2 -SIMU ?= k1-mppa +SIMU ?= kvx-mppa TIMEOUT ?= 10s KVXCPATH=$(shell which $(KVXC)) @@ -65,3 +65,7 @@ check: $(CCOMP_OUT) $(STUB_OUT) else\ echo "GOOD kvx: $< succeeded";\ fi + +.PHONY: +clean: + rm -f *.out mmult-test-ccomp-kvx mmult-test-gcc-kvx mmult-test-gcc-x86 diff --git a/test/kvx/prng/Makefile b/test/kvx/prng/Makefile index 68e5ffc9..b97f4aa4 100644 --- a/test/kvx/prng/Makefile +++ b/test/kvx/prng/Makefile @@ -1,8 +1,8 @@ -KVXC ?= k1-cos-gcc +KVXC ?= kvx-elf-gcc CC ?= gcc CCOMP ?= ccomp CFLAGS ?= -O2 -SIMU ?= k1-mppa +SIMU ?= kvx-mppa TIMEOUT ?= 10s KVXCPATH=$(shell which $(KVXC)) @@ -67,3 +67,4 @@ check: $(CCOMP_OUT) $(STUB_OUT) .PHONY: clean: rm -f prng-test-gcc-x86 prng-test-gcc-kvx prng-test-ccomp-kvx + rm -f *.out diff --git a/test/kvx/sort/Makefile b/test/kvx/sort/Makefile index c4090352..46a8f025 100644 --- a/test/kvx/sort/Makefile +++ b/test/kvx/sort/Makefile @@ -1,9 +1,9 @@ -KVXC ?= k1-cos-gcc +KVXC ?= kvx-elf-gcc CC ?= gcc CCOMP ?= ccomp CFLAGS ?= -O2 -SIMU ?= k1-mppa -TIMEOUT ?= 10s +SIMU ?= kvx-mppa +TIMEOUT ?= 20s KVXCPATH=$(shell which $(KVXC)) CCPATH=$(shell which $(CC)) @@ -89,3 +89,10 @@ check: $(STUB_OUT) $(CCOMP_OUT) echo "GOOD kvx: $$test succeeded";\ fi;\ done + +.PHONY: +clean: + for test in insertion main merge selection; do\ + rm -f $$test-ccomp-kvx $$test-gcc-kvx $$test-gcc-x86;\ + done + rm -f *.out 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)) \ |