diff --git a/loopy/diagnostic.py b/loopy/diagnostic.py index c1d0e03633772bb7e3f86807f579e2b33793e6aa..2fd5d4f83b10b62d0758c818e22e31f438834a28 100644 --- a/loopy/diagnostic.py +++ b/loopy/diagnostic.py @@ -60,7 +60,7 @@ def warn_with_kernel(kernel, id, text, type=LoopyWarning): % id) from warnings import warn - warn(text, type) + warn("in kernel %s: %s" % (kernel.name, text), type, stacklevel=2) warn = MovedFunctionDeprecationWrapper(warn_with_kernel)