Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
faust
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
Package registry
Model registry
Operate
Environments
Terraform modules
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
Admin message
GitLab upgrade completed. Current version is 17.11.4.
Show more breadcrumbs
faust group
faust
Commits
ba94e14e
Commit
ba94e14e
authored
8 years ago
by
Nicolas Bellot
Committed by
hhakim
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
wrapper python test
parent
7e6e188a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc/test/src/test_pyFaust_time.py
+38
-28
38 additions, 28 deletions
misc/test/src/test_pyFaust_time.py
with
38 additions
and
28 deletions
misc/test/src/test_pyFaust_time.py
+
38
−
28
View file @
ba94e14e
...
...
@@ -48,7 +48,13 @@ FigPath=sys.argv[2]
from
scipy
import
sparse
as
sp
import
numpy
as
np
import
matplotlib.pyplot
as
plt
plotlib_present
=
1
try
:
import
matplotlib.pyplot
as
plt
except
ImportError
:
print
(
'
Python module matplotlib is not present, no figure will be made
'
)
plotlib_present
=
0
import
time
import
PyFaust
...
...
@@ -193,33 +199,37 @@ print "speed-up scipy : "+str(speed_up_Scipy)
#print "size dim :"+str(dim_list.shape)
print
"
t_dense :
"
+
str
(
t_dense
.
shape
)
## AFFICHAGE
print
"
saving figure in
"
+
FigPath
tickness
=
4
size_font
=
18
font_style
=
'
bold
'
plt
.
loglog
(
dim_list
,
t_dense
,
'
r
'
,
basex
=
2
,
label
=
'
dense (Numpy)
'
,
linewidth
=
tickness
)
plt
.
loglog
(
dim_list
,
t_faust
,
'
b
'
,
basex
=
2
,
label
=
'
Faust (PyFaust)
'
,
linewidth
=
tickness
)
plt
.
loglog
(
dim_list
,
t_scipy
,
'
g
'
,
basex
=
2
,
label
=
'
Faust (Scipy)
'
,
linewidth
=
tickness
)
plt
.
title
(
'
Time Comparison : Faust-Vector multiplication
'
,
fontweight
=
font_style
)
plt
.
legend
(
loc
=
2
)
plt
.
xlabel
(
'
dimension
'
,
fontsize
=
size_font
,
fontweight
=
font_style
)
plt
.
ylabel
(
'
time (sec)
'
,
fontsize
=
size_font
,
fontweight
=
font_style
)
plt
.
grid
(
linestyle
=
"
--
"
,
which
=
"
both
"
)
plt
.
grid
(
linestyle
=
"
-
"
)
plt
.
savefig
(
FigPath
+
'
/time_comparison.png
'
)
plt
.
clf
()
plt
.
loglog
(
dim_list
,
speed_up_Faust
,
'
b
'
,
basex
=
2
,
label
=
'
Faust (PyFaust)
'
,
linewidth
=
tickness
)
plt
.
loglog
(
dim_list
,
speed_up_Scipy
,
'
g
'
,
basex
=
2
,
label
=
'
Faust (Scipy)
'
,
linewidth
=
tickness
)
plt
.
title
(
'
Speed-up : Faust-Vector multiplication
'
,
fontweight
=
font_style
)
plt
.
legend
(
loc
=
2
)
plt
.
xlabel
(
'
dimension
'
,
fontsize
=
size_font
,
fontweight
=
font_style
)
plt
.
ylabel
(
'
speed-up
'
,
fontsize
=
size_font
,
fontweight
=
font_style
)
plt
.
grid
(
linestyle
=
"
--
"
,
which
=
"
both
"
)
plt
.
grid
(
linestyle
=
"
-
"
)
plt
.
savefig
(
FigPath
+
'
/speed-up.png
'
)
if
(
plotlib_present
):
print
"
saving figure in
"
+
FigPath
tickness
=
4
size_font
=
18
font_style
=
'
bold
'
plt
.
loglog
(
dim_list
,
t_dense
,
'
r
'
,
basex
=
2
,
label
=
'
dense (Numpy)
'
,
linewidth
=
tickness
)
plt
.
loglog
(
dim_list
,
t_faust
,
'
b
'
,
basex
=
2
,
label
=
'
Faust (PyFaust)
'
,
linewidth
=
tickness
)
plt
.
loglog
(
dim_list
,
t_scipy
,
'
g
'
,
basex
=
2
,
label
=
'
Faust (Scipy)
'
,
linewidth
=
tickness
)
plt
.
title
(
'
Time Comparison : Faust-Vector multiplication
'
,
fontweight
=
font_style
)
plt
.
legend
(
loc
=
2
)
plt
.
xlabel
(
'
dimension
'
,
fontsize
=
size_font
,
fontweight
=
font_style
)
plt
.
ylabel
(
'
time (sec)
'
,
fontsize
=
size_font
,
fontweight
=
font_style
)
plt
.
grid
(
linestyle
=
"
--
"
,
which
=
"
both
"
)
plt
.
grid
(
linestyle
=
"
-
"
)
plt
.
savefig
(
FigPath
+
'
/time_comparison.png
'
)
plt
.
clf
()
plt
.
loglog
(
dim_list
,
speed_up_Faust
,
'
b
'
,
basex
=
2
,
label
=
'
Faust (PyFaust)
'
,
linewidth
=
tickness
)
plt
.
loglog
(
dim_list
,
speed_up_Scipy
,
'
g
'
,
basex
=
2
,
label
=
'
Faust (Scipy)
'
,
linewidth
=
tickness
)
plt
.
title
(
'
Speed-up : Faust-Vector multiplication
'
,
fontweight
=
font_style
)
plt
.
legend
(
loc
=
2
)
plt
.
xlabel
(
'
dimension
'
,
fontsize
=
size_font
,
fontweight
=
font_style
)
plt
.
ylabel
(
'
speed-up
'
,
fontsize
=
size_font
,
fontweight
=
font_style
)
plt
.
grid
(
linestyle
=
"
--
"
,
which
=
"
both
"
)
plt
.
grid
(
linestyle
=
"
-
"
)
plt
.
savefig
(
FigPath
+
'
/speed-up.png
'
)
print
"
*********************************
"
...
...
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