EPFL-LAP / dynamatic

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

[Buffers] Warnings on the buffering property violations when using --simple-buffers #124

Closed Jiahui17 closed 3 months ago

Jiahui17 commented 3 months ago

Benchmarks: test_memory_11, test_memory_8,

To reproduce the bug:

dynamatic> set-dynamatic-path ./dynamatic;     set-src ./dynamatic/integration-test/memory/test_memory_11/test_memory_11.c;     set-clock-period 4;     compile --simple-buffers;     write-hdl --hdl vhdl;     simulate;     # synthesize;     exit

Issue:

[INFO] Launching Dynamatic on benchmark ./dynamatic/integration-test/memory/test_memory_8/test_memory_8.c...
Args: ./dynamatic/bin/dynamatic --exit-on-failure --debug
dynamatic> set-dynamatic-path ./dynamatic;     set-src ./dynamatic/integration-test/memory/test_memory_8/test_memory_8.c;     set-clock-period 4;     compile --simple-buffers;     write-hdl --hdl vhdl;     simulate;     # synthesize;     exit
[INFO] Compiled source to affine
[INFO] Ran memory analysis
[INFO] Compiled affine to scf
[INFO] Compiled scf to cf
[INFO] Applied standard transformations to cf
[INFO] Applied Dynamatic transformations to cf
[INFO] Compiled cf to handshake
[INFO] Applied transformations to handshake
/home/jxu/Repositories/dhls-utils/./dynamatic/integration-test/memory/test_memory_8/out/comp/handshake_transformed.mlir:82:29: warning: Cannot place transparent buffer on merge-like operation's output due to channel-specific buffering constraints. This may yield an invalid buffering.
    %result_24, %index_25 = control_merge %falseResult_3  {handshake.bb = 5 : ui32, handshake.name = "control_merge4"} : <>, <i1>
                            ^
/home/jxu/Repositories/dhls-utils/./dynamatic/integration-test/memory/test_memory_8/out/comp/handshake_transformed.mlir:82:29: note: see current operation: %result_24, %index_25 = handshake.control_merge %falseResult_3  {handshake.bb = 5 : ui32, handshake.name = "control_merge4"} : <>, <i1>
/home/jxu/Repositories/dhls-utils/./dynamatic/integration-test/memory/test_memory_8/out/comp/handshake_transformed.mlir:82:29: warning: Cannot place opaque buffer on merge-like operation's output due to channel-specific buffering constraints. This may yield an invalid buffering.
    %result_24, %index_25 = control_merge %falseResult_3  {handshake.bb = 5 : ui32, handshake.name = "control_merge4"} : <>, <i1>
                            ^
/home/jxu/Repositories/dhls-utils/./dynamatic/integration-test/memory/test_memory_8/out/comp/handshake_transformed.mlir:82:29: note: see current operation: %result_24, %index_25 = handshake.control_merge %falseResult_3  {handshake.bb = 5 : ui32, handshake.name = "control_merge4"} : <>, <i1>
[INFO] Applied transformations to handshake
/home/jxu/Repositories/dhls-utils/./dynamatic/integration-test/memory/test_memory_11/out/comp/handshake_transformed.mlir:69:29: warning: Cannot place transparent buffer on merge-like operation's output due to channel-specific buffering constraints. This may yield an invalid buffering.
    %result_18, %index_19 = control_merge %falseResult_17  {handshake.bb = 3 : ui32, handshake.name = "control_merge2"} : <>, <i1>
                            ^
/home/jxu/Repositories/dhls-utils/./dynamatic/integration-test/memory/test_memory_11/out/comp/handshake_transformed.mlir:69:29: note: see current operation: %result_18, %index_19 = handshake.control_merge %falseResult_17  {handshake.bb = 3 : ui32, handshake.name = "control_merge2"} : <>, <i1>
/home/jxu/Repositories/dhls-utils/./dynamatic/integration-test/memory/test_memory_11/out/comp/handshake_transformed.mlir:69:29: warning: Cannot place opaque buffer on merge-like operation's output due to channel-specific buffering constraints. This may yield an invalid buffering.
    %result_18, %index_19 = control_merge %falseResult_17  {handshake.bb = 3 : ui32, handshake.name = "control_merge2"} : <>, <i1>
                            ^
/home/jxu/Repositories/dhls-utils/./dynamatic/integration-test/memory/test_memory_11/out/comp/handshake_transformed.mlir:69:29: note: see current operation: %result_18, %index_19 = handshake.control_merge %falseResult_17  {handshake.bb = 3 : ui32, handshake.name = "control_merge2"} : <>, <i1>
[INFO] Placed simple buffers
[INFO] Canonicalized handshake
export-dot: /opt/polygeist/llvm-project/llvm/include/llvm/Support/Casting.h:566: decltype(auto) llvm::cast(const From &) [To = mlir::detail::TypedValue<mlir::MemRefType>, From = mlir::Value]: Assertion `isa<To>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: /home/jxu/Repositories/dhls-utils/./dynamatic/bin/export-dot /home/jxu/Repositories/dhls-utils/./dynamatic/integration-test/memory/test_memory_11/out/comp/handshake_export.mlir --edge-style=spline
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):