|
@@ -182,7 +182,11 @@ int main(int argc, char **argv)
|
|
/* Implementation of an engine */
|
|
/* Implementation of an engine */
|
|
max_engine_t *engine = max_load(maxfile, "*");
|
|
max_engine_t *engine = max_load(maxfile, "*");
|
|
|
|
|
|
- ...
|
|
|
|
|
|
+ starpu_init(NULL);
|
|
|
|
+
|
|
|
|
+ ... Task submission etc. ...
|
|
|
|
+
|
|
|
|
+ starpu_shutdown();
|
|
|
|
|
|
/* deallocate the set of actions */
|
|
/* deallocate the set of actions */
|
|
max_actions_free(act);
|
|
max_actions_free(act);
|
|
@@ -190,7 +194,7 @@ int main(int argc, char **argv)
|
|
/* unload and deallocate an engine obtained by way of max_load */
|
|
/* unload and deallocate an engine obtained by way of max_load */
|
|
max_unload(engine);
|
|
max_unload(engine);
|
|
|
|
|
|
- ...
|
|
|
|
|
|
+ return 0;
|
|
}
|
|
}
|
|
\endcode
|
|
\endcode
|
|
|
|
|
|
@@ -211,6 +215,8 @@ In the <c>main</c> function, there are four important steps:
|
|
- Free actions.
|
|
- Free actions.
|
|
- Unload and deallocate the DFE.
|
|
- Unload and deallocate the DFE.
|
|
|
|
|
|
|
|
+The rest of the application (data registration, task submission, etc.) is as usual with StarPU
|
|
|
|
+
|
|
\subsection FPGAConfiguration FPGA Configuration
|
|
\subsection FPGAConfiguration FPGA Configuration
|
|
|
|
|
|
To configure StarPU with FPGA accelerators, we can enable <c>FPGA</c> through the \c configure option <b>"--with-fpga"</b>.
|
|
To configure StarPU with FPGA accelerators, we can enable <c>FPGA</c> through the \c configure option <b>"--with-fpga"</b>.
|
|
@@ -238,7 +244,8 @@ $ export LD_LIBRARY_PATH=$MAXELEROSDIR/lib:$LD_LIBRARY_PATH
|
|
$ export SLIC_CONF="use_simulation=StreamFMA"
|
|
$ export SLIC_CONF="use_simulation=StreamFMA"
|
|
\endverbatim
|
|
\endverbatim
|
|
|
|
|
|
-- To disable the use of CPU cores, we can set the \ref STARPU_NCPU environment variable to 0.
|
|
|
|
|
|
+- To force tasks to be scheduled on the FPGA, one can disable the use of CPU
|
|
|
|
+cores by setting the \ref STARPU_NCPU environment variable to 0.
|
|
\verbatim
|
|
\verbatim
|
|
$ STARPU_NCPU=0 ./StreamFMA
|
|
$ STARPU_NCPU=0 ./StreamFMA
|
|
\endverbatim
|
|
\endverbatim
|