clockwork icon indicating copy to clipboard operation
clockwork copied to clipboard

FFT Breaks Ratematched Scheduler

Open joyliu37 opened this issue 4 years ago • 1 comments

I am encountering the following error when running garnet single port scheduling on the fft app.

clockwork: app.cpp:821: std::pair<isl_val*, isl_val*> extract_linear_rational_approximation(isl_aff*): Assertion `div_dims == 1' failed. 

I think it's the fft's access pattern lead to this assertion. Like this

  hcompute_f4_1_stencil_8->add_load("hw_twi_global_wrapper_stencil", "1", "1", "((floor((f4_s1_t_x/4))*4) + ((f4_s1_t_x + 2) % 4))");
  hcompute_f4_1_stencil_8->add_load("hw_twi_global_wrapper_stencil", "1", "0", "((floor((f4_s1_t_x/4))*4) + ((f4_s1_t_x + 2) % 4))");
  hcompute_f4_1_stencil_8->add_store("f4_1_stencil", "f4_s1_t_x");

You can run ./rebuild_set_test.sh lake-exp in the fft branch to reproduce this issue. Can you help me to take a look.

joyliu37 avatar Mar 15 '21 06:03 joyliu37

@joyliu37 yes, the expression (f4_s1_t_x + 2) % 4) certainly is not going to work in a rate matched scheduler. A different scheduling algorithm will be needed, or the design will need to be pre-processed to over-approximate the dependencies created by this access pattern.

dillonhuff avatar Mar 15 '21 20:03 dillonhuff