pku-liang / HASCO

agile hardware-software co-design
Apache License 2.0
44 stars 8 forks source link

How to enable the chisel generator as announced in the paper #4

Open cheati opened 3 years ago

cheati commented 3 years ago

I am trying to learn about the implementation of the chisel generator. Can @walkershaw help me to locate it? Thanks a lot!

walkershaw commented 3 years ago

Hi @cheati, our Chisel generator is also open-source now at here. In this version, they are still separated. They would be integrated together in the following versions.

cheati commented 3 years ago

Thanks!

shz0116 commented 3 years ago

Wondering whether the results of HASCO can be directly used as the inputs of TensorLib ? Is there an example ? Thanks.

walkershaw commented 3 years ago

Wondering whether the results of HASCO can be directly used as the inputs of TensorLib ? Is there an example ? Thanks.

Hi there @shz0116, we've made some integration in the micro tutorial branch. Please wait for @semiwaker to update the example.

semiwaker commented 3 years ago

First, you need to checkout to the micro_tutorial branch. After running, you can see some JSON files in rst\hardware directory. The JSON files are the inputs of Tensorlib. If the path is correctly configured, you can also see the Verilog files output by Tensorlib. Input JSON fils example:

{
  "benchmark":"GEMM",
  "bitwidth": 16,
  "length": [8,8,8],
  "STT":[[1,0,0],[0,1,0],[1,1,1]]
}

You can use sbt "runmain tensorlib.ParseJson <filename>.json <output_filename>.v" in the Tensorlib directory to run it.

However, this interface is a restricted version that is meant to be used by HASCO. Tensorlib itself has a better user interface that supports a wide range of benchmarks. I recommend you use that instead. For more details, please see the slides at our website.

shz0116 commented 3 years ago

Thanks a lot for the quick reply. I will give a try and let you the progress. @semiwaker @walkershaw