StanfordAHA / Halide-to-Hardware

Other
77 stars 12 forks source link

cascade_compute.h is out of date? #101

Closed dillonhuff closed 4 years ago

dillonhuff commented 4 years ago

@jeffsetter when I run C++ simulation for cascade (from example_progs) I get the following compile error on the generated C++ code:

cmd: g++ -fstack-protector-all -std=c++11 regression_tb_unoptimized_cascade.cpp unoptimized_cascade.cpp
unoptimized_cascade.cpp: In function ‘void op_hcompute_hw_input_global_wrapper_stencil(HWStream<hw_uint<16> >&, hw_input_global_wrapper_stencil_cache&, int, int, int)’:
unoptimized_cascade.cpp:1397:24: error: ‘hcompute_hw_input_global_wrapper_stencil’ was not declared in this scope
  auto compute_result = hcompute_hw_input_global_wrapper_stencil(hw_input_stencil_hw_input_global_wrapper_s0_y_c__hw_input_global_wrapper_s0_x_value);
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
unoptimized_cascade.cpp:1397:24: note: suggested alternative: ‘op_hcompute_hw_input_global_wrapper_stencil’
  auto compute_result = hcompute_hw_input_global_wrapper_stencil(hw_input_stencil_hw_input_global_wrapper_s0_y_c__hw_input_global_wrapper_s0_x_value);
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                        op_hcompute_hw_input_global_wrapper_stencil
unoptimized_cascade.cpp: In function ‘void op_hcompute_hw_output_stencil(conv2_stencil_cache&, HWStream<hw_uint<16> >&, int, int, int)’:
unoptimized_cascade.cpp:1489:40: error: no matching function for call to ‘HWStream<hw_uint<16> >::write(hw_uint<8>&)’
  hw_output_stencil.write(compute_result);
                                        ^
In file included from cascade_compute.h:2,
                 from unoptimized_cascade.cpp:10:
hw_classes.h:392:10: note: candidate: ‘void HWStream<T>::write(const T&) [with T = hw_uint<16>]’
     void write(const T& v) {
          ^~~~~
hw_classes.h:392:10: note:   no known conversion for argument 1 from ‘hw_uint<8>’ to ‘const hw_uint<16>&’
clockwork: prog.cpp:2842: std::vector<std::__cxx11::basic_string<char> > run_regression_tb(const string&): Assertion `res == 0' failed.

It looks as though one of the functions hcompute_hw_input_global_wrapper_stencil does not exist in cascade_compute.h, could you check if the cascade compute file is up to date?

jeffsetter commented 4 years ago

Fixed in https://github.com/dillonhuff/clockwork/pull/48