Skip to content

Commit 5535398

Browse files
make it an error
1 parent 175ad97 commit 5535398

1 file changed

Lines changed: 7 additions & 12 deletions

File tree

arraycontext/impl/pytato/compile.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -550,18 +550,13 @@ def _args_to_device_buffers(fn_name, actx, input_id_to_name_in_program, arg_id_t
550550
# got a frozen array => do nothing
551551
pass
552552
elif isinstance(arg, pt.Array):
553-
# got an array expression => evaluate it
554-
from warnings import catch_warnings, filterwarnings, warn
555-
with catch_warnings():
556-
filterwarnings("always")
557-
warn(f"Argument array '{arg_id}' to the '{fn_name}' compiled function "
558-
"is unevaluated. Evaluating just-in-time, at "
559-
"considerable expense. This is deprecated and will stop "
560-
"working in 2023. To avoid this warning, force evaluation "
561-
"of all arguments via freeze/thaw.",
562-
stacklevel=4)
563-
564-
arg = actx.freeze(arg)
553+
# got an array expression => abort
554+
raise ValueError(
555+
f"Argument '{arg_id}' to the '{fn_name}' compiled function is a"
556+
" pytato array expression. Evaluating it just-in-time"
557+
" potentially causes a significant overhead on each call to the"
558+
" function and is therefore unsupported. "
559+
)
565560
else:
566561
raise NotImplementedError(type(arg))
567562

0 commit comments

Comments
 (0)