StanfordAHA/Halide-to-Hardware

Does the clockwork / CPU comparison script support 3D buffers?

dillonhuff opened this issue · 5 comments

@jeffsetter @thenextged I'm trying to add max-pooling, which needs a 3D input and output (app here: https://github.com/StanfordAHA/Halide-to-Hardware/tree/maxpool_example/apps/hardware_benchmarks/apps/max_pool_2x2 ). When I run make run-cpu I get:

dhuff@kiwi:~/h2h2clockwork/Halide-to-Hardware/apps/hardware_benchmarks/apps/max_pool_2x2$ make run-cpu
./bin/process run cpu input.png 
Error: Input buffer input requires a buffer of exactly 3 dimensions, but the buffer passed in has 2 dimensions
../../hw_support/hardware_targets.mk:249: recipe for target 'run-cpu' failed
make: *** [run-cpu] Aborted (core dumped)

I've tried to modify process.cpp to use a 3D buffer here:

processor.input = Buffer<uint8_t>(64, 64, 3);
processor.output = Buffer<uint8_t>(31, 31, 3);

What am I doing wrong here?

You might need to provide a different input.png image that is actually a Buffer<uint8_t>(64, 64, 3) instead of the default input image you're using (which is a (64, 64) gray scale image. I think you can reuse the input image used in the conv_multi app

@thenextged makes sense! Which app is conv_multi? I don't see anything with that name in the hardware_benchmarks/apps directory

it's in hardware_benchmarks/tests instead

Ahh I see. Thanks!

No worries. Let us know if it runs