And this mlir can run with mlir-runner with success.
(py38) ➜ mnist-mlir mlir-opt mnist.mlir --lower-affine -convert-scf-to-cf -convert-linalg-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts | mlir-cpu-runner -O3 -e entry -entry-point-result=void -shared-libs=/home/lay/work/llvm-study/llvm-project/build/lib/libmlir_runner_utils.so
Unranked Memref base@ = 0x5586bc4f8900 rank = 2 offset = 0 sizes = [1, 10] strides = [10, 1] data =
[[84.3589, -71.8258, -2.66961, -23.2588, -22.6759, 9.23774, 18.8853, -13.7729, -2.07476, 0.823274]]
Found Vitis at /data/Xilinx/Vitis/2021.2
chess-clang: warning: argument unused during compilation: '-I /data/Xilinx/Vitis/2021.2/aietools/data/cervino/lib' [-Wunused-command-line-argument]
chess-clang: warning: argument unused during compilation: '-I /data/Xilinx/Vitis/2021.2/aietools/data/cervino/lib/runtime_cxx/libcxx-lite/include' [-Wunused-command-line-argument]
chess-clang: warning: argument unused during compilation: '-I /data/Xilinx/Vitis/2021.2/aietools/data/cervino/lib/runtime_cxx/libs/libcxx-9.0.0/include-lite' [-Wunused-command-line-argument]
chess-clang: warning: argument unused during compilation: '-I /data/Xilinx/Vitis/2021.2/aietools/data/cervino/lib/runtime/include' [-Wunused-command-line-argument]
chess-clang: warning: argument unused during compilation: '-include aie_core.h' [-Wunused-command-line-argument]
warning: overriding the module target triple with pdarch-unknown-unknown-elf [-Woverride-module]
1 warning generated.
Warning in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 9269, column 13: loop count of type `unsigned long long' is converted to `w32' via `int', the first stage of which is non-nil
Warning in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 19963, column 14: loop count of type `unsigned long long' is converted to `w32' via `int', the first stage of which is non-nil
Warning in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 9219, column 13: (approximate): uninitialized variable `__tmp' is used (unconditionally) by `r_update_dint_low (internal)' (sig .67061 used by opn <90477> in arg 1)
Warning in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 9339, column 13: (approximate): uninitialized variable `__tmp' is used (unconditionally) by `r_update_dint_low (internal)' (sig .67210 used by opn <90668> in arg 1)
Warning in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 15: (approximate): uninitialized variable `__tmp' is used (unconditionally) by `r_update_dint_low (internal)' (sig .67255 used by opn <90721> in arg 1)
Warning in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 19913, column 14: (approximate): uninitialized variable `__tmp' is used (unconditionally) by `r_update_dint_low (internal)' (sig .67585 used by opn <91129> in arg 1)
Warning in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 20034, column 14: (approximate): uninitialized variable `__tmp' is used (unconditionally) by `r_update_dint_low (internal)' (sig .67734 used by opn <91320> in arg 1)
Warning in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 20082, column 14: (approximate): uninitialized variable `__tmp' is used (unconditionally) by `r_update_dint_low (internal)' (sig .67779 used by opn <91373> in arg 1)
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 9216, column 13: undefined operation `operator void *(unsigned long long)' <50701> remaining after optimisation, used by:
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 15: (approximate): ... 2nd argument of `entry (internal)' <75486>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 9339, column 13: undefined operation `operator void *(unsigned long long)' <50833> remaining after optimisation, used by:
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 15: (approximate): ... 2nd argument of `entry (internal)' <75562>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 9447, column 13: ... 1st argument of `void *add(void *, amod)' <91039>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 9447, column 13: ... 1st argument of `void *add(void *, amod)' <91080>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 9447, column 13: ... 1st argument of `void *add(void *, amod)' <93427>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 9387, column 13: undefined operation `operator void *(unsigned long long)' <50878> remaining after optimisation, used by:
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 15: (approximate): ... 2nd argument of `entry (internal)' <75661>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 19952, column 5: (approximate): ... 1st argument of `void *add(void *, amod)' <92161>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 19912, column 14: undefined operation `operator void *(unsigned long long)' <51060> remaining after optimisation, used by:
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 15: (approximate): ... 2nd argument of `entry (internal)' <75874>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 20034, column 14: undefined operation `operator void *(unsigned long long)' <51174> remaining after optimisation, used by:
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 15: (approximate): ... 2nd argument of `entry (internal)' <76081>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 20082, column 14: undefined operation `operator void *(unsigned long long)' <51414> remaining after optimisation, used by:
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 15: (approximate): ... 2nd argument of `entry (internal)' <76823>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 20161, column 14: ... 1st argument of `void *add(void *, amod)' <91405>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 20161, column 14: ... 1st argument of `void *add(void *, amod)' <91412>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 20161, column 14: ... 1st argument of `void *add(void *, amod)' <91419>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 20161, column 14: ... 1st argument of `void *add(void *, amod)' <91426>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 20161, column 14: ... 1st argument of `void *add(void *, amod)' <91433>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 20161, column 14: ... 1st argument of `void *add(void *, amod)' <91440>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 20161, column 14: ... 1st argument of `void *add(void *, amod)' <91447>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 20161, column 14: ... 1st argument of `void *add(void *, amod)' <91454>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 20161, column 14: ... 1st argument of `void *add(void *, amod)' <91461>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 20161, column 14: ... 1st argument of `void *add(void *, amod)' <91468>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 20161, column 14: ... 1st argument of `void *add(void *, amod)' <91475>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 20161, column 14: ... 1st argument of `void *add(void *, amod)' <91482>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 20161, column 14: ... 1st argument of `void *add(void *, amod)' <91489>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 20161, column 14: ... 1st argument of `void *add(void *, amod)' <91496>
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 20161, column 14: ... 1st argument of `void *add(void *, amod)' <91503>
Error:
... conversions to built-in types (even when not represented) may be due to a unique, but inappropriate, C++ matching, e.g.,
... t @ i ...becoming... t @ (T)(double)i ...
Error in "/home/lay/work/aie-mlir-tutorial/demo/acdc_project/core_1_3.opt.mlir", line 15: (imprecise line-number, the error occurred somewhere in this function): variable __tmp (581) of unrepresented type `dint' remaining after optimisation
*** fatal error -- giving up
This error occurred while running: noodle -I/data/Xilinx/Vitis/2021.2/aietools/data/cervino/lib -I/data/Xilinx/Vitis/2021.2/aietools/data/cervino/lib/isg -I/data/Xilinx/Vitis/2021.2/aietools/data/cervino/lib/runtime_cxx/libcxx-lite/include -I/data/Xilinx/Vitis/2021.2/aietools/data/cervino/lib/runtime_cxx/libs/libcxx-9.0.0/include-lite -I/data/Xilinx/Vitis/2021.2/aietools/data/cervino/lib/runtime/include +Oitm -iaie_core.h +Sinl +Olbb=200 +Opmsa +Olzyinl +wchesswork18104 chesswork18104/core_1_3.chesslinked.sfg +Q1=+Sinl,+Olbb=200,+Opmsa,+Olzyinl +Q2=+Sinl,+Olbb=200,+Opmsa,+Olzyinl +Q3=+Sinl,+Olbb=1000,+Opmsa,+Olzyinl +Qfast=+Sinl,+Olbb=1000,+Opmsa,+Olzyinl,+Opfp +Qs=+Sinl,+Olbb=200,+Opmsa,+Olzyinl +Qz=+Sinl,+Olbb=200,+Opmsa,+Olzyinl me
xchesscc Failed No such device
The Program xchesscc has encountered an unexpected error exiting ... xchesscc Failed No such device
Error encountered while running: xchesscc_wrapper -d -f +P 4 acdc_project/core_1_3.chesslinked.ll +l acdc_project/core_1_3.bcf -o ./core_1_3.elf