On 21/07/2014 14:55, Roman Gareev wrote:
It seems S_6 is now scheduled before S_4 which is surprising, as
dependences from S_4 to S_6 should prevent us from generating a schedule
that yields such a result. What is the schedule that you give to the isl ast
generator?

The schedule generated by the code, which uses variable k (It executes
without errors):

[k.0] -> { S_6[] -> [1] : exists (e0 = [(-1 + k.0)/4294967296]:
4294967296e0 <= -1 + k.0 and 4294967296e0 >= -2147483647 + k.0);
S_4[i0] -> [0, i0, 0] : exists (e0 = [(-1 + k.0)/4294967296]: i0 >= 0
and 4294967296e0 <= -1 + k.0 and 4294967296e0 >= -4294967296 + k.0 and
4294967296e0 <= -1 + k.0 - i0 and i0 <= 2147483646) }

The schedule generated by the code, which uses variable n:

[n.0] -> { S_6[] -> [1] : exists (e0 = [(-1 + n.0)/4294967296]:
4294967296e0 <= -1 + n.0 and 4294967296e0 >= -2147483647 + n.0);
S_4[i0] -> [0, i0, 0] : exists (e0 = [(-1 + n.0)/4294967296]: i0 >= 0
and 4294967296e0 <= -1 + n.0 and 4294967296e0 >= -4294967296 + n.0 and
4294967296e0 <= -1 + n.0 - i0 and i0 <= 2147483646) }

Perfect. The problem is that S_6 has a one-dimensional schedule [1] and S_4 has a three dimensional schedule [0,i0,0]. For schedules with different dimensionality, the isl AST generator can not define an order and just randomly chooses an order. The solution to this problem is to extend all schedules to the maximal number of schedule dimensions (using '0's for the remaining values).

Search for the function extend_scattering() (its implementation is unnecessarily verbose and could possibly simplified by using isl_*_equate or isl_*fix*).

Cheers,
Tobias

Reply via email to