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
87229205
Commit
87229205
authored
7 years ago
by
Dominic Kempf
Browse files
Options
Downloads
Patches
Plain Diff
Remove variability concerning which inputs to combine
parent
896cb5e4
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/perftool/sumfact/vectorization.py
+27
-25
27 additions, 25 deletions
python/dune/perftool/sumfact/vectorization.py
with
27 additions
and
25 deletions
python/dune/perftool/sumfact/vectorization.py
+
27
−
25
View file @
87229205
...
@@ -288,33 +288,35 @@ def _level2_optimal_vectorization_strategy_generator(sumfacts, width, qp, alread
...
@@ -288,33 +288,35 @@ def _level2_optimal_vectorization_strategy_generator(sumfacts, width, qp, alread
inoutkey_sumfacts
=
[
tuple
(
sorted
(
filter
(
lambda
sf
:
sf
.
inout_key
==
key
,
sumfacts
)))
for
key
in
keys
]
inoutkey_sumfacts
=
[
tuple
(
sorted
(
filter
(
lambda
sf
:
sf
.
inout_key
==
key
,
sumfacts
)))
for
key
in
keys
]
for
parallel
in
(
1
,
2
):
for
parallel
in
(
1
,
2
):
if
parallel
>
len
(
keys
):
continue
if
parallel
==
2
and
next
(
iter
(
sumfacts
)).
stage
==
3
:
if
parallel
==
2
and
next
(
iter
(
sumfacts
)).
stage
==
3
:
continue
continue
for
which
in
filter
(
lambda
w
:
w
==
tuple
(
sorted
(
w
)),
it
.
permutations
(
range
(
len
(
keys
)),
parallel
)):
horizontal
=
1
horizontal
=
1
while
horizontal
<=
width
//
parallel
:
while
horizontal
<=
width
//
parallel
:
combo
=
sum
((
inoutkey_sumfacts
[
part
][:
horizontal
]
for
part
in
range
(
parallel
)),
())
combo
=
sum
((
inoutkey_sumfacts
[
part
][:
horizontal
]
for
part
in
which
),
())
vecdict
=
get_vectorization_dict
(
combo
,
width
//
(
horizontal
*
parallel
),
horizontal
*
parallel
,
qp
)
vecdict
=
get_vectorization_dict
(
combo
,
width
//
(
horizontal
*
parallel
),
horizontal
*
parallel
,
qp
)
horizontal
*=
2
horizontal
*=
2
if
vecdict
is
None
:
if
vecdict
is
None
:
# This particular choice was rejected for some reason.
# This particular choice was rejected for some reason.
# Possible reasons:
# Possible reasons:
# * the quadrature point tuple not being suitable
# * the quadrature point tuple not being suitable
# for this vectorization strategy
# for this vectorization strategy
# * there are not enough horizontal kernels
# * there are not enough horizontal kernels
continue
continue
# Go into recursion to also vectorize all kernels not in this combo
# Go into recursion to also vectorize all kernels not in this combo
for
opp
in
_level2_optimal_vectorization_strategy_generator
(
list_diff
(
sumfacts
,
combo
),
for
opp
in
_level2_optimal_vectorization_strategy_generator
(
list_diff
(
sumfacts
,
combo
),
width
,
width
,
qp
,
qp
,
add_to_frozendict
(
already
,
vecdict
),
add_to_frozendict
(
already
,
vecdict
),
):
):
yielded
=
True
yielded
=
True
yield
opp
yield
opp
# If we did not yield on this recursion level, yield what we got so far
# If we did not yield on this recursion level, yield what we got so far
if
not
yielded
:
if
not
yielded
:
...
...
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