Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-codegen
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Christian Heinigk
dune-codegen
Commits
2d79f6e6
Commit
2d79f6e6
authored
5 years ago
by
Marcel Koch
Browse files
Options
Downloads
Patches
Plain Diff
adds silenced_warnings instead of instructions
parent
21fe1d77
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python/dune/codegen/blockstructured/vectorization.py
+7
-5
7 additions, 5 deletions
python/dune/codegen/blockstructured/vectorization.py
with
7 additions
and
5 deletions
python/dune/codegen/blockstructured/vectorization.py
+
7
−
5
View file @
2d79f6e6
...
...
@@ -26,20 +26,22 @@ def add_vcl_temporaries(knl, vcl_size):
init_iname
=
'
init_vec{}
'
.
format
(
vcl_size
)
from
islpy
import
BasicSet
init_domain
=
BasicSet
(
"
{{ [{0}] : 0<={0}<{1} }}
"
.
format
(
init_iname
,
get_vcl_type_size
(
dtype_floatingpoint
())))
silenced_warnings
=
[]
for
alias
in
vector_alias
:
vector_name
=
alias
.
replace
(
'
alias
'
,
'
vec{}
'
.
format
(
vcl_size
))
new_vec_temporaries
[
vector_name
]
=
DuneTemporaryVariable
(
vector_name
,
dtype
=
np
.
float64
,
shape
=
(
vcl_size
,),
managed
=
True
,
scope
=
lp
.
temp_var_scope
.
PRIVATE
,
dim_tags
=
(
'
vec
'
,))
# write once to the vector such that loopy won't complain
new_insns
.
append
(
lp
.
Assignment
(
assignee
=
prim
.
Subscript
(
prim
.
Variable
(
vector_name
),
prim
.
Variable
(
init_iname
)),
expression
=
0
,
within_inames
=
frozenset
({
init_iname
}),
id
=
'
init_{}
'
.
format
(
vector_name
)))
# silence warning such that loopy won't complain
silenced_warnings
.
append
(
"
read_no_write({})
"
.
format
(
vector_name
))
from
loopy.kernel.data
import
VectorizeTag
return
knl
.
copy
(
instructions
=
knl
.
instructions
+
new_insns
,
domains
=
knl
.
domains
+
[
init_domain
],
temporary_variables
=
dict
(
**
knl
.
temporary_variables
,
**
new_vec_temporaries
),
iname_to_tag
=
dict
(
**
knl
.
iname_to_tag
,
**
{
init_iname
:
VectorizeTag
()}))
iname_to_tag
=
dict
(
**
knl
.
iname_to_tag
,
**
{
init_iname
:
VectorizeTag
()}),
silenced_warnings
=
knl
.
silenced_warnings
+
silenced_warnings
)
def
add_vcl_accum_insns
(
knl
,
inner_iname
,
outer_iname
,
vcl_size
,
level
):
...
...
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