Inquiry About Schedule Reading Issue with isl_schedule_read_from_file

13 views
Skip to first unread message

Ranganhar Guo

unread,
Apr 27, 2025, 8:51:36 AMApr 27
to isl Development

Hello!
I have encountered an issue when using the isl_schedule_read_from_file function. Specifically, I am working with the following scenario:

  • File 1 is the schedule that I need to read.

  • After reading the schedule, I use isl_schedule_dump to generate schedule in File 2.

However, I have noticed that there is a difference in the order of the nodes under the schedule section, specifically with the nodes S_4 and S_5. This difference in order is affecting my subsequent flow dependency analysis.

Could you please help me understand the reason behind this discrepancy in the schedule reading process?

Below is the code I use to create the context and read the isl_schedule.

this->ctx = isl_ctx_alloc();
this->space = isl_space_set_alloc(ctx, 0, 0);
this->context_set = isl_set_universe(isl_space_params_alloc(ctx, 0));
FILE* file = fopen("example_schedule.out", "r");
isl_schedule* schedule = isl_schedule_read_from_file(ctx, file);

Thank you for your assistance.

Best regards,
Ranganhar

file1.out
file2.out

Sven Verdoolaege

unread,
Apr 27, 2025, 10:11:59 AMApr 27
to Ranganhar Guo, isl Development
On Sun, Apr 27, 2025 at 05:51:36AM -0700, Ranganhar Guo wrote:
> However, I have noticed that there is a difference in the order of the
> nodes under the schedule section, specifically with the nodes S_4 and S_5.

Are you talking about this difference?

- schedule: "[{ S_4[k, i, j] -> [(k)]; S_5[k, i, j] -> [(k)] }]"
+ schedule: "[{ S_5[k, i, j] -> [(k)]; S_4[k, i, j] -> [(k)] }]"

These are two representations of exactly the same partial schedule.

> This difference in order is affecting my subsequent flow dependency
> analysis.

This difference in representation shouldn't have an effect
on dependence analysis. How do you perform this analysis?

skimo

Ranganhar Guo

unread,
Apr 30, 2025, 3:07:53 AMApr 30
to isl Development
Thanks, I have solved my issue !
The difference between input schedule and output schedule still embaresses me although there is no effect on result.

- schedule: "[{ S_4[k, i, j] -> [(k)]; S_5[k, i, j] -> [(k)] }]"
+ schedule: "[{ S_5[k, i, j] -> [(k)]; S_4[k, i, j] -> [(k)] }]"
How to explain(understand) this difference? 

ranganhar

Sven Verdoolaege

unread,
Apr 30, 2025, 3:50:47 PMApr 30
to Ranganhar Guo, isl Development
On Wed, Apr 30, 2025 at 12:07:53AM -0700, Ranganhar Guo wrote:
> Thanks, I have solved my issue !
> The difference between input schedule and output schedule still embaresses
> me although there is no effect on result.
> - schedule: "[{ S_4[k, i, j] -> [(k)]; S_5[k, i, j] -> [(k)] }]"
> + schedule: "[{ S_5[k, i, j] -> [(k)]; S_4[k, i, j] -> [(k)] }]"
> How to explain(understand) this difference?

The sets { A, B } and { B, A } are the same.
They are just printed differently.

Here two, the two partial schedules are the same:

{ S_4[k, i, j] -> [(k)]; S_5[k, i, j] -> [(k)] } = { S_5[k, i, j] -> [(k)]; S_4[k, i, j] -> [(k)] };
$0 := True

The way these partial schedules are printed depends on the internal
representation.

skimo
Reply all
Reply to author
Forward
0 new messages