Closed chhzh123 closed 2 years ago
Hi @chhzh123, I pushed a small patch to fix this issue - https://github.com/hanchenye/scalehls/commit/0f9627a9f203de26c793888c195f262b83847e0f.
Basically, ScaleHLS DSE is not supporting iter_args
currently, so we always apply materialize-reduction
and buffer-loop-hoisting
in the scalehls-dse-pipeline
to remove iter_args
and hoist the generated local buffers outside of the loop nest. However, the materialize-reduction
pass can generate some redundant memory loads and stores, which may decrease the performance the DSE can achieve. For now, we don't have a optimization pass to remove these redundancies.
For the parsing result difference between ++
and += 1
in mlir-clang
, I'm not sure whether this is intended or actually an issue to resolve. Could you open an issue in the Polygeist repository for this if it is not already existed?
Okay, thanks a lot! I'll file an issue in the Polygeist repository.
This is somehow a weird problem. I wanted to generate the HLS code for the following input program (a simple convolutional layer), but the DSE engine crashed.
However, if I use
++
to increment instead of+=1
, this problem will not occur. For comparison, the MLIR assembly of the+=1
version is shown below.while the
++
version does not useiter_args
. I don't know why this is the case.