diff --git a/loopy/kernel/array.py b/loopy/kernel/array.py index 6bf733a84f9df48fbb8433015e1e137f6dc0392c..7130e815c5f6c200ffac2fc6af9c684f2764c992 100644 --- a/loopy/kernel/array.py +++ b/loopy/kernel/array.py @@ -693,8 +693,9 @@ class ArrayBase(ImmutableRecord): if dtype is lp.auto: from warnings import warn - warn("Argument/temporary data type should be None if unspecified, " - "not auto. This usage will be disallowed in 2018.", + warn("Argument/temporary data type for '%s' should be None if " + "unspecified, not auto. This usage will be disallowed in 2018." + % name, DeprecationWarning, stacklevel=2) dtype = None diff --git a/loopy/kernel/creation.py b/loopy/kernel/creation.py index 3ae29366734ccacc882ea8d852d706e5ec4f4204..92ce79bb5f85287ddc1116542dfab71007cc50eb 100644 --- a/loopy/kernel/creation.py +++ b/loopy/kernel/creation.py @@ -454,7 +454,6 @@ def parse_insn(groups, insn_options): and *inames_to_dup* is None or a list of tuples `(old, new)`. """ - import loopy as lp from loopy.symbolic import parse if "lhs" in groups: @@ -1145,6 +1144,7 @@ class ArgumentGuesser: # It's not a temp var, and thereby not a domain parameter--the only # other writable type of variable is an argument. + import loopy as lp return ArrayArg(arg_name, shape=lp.auto, offset=self.default_offset, diff --git a/loopy/kernel/data.py b/loopy/kernel/data.py index 3e776bd0609f8c4c6f63aadae811d97a0f97b579..ddc4dd79b518c4fe16e883926176ac5a9e94d837 100644 --- a/loopy/kernel/data.py +++ b/loopy/kernel/data.py @@ -330,8 +330,9 @@ class KernelArgument(ImmutableRecord): import loopy as lp if dtype is lp.auto: - warn("Argument/temporary data type should be None if unspecified, " - "not auto. This usage will be disallowed in 2018.", + warn("Argument/temporary data type for '%s' should be None if " + "unspecified, not auto. This usage will be disallowed in 2018." + % kwargs["name"], DeprecationWarning, stacklevel=2) dtype = None