Skip to content

Commit 1461a3c

Browse files
committed
fix workload release bug
1 parent 7387b06 commit 1461a3c

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

rpc/service.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,6 @@ def __init__(self) -> None:
141141

142142
# Enable orchestrated mode
143143
FLAGS.orchestrated = True
144-
# Set minimum placement push duration to 1s
145-
FLAGS.min_placement_push_duration = 1_000_000
146144
# Set scheduler runtime to zero
147145
FLAGS.scheduler_runtime = 0
148146

simulator.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,8 @@ def tick(self, until: EventTime) -> None:
525525
"""Tick the simulator until the specified time"""
526526

527527
def f():
528+
self._logger.debug(f"EQ: {self._event_queue}")
529+
528530
time_until_next_event = self.__time_until_next_event()
529531

530532
if (
@@ -1618,6 +1620,14 @@ def __handle_update_workload(self, event: Event) -> None:
16181620

16191621
# Release the Tasks that have become available.
16201622
releasable_tasks = self._workload.get_releasable_tasks()
1623+
1624+
# Ignore non-source tasks, they get auto-released when the parent finishes
1625+
def is_source_task(task):
1626+
task_graph = self._workload.get_task_graph(task.task_graph)
1627+
return task_graph.is_source_task(task)
1628+
1629+
releasable_tasks = [task for task in releasable_tasks if is_source_task(task)]
1630+
16211631
self._logger.info(
16221632
"[%s] The WorkloadLoader %s has %s TaskGraphs that released %s tasks.",
16231633
self._simulator_time.to(EventTime.Unit.US).time,
@@ -1666,6 +1676,7 @@ def __handle_update_workload(self, event: Event) -> None:
16661676

16671677
max_release_time = self._simulator_time
16681678
for task in releasable_tasks:
1679+
16691680
event = Event(
16701681
event_type=EventType.TASK_RELEASE, time=task.release_time, task=task
16711682
)

0 commit comments

Comments
 (0)