From 66389cdb1ff3392cb12ee7d3ee7216463ac6d41b Mon Sep 17 00:00:00 2001 From: Kaushik Kulkarni Date: Sat, 21 Sep 2024 23:10:48 -0500 Subject: [PATCH] Use warn_with_kernel for V1-scheduler fallback --- loopy/schedule/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/loopy/schedule/__init__.py b/loopy/schedule/__init__.py index ef6022a56..1364be850 100644 --- a/loopy/schedule/__init__.py +++ b/loopy/schedule/__init__.py @@ -2252,8 +2252,10 @@ def _generate_loop_schedules_inner( return except V2SchedulerNotImplementedError as e: - from warnings import warn - warn(f"Falling back to a slow scheduler implementation due to: {e}", + warn_with_kernel( + kernel, + "v1_scheduler_fallback", + f"Falling back to a slow scheduler implementation due to: {e}", stacklevel=1) schedule_count = 0