EPFL-LAP / dynamatic

DHLS (Dynamic High-Level Synthesis) compiler based on MLIR
Other
49 stars 14 forks source link

[Frontend] move polygeist check logic to frontend #106

Closed Jiahui17 closed 1 month ago

Jiahui17 commented 1 month ago

This PR moves the logic that checks if polygeist path is set from compile.sh to the frontend. There are two reasons for this change:

  1. Keep the shell script as simple as possible.

  2. If the polygeist path is empty and there are extra arguments after it, the positional argument $7 will not be an empty string, but rather the argument behind it.

A concrete example:

return execCmd(script, state.dynamaticPath, state.getKernelDir(),
                 state.getOutputDir(), state.getKernelName(), buffers,
                 floatToString(state.targetCP, 3), state.polygeistPath, use_sharing);

If there state.polygeistPath is an empty string, then the arguments passed to the shell script would be (the paths are simplified):

dynamatic dynamatic/integration-test/fir dynamatic/integration-test/fir/out fir 0 5.000 0

So there are only 7 arguments instead of 8 (somehow the empty string is ignored).

Jiahui17 commented 1 month ago

Thanks!