StanfordAHA / Halide-to-Hardware

Other
74 stars 12 forks source link

Cleaned up support for muxes on multi channel stencils #64

Closed dillonhuff closed 4 years ago

dillonhuff commented 4 years ago

@jeffsetter this pull request cleans up and generalizes some of the mux handling in the HLS code generator.

dillonhuff commented 4 years ago

@joyliu37 I think a recent change you made to the makefile of the buffermapping repo has caused an error if you look at the most recent travis log there is an error compiling the unified buffer library:

Cloning into 'BufferMapping'...

g++ -Wall -std=c++11 -fpic -undefined dynamic_lookup -Iinclude -I/GarnetFlow/scripts/coreir/include -c src/access.cpp -L/GarnetFlow/scripts/coreir/lib -Wl,-rpath,/GarnetFlow/scripts/coreir/lib -lcoreir-commonlib -lcoreir -lcoreirsim -lcoreir-float -o bin/access.o

g++: error: dynamic_lookup: No such file or directory
joyliu37 commented 4 years ago

@joyliu37 I think a recent change you made to the makefile of the buffermapping repo has caused an error if you look at the most recent travis log there is an error compiling the unified buffer library:

Cloning into 'BufferMapping'...

g++ -Wall -std=c++11 -fpic -undefined dynamic_lookup -Iinclude -I/GarnetFlow/scripts/coreir/include -c src/access.cpp -L/GarnetFlow/scripts/coreir/lib -Wl,-rpath,/GarnetFlow/scripts/coreir/lib -lcoreir-commonlib -lcoreir -lcoreirsim -lcoreir-float -o bin/access.o

g++: error: dynamic_lookup: No such file or directory

That's an flag when I bind c++ functional model to python rewrite rule. I fixed that in master and create a new branch for pybinding. @dillonhuff Hopefully it works.

dillonhuff commented 4 years ago

Thanks @joyliu37 that fixed the bug.

dillonhuff commented 4 years ago

@Kuree for some reason PnR is failing on garnetflow for conv_1_2:

https://buildkite.com/stanford-aha/garnetflow/builds/1156#9c462670-2b8b-49af-9f36-2681449af8c8/3085

any idea what is wrong here?

Kuree commented 4 years ago

It's just simply too big:


After packing:
PE: 48 IO: 5 MEM: 0 REG: 6

The testing chip is 7x6, which has 36 PEs. Is it possible to reduce your size? Jeff's output is way smaller.

jeffsetter commented 4 years ago

Could we take a look at the hardware that is produced? I'm curious on what is being created.

Conv_1_2 should be 1 register, 2 multipliers and a couple adders (could be 1 if you optimized it further than my compiler).

dillonhuff commented 4 years ago

I'll take a look at it. I think what is happening is that a counter is getting produced that should be ignored, but because the counter implementation contains a loop constant folding is not smart enough to eliminate it.