Skip to content
Snippets Groups Projects
Commit dff48c32 authored by Yifan Zhao's avatar Yifan Zhao
Browse files

Added pipeline output in cava

parent d2b212ef
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,11 @@ int NUM_CLASSES;
int INPUT_DIM;
int NUM_WORKER_THREADS;
// Type of struct holding the return value from the last node.
struct RetStruct {
size_t bytesRet;
};
// Type of struct that is used to pass arguments to the HPVM dataflow graph
// using the hpvm launch operation
typedef struct __attribute__((__packed__)) {
......@@ -34,7 +39,8 @@ typedef struct __attribute__((__packed__)) {
float*coefs; size_t bytes_coefs;
float *l2_dist; size_t bytes_l2_dist;
float *tone_map; size_t bytes_tone_map;
size_t row_size; size_t col_size;
int row_size; int col_size;
struct RetStruct ret; // Instance of RetStruct holding the return value.
}
RootIn;
......@@ -807,6 +813,10 @@ int main(int argc, char* argv[]) {
__visc__wait(camPipeDFG);
printf("\n\nPipeline execution completed!\n");
printf(
"Pipeline final stage returned %lu; should be %lu\n",
rootArgs->ret.bytesRet, bytes_image
);
printf("\n\nRequesting memory!\n");
// Request data from graph.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment