Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sumpy
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
sumpy
Commits
add4ee09
There was a problem fetching the pipeline summary.
Commit
add4ee09
authored
8 years ago
by
Matt Wala
Browse files
Options
Downloads
Patches
Plain Diff
Flake8 fixes.
parent
4f9b02ae
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!23
Faster CSE
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sumpy/e2e.py
+0
-17
0 additions, 17 deletions
sumpy/e2e.py
test/test_cse.py
+2
-6
2 additions, 6 deletions
test/test_cse.py
with
2 additions
and
23 deletions
sumpy/e2e.py
+
0
−
17
View file @
add4ee09
...
...
@@ -76,23 +76,6 @@ class E2EBase(KernelCacheWrapper):
self
.
dim
=
src_expansion
.
dim
def
run_translation_and_cse
(
self
):
from
sumpy.symbolic
import
make_sympy_vector
dvec
=
make_sympy_vector
(
"
d
"
,
self
.
dim
)
src_coeff_exprs
=
[
sp
.
Symbol
(
"
src_coeff%d
"
%
i
)
for
i
in
range
(
len
(
self
.
src_expansion
))]
from
sumpy.assignment_collection
import
SymbolicAssignmentCollection
sac
=
SymbolicAssignmentCollection
()
tgt_coeff_names
=
[
sac
.
assign_unique
(
"
coeff%d
"
%
i
,
coeff_i
)
for
i
,
coeff_i
in
enumerate
(
self
.
tgt_expansion
.
translate_from
(
self
.
src_expansion
,
src_coeff_exprs
,
dvec
))]
sac
.
run_global_cse
()
def
get_translation_loopy_insns
(
self
):
from
sumpy.symbolic
import
make_sympy_vector
dvec
=
make_sympy_vector
(
"
d
"
,
self
.
dim
)
...
...
This diff is collapsed.
Click to expand it.
test/test_cse.py
+
2
−
6
View file @
add4ee09
...
...
@@ -64,18 +64,14 @@ DAMAGE.
# }}}
import
pytest
import
itertools
import
sys
from
sympy
import
(
Add
,
Pow
,
Symbol
,
exp
,
sqrt
,
symbols
,
sympify
,
S
,
cos
,
sin
,
Eq
,
Function
,
Tuple
,
CRootOf
,
IndexedBase
,
Idx
,
Piecewise
)
from
sympy
import
(
Add
,
Pow
,
exp
,
sqrt
,
symbols
,
sympify
,
S
,
cos
,
sin
,
Eq
,
Function
,
Tuple
,
CRootOf
,
IndexedBase
,
Idx
,
Piecewise
)
from
sympy.simplify.cse_opts
import
sub_pre
,
sub_post
from
sympy.functions.special.hyper
import
meijerg
from
sympy.simplify
import
cse_opts
from
sympy.core.compatibility
import
range
from
sumpy.cse
import
(
cse
,
preprocess_for_cse
,
postprocess_for_cse
)
...
...
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