diff options
Diffstat (limited to 'TRNS/include/dfatool_host.ah')
-rw-r--r-- | TRNS/include/dfatool_host.ah | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/TRNS/include/dfatool_host.ah b/TRNS/include/dfatool_host.ah new file mode 100644 index 0000000..72978cc --- /dev/null +++ b/TRNS/include/dfatool_host.ah @@ -0,0 +1,36 @@ +#pragma once + +#include <sys/time.h> +#include "dfatool_host_dpu.ah" + +aspect DfatoolHostTiming : public DfatoolHostDPUTiming { + + unsigned int n_rows_outer, n_rows_tile, n_cols_outer, n_cols_tile; + unsigned int element_size; + + virtual int getKernel() { return kernel; } + + DfatoolHostTiming() { + element_size = sizeof(T); + } + + advice call("% input_params(...)") : after() { + Params* p = tjp->result(); + /* + * Input: (M_ * m) × (N_ * n) matrix + */ + n_rows_outer = p->M_; + n_rows_tile = p->m; + n_cols_outer = p->N_; + n_cols_tile = p->n; + printf("[>>] TRNS | n_dpus=%u n_rows_outer=%u n_rows_tile=%u n_cols_outer=%u n_cols_tile=%u\n", NR_DPUS, n_rows_outer, n_rows_tile, n_cols_outer, n_cols_tile); + } + + advice call("% trns_host(...)") : after() { + printf("[--] TRNS | n_dpus=%u n_rows_outer=%u n_rows_tile=%u n_cols_outer=%u n_cols_tile=%u\n", NR_DPUS, n_rows_outer, n_rows_tile, n_cols_outer, n_cols_tile); + } + + advice execution("% main(...)") : after() { + printf("[<<] TRNS | n_dpus=%u n_rows_outer=%u n_rows_tile=%u n_cols_outer=%u n_cols_tile=%u\n", NR_DPUS, n_rows_outer, n_rows_tile, n_cols_outer, n_cols_tile); + } +}; |