-
Notifications
You must be signed in to change notification settings - Fork 182
Open
Description
Hi there. In FFCV, version 1.0.2, the function Graph.group_operations gets stuck in an infinite loop (which happens when we initialize a Loader).
The particular code in question is the following:
while current_front:
current_stage = list()
jitted_stage = len(stages) % 2 == 0
while current_front:
node = current_front.pop()
if node.is_jitted == jitted_stage or node.is_jitted is None:
current_stage.append(self.node_to_id[node])
current_front.update(set(self.adjacency_list[node]))
else:
next_front.add(node)
stages.append(current_stage)
current_front = next_front
To me it seems that at the end of the execution of the entire body of the outer while-loop, the variables current_front and next_front are set to refer to same underlying set. As a consequence, on the second run of the outer loop, the inner loop gets into an infinite loop if:
current_fronthas exactly one element- this element, extracted into
node, does not satisfy the if condition and is put back intonext_front, which refers to the same set ascurrent_front.
From there the inner loop just gets stuck into infinite execution.
Metadata
Metadata
Assignees
Labels
No labels