Open sul243 opened 8 months ago
I also have the same problem, have you fixed it?
Honestly I ended up using the docker image.
Resnet18 does not work for this tool as well.
I used the docker image, both Resnet18 and mobilenet do not work, an issue happened to the Lenet, because the comment slash can not be recognized in the lenet.sv.
I used the docker image, and both Resnet18 and mobilenet do not work, an issue happened to the Lenet because the comment slash can not be recognized in the lenet.sv.
Yeah, so you are correct. None of the models you mentioned work. However, I was able to get Lenet working by contacting the creator of the tool, however, even when I was able to get the sv file for the Lenet it was not able to synthesize. I recommend using one of the simple nns in simple_nns.py.
After compiling the resnet18.mlir file I get an error when I try to compile the .sv file for this example. Mainly it failes when it tries to translate the mlir file back to Python.
Here is the command I run to generate resnet18.mlir:
OPENHLS_CONFIG_FP=$(pwd)/openhls_config.ini python $(pwd)/examples/full_nns.py resnet18 12
Here is the command I run to generate the .sv file:
OPENHLS_CONFIG_FP=$(pwd)/openhls_config.ini openhls_compiler $(pwd)/examples/resnet18_12/resnet18.mlir -t -r -s -v -b
Here is the error:
Traceback (most recent call last): File "/usr/local/bin/openhls_compiler", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.10/site-packages/openhls/compiler/compile.py", line 333, in main
compile(
File "/usr/local/lib/python3.10/site-packages/openhls/compiler/compile.py", line 134, in compile
pythonized_mlir = translate(affine_mlir_str)
File "/usr/local/lib/python3.10/site-packages/openhls/compiler/compile.py", line 43, in translate
raise Exception(f"translation failed {err.decode()}")
Exception: translation failed :149:11: error: 'memref.subview' op is unsupported operation.
%23 = memref.subview %22[0, 0, 1, 1] [1, 3, 12, 12] [1, 1, 1, 1] : memref<1x3x14x14xf32> to memref<1x3x12x12xf32, #map0>
^