Fix profiler error when there are idle passes (#7003)

This commit is contained in:
fzyzcjy
2025-06-19 01:55:01 +08:00
committed by GitHub
parent 2ae809c5c1
commit 9c6a0656a3

View File

@@ -2472,8 +2472,10 @@ class Scheduler(
if self.profiler_decode_ct > self.profiler_target_decode_ct:
if self.profile_in_progress:
self.stop_profile(stage=ForwardMode.DECODE)
elif batch.forward_mode.is_idle():
pass
else:
raise RuntimeError("unsupported profile stage")
raise RuntimeError(f"unsupported profile stage: {batch.forward_mode}")
else:
# Check profiler
if (