Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
loopy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
loopy
Commits
020203ae
Commit
020203ae
authored
13 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Patches
Plain Diff
Give a good error message for missing variables in get_problems().
parent
94107a5e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MEMO
+6
-3
6 additions, 3 deletions
MEMO
loopy/__init__.py
+9
-2
9 additions, 2 deletions
loopy/__init__.py
with
15 additions
and
5 deletions
MEMO
+
6
−
3
View file @
020203ae
...
...
@@ -37,14 +37,14 @@ Things to consider
To-do
^^^^^
- Just touching a variable written to by a non-idempotent
instruction makes that instruction also not idempotent
- assert dependencies <= parent_inames in loopy/__init__.py
???
- user interface for dim length prescription
- Give a good error message if a parameter assignment in get_problems()
is missing.
- Deal with equality constraints.
(These arise, e.g., when partitioning a loop of length 16 into 16s.)
...
...
@@ -83,6 +83,9 @@ Future ideas
Dealt with
^^^^^^^^^^
- Give a good error message if a parameter assignment in get_problems()
is missing.
- Slab decomposition for ILP
-> I don't think that's possible.
...
...
This diff is collapsed.
Click to expand it.
loopy/__init__.py
+
9
−
2
View file @
020203ae
...
...
@@ -411,8 +411,15 @@ def get_problems(kernel, parameters):
glens
,
llens
=
kernel
.
get_grid_sizes_as_exprs
()
from
pymbolic
import
evaluate
glens
=
evaluate
(
glens
,
parameters
)
llens
=
evaluate
(
llens
,
parameters
)
from
pymbolic.mapper.evaluator
import
UnknownVariableError
try
:
glens
=
evaluate
(
glens
,
parameters
)
llens
=
evaluate
(
llens
,
parameters
)
except
UnknownVariableError
,
name
:
raise
RuntimeError
(
"
When checking your kernel for problems,
"
"
a value for parameter
'
%s
'
was not available. Pass
"
"
it in the
'
parameters
'
kwarg to check_kernels().
"
%
name
)
if
(
max
(
len
(
glens
),
len
(
llens
))
>
kernel
.
device
.
max_work_item_dimensions
):
...
...
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