summaryrefslogtreecommitdiff
path: root/VA
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-05-14 16:03:27 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2025-05-14 16:09:20 +0200
commit55f2653aafa38ea1d53a43c104185218e0dad1f1 (patch)
tree9e550665102e5543be8186b259586a69e7c8b83f /VA
parentc2819a30f6914267e5792b68ca8a500f0e06ce79 (diff)
Use benchmark-specific input descriptions rather than opaque "#elements"
Diffstat (limited to 'VA')
-rw-r--r--VA/Makefile2
-rw-r--r--VA/host/app.c4
-rw-r--r--VA/include/dfatool_host.ah12
3 files changed, 10 insertions, 8 deletions
diff --git a/VA/Makefile b/VA/Makefile
index 5d2df1c..e0d392f 100644
--- a/VA/Makefile
+++ b/VA/Makefile
@@ -12,7 +12,7 @@ HOST_SOURCES := $(wildcard host/*.c)
DPU_SOURCES := $(wildcard dpu/*.c)
aspectc ?= 0
-aspectc_timing ?= *
+aspectc_timing ?= 0
dfatool_timing ?= 1
HOST_CC := ${CC}
diff --git a/VA/host/app.c b/VA/host/app.c
index 04f1971..27a64f2 100644
--- a/VA/host/app.c
+++ b/VA/host/app.c
@@ -47,8 +47,6 @@ static T *B;
static T *C;
static T *C2;
-unsigned int kernel;
-
// Create input arrays
static void read_input(T *A, T *B, unsigned long int nr_elements)
{
@@ -202,7 +200,7 @@ int main(int argc, char **argv)
start(&timer, 3, 0);
}
// Input arguments
- kernel = 0;
+ unsigned int kernel = 0;
dpu_arguments_t input_arguments[NR_DPUS];
for (i = 0; i < nr_of_dpus - 1; i++) {
input_arguments[i].size =
diff --git a/VA/include/dfatool_host.ah b/VA/include/dfatool_host.ah
index de781f3..e74f466 100644
--- a/VA/include/dfatool_host.ah
+++ b/VA/include/dfatool_host.ah
@@ -4,6 +4,10 @@
#include "dfatool_host_dpu.ah"
aspect DfatoolHostTiming : public DfatoolHostDPUTiming {
+ unsigned long n_rows;
+ unsigned int element_size;
+
+ virtual int getKernel() { return 1; }
DfatoolHostTiming() {
element_size = sizeof(T);
@@ -11,15 +15,15 @@ aspect DfatoolHostTiming : public DfatoolHostDPUTiming {
advice call("% input_params(...)") : after() {
Params* p = tjp->result();
- input_size = p->input_size;
- printf("[>>] VA | n_dpus=%u n_elements=%lu\n", NR_DPUS, input_size);
+ n_rows = p->input_size;
+ printf("[>>] VA | n_dpus=%u n_rows=%lu\n", NR_DPUS, n_rows);
}
advice call("% vector_addition_host(...)") : after() {
- printf("[--] VA | n_dpus=%u n_elements=%lu\n", n_dpus, input_size);
+ printf("[--] VA | n_dpus=%u n_rows=%lu\n", n_dpus, n_rows);
}
advice execution("% main(...)") : after() {
- printf("[<<] VA | n_dpus=%u n_elements=%lu\n", NR_DPUS, input_size);
+ printf("[<<] VA | n_dpus=%u n_rows=%lu\n", NR_DPUS, n_rows);
}
};