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
492fb30a
Commit
492fb30a
authored
4 months ago
by
Richard Angersbach
Browse files
Options
Downloads
Patches
Plain Diff
Adapt error messages for reduced assignments in freeze.py
parent
3484e7f7
No related branches found
No related tags found
1 merge request
!438
Reduction Support
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/pystencils/backend/kernelcreation/freeze.py
+3
-2
3 additions, 2 deletions
src/pystencils/backend/kernelcreation/freeze.py
with
3 additions
and
2 deletions
src/pystencils/backend/kernelcreation/freeze.py
+
3
−
2
View file @
492fb30a
...
@@ -200,7 +200,8 @@ class FreezeExpressions:
...
@@ -200,7 +200,8 @@ class FreezeExpressions:
orig_lhs_symb
=
lhs
.
symbol
orig_lhs_symb
=
lhs
.
symbol
dtype
=
lhs
.
dtype
dtype
=
lhs
.
dtype
assert
isinstance
(
dtype
,
PsNumericType
)
assert
isinstance
(
dtype
,
PsNumericType
),
\
"
Reduction assignments require type information of the lhs symbol.
"
# replace original symbol with pointer-based type used for export
# replace original symbol with pointer-based type used for export
orig_lhs_symb_as_ptr
=
PsSymbol
(
orig_lhs_symb
.
name
,
PsPointerType
(
dtype
))
orig_lhs_symb_as_ptr
=
PsSymbol
(
orig_lhs_symb
.
name
,
PsPointerType
(
dtype
))
...
@@ -226,7 +227,7 @@ class FreezeExpressions:
...
@@ -226,7 +227,7 @@ class FreezeExpressions:
case
ReductionOp
.
Max
:
case
ReductionOp
.
Max
:
init_val
=
PsCall
(
PsMathFunction
(
NumericLimitsFunctions
.
Min
),
[])
init_val
=
PsCall
(
PsMathFunction
(
NumericLimitsFunctions
.
Min
),
[])
case
_
:
case
_
:
raise
FreezeError
(
f
"
Unsupported reduc
ed
assignment:
{
op
}
.
"
)
raise
FreezeError
(
f
"
Unsupported
kind of
reduc
tion
assignment:
{
op
}
.
"
)
reduction_info
=
ReductionInfo
(
op
,
init_val
,
orig_lhs_symb_as_ptr
)
reduction_info
=
ReductionInfo
(
op
,
init_val
,
orig_lhs_symb_as_ptr
)
...
...
This diff is collapsed.
Click to expand it.
Frederik Hennig
@da15siwa
mentioned in commit
4e688b86
·
2 months ago
mentioned in commit
4e688b86
mentioned in commit 4e688b867339c90a6fba3ad12c383d1e59211ed9
Toggle commit list
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