Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pystencils
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
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
pystencils
Commits
fbf1ec12
Commit
fbf1ec12
authored
5 years ago
by
Stephan Seitz
Browse files
Options
Downloads
Patches
Plain Diff
Assert non-empty assignments on kernelcreation
This yields better error messages
parent
212776a3
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!108
AssignmentCollection.__bool__
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pystencils/gpucuda/kernelcreation.py
+1
-0
1 addition, 0 deletions
pystencils/gpucuda/kernelcreation.py
pystencils/kernelcreation.py
+2
-1
2 additions, 1 deletion
pystencils/kernelcreation.py
with
3 additions
and
1 deletion
pystencils/gpucuda/kernelcreation.py
+
1
−
0
View file @
fbf1ec12
...
...
@@ -16,6 +16,7 @@ def create_cuda_kernel(assignments,
ghost_layers
=
None
,
skip_independence_check
=
False
,
use_textures_for_interpolation
=
True
):
assert
assignments
,
"
Assignments must not be empty!
"
fields_read
,
fields_written
,
assignments
=
add_types
(
assignments
,
type_info
,
not
skip_independence_check
)
all_fields
=
fields_read
.
union
(
fields_written
)
read_only_fields
=
set
([
f
.
name
for
f
in
fields_read
-
fields_written
])
...
...
This diff is collapsed.
Click to expand it.
pystencils/kernelcreation.py
+
2
−
1
View file @
fbf1ec12
from
types
import
MappingProxyType
from
itertools
import
combinations
from
types
import
MappingProxyType
import
sympy
as
sp
...
...
@@ -74,6 +74,7 @@ def create_kernel(assignments,
[
0.
,
0.
,
0.
,
0.
,
0.
]])
"""
# ---- Normalizing parameters
assert
assignments
,
"
Assignments must not be empty!
"
split_groups
=
()
if
isinstance
(
assignments
,
AssignmentCollection
):
if
'
split_groups
'
in
assignments
.
simplification_hints
:
...
...
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