CSU-CS-Melange / AlphaZ

MIT License
1 stars 0 forks source link

Unable to schedule reductions #21

Open MaxFlorescence opened 1 year ago

MaxFlorescence commented 1 year ago

Setting a 3D schedule (e.g. setSpaceTimeMap(..., "(i, j, k -> i, k, j)")) for a 2D variable causes the compile script to give the error "isl_map.c:9125: incompatible spaces". Here are some matrix product files that cause this bug.

The file compile_0.cs, when run, produces a correct version of MatProd.c. The file compile_1.cs fails to compile, having added the above schedule and replaced the call to generateWriteC(...) with generateScheduledCode(...).

rajopadhye commented 1 year ago

@natekamp there is a workaround for this. You "remove" the reduction with the serialize reductions transformation, that replaces the reduction with an accumulation variable (which will be 3-D). Then you can use the old code generation flow.

chiranjeb commented 1 year ago

@natekamp , @rajopadhye - The scripts seem to be fine. I can use the above script and generate code successfully with the version of Alphaz that I am using.