Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arraycontext
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Klöckner
arraycontext
Commits
4305d758
Commit
4305d758
authored
2 years ago
by
Andreas Klöckner
Committed by
Andreas Klöckner
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Deprecate passing unevaluated arrays to compiled functions
parent
8d7c872e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#303732
passed
2 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arraycontext/impl/pytato/compile.py
+8
-0
8 additions, 0 deletions
arraycontext/impl/pytato/compile.py
with
8 additions
and
0 deletions
arraycontext/impl/pytato/compile.py
+
8
−
0
View file @
4305d758
...
...
@@ -468,6 +468,14 @@ def _args_to_device_buffers(actx, input_id_to_name_in_program, arg_id_to_arg):
pass
elif
isinstance
(
arg
,
pt
.
Array
):
# got an array expression => evaluate it
from
warnings
import
warn
warn
(
f
"
Argument array
'
{
arg_id
}
'
to a compiled function is
"
"
unevaluated. Evaluating just-in-time, at
"
"
considerable expense. This is deprecated and will stop
"
"
working in 2023. To avoid this warning, force evaluation
"
"
of all arguments via freeze/thaw.
"
,
DeprecationWarning
,
stacklevel
=
4
)
arg
=
actx
.
freeze
(
arg
)
else
:
raise
NotImplementedError
(
type
(
arg
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment