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
b29b7a56
Commit
b29b7a56
authored
9 years ago
by
Nicolas Bellot
Committed by
hhakim
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
demo
parent
c2d3b0fd
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
misc/demo/Runtime_comparison/Fig_runtime_comparison.m
+33
-29
33 additions, 29 deletions
misc/demo/Runtime_comparison/Fig_runtime_comparison.m
misc/demo/Runtime_comparison/runtime_comparison.m
+33
-23
33 additions, 23 deletions
misc/demo/Runtime_comparison/runtime_comparison.m
with
66 additions
and
52 deletions
misc/demo/Runtime_comparison/Fig_runtime_comparison.m
+
33
−
29
View file @
b29b7a56
...
...
@@ -114,40 +114,44 @@ ymin=min([min(mean_tdense(:)),min(mean_tfaust(:))]);
ymax
=
max
([
max
(
mean_tdense
(:)),
max
(
mean_tfaust
(:))]);
fighandle
=
figure
;
for
nfact
=
1
:
nNB_FACTS
subplot
(
1
,
nNB_FACTS
,
nfact
);
for
k
=
1
:
nRCGS
semilogy
(
log2
(
DIMS
),
mean_tfaust
(:,
k
,
nfact
),
'LineWidth'
,
thickness_curve
);
legend_curve
{
k
}
=
[
'Faust RCG '
num2str
(
RCGS
(
k
))];
hold
on
;
legendy
=
{
'Time (A*x)'
,
'Time (A
''
*x)'
};
for
h
=
1
:
2
for
nfact
=
1
:
nNB_FACTS
subplot
(
2
,
nNB_FACTS
,(
h
-
1
)
*
nNB_FACTS
+
nfact
);
for
k
=
1
:
nRCGS
semilogy
(
log2
(
DIMS
),
mean_tfaust
(:,
k
,
nfact
,
h
),
'LineWidth'
,
thickness_curve
);
legend_curve
{
k
}
=
[
'Faust RCG '
num2str
(
RCGS
(
k
))];
hold
on
;
end
%LA boucle fait remettre les compteurs a zero, que ce soit des
%numero de courbes ou des couleurs, c'est pourquoi il faut la
%mettre en premier et
%forcer la couleur du dense (voire ci dessous).
semilogy
(
log2
(
DIMS
),
squeeze
(
mean_tdense
(:,
h
)),
'-+'
,
'Color'
,[
0
0.8
0.8
],
'LineWidth'
,
thickness_curve
);
legend_curve
{
nRCGS
+
1
}
=
[
'Dense '
];
% legend the figure,title, font ...
grid
on
;
axis
([
log2
(
DIMS
(
1
))
log2
(
DIMS
(
end
))
ymin
ymax
]);
title
([
'nb factor : '
,
int2str
(
NB_FACTS
(
nfact
))]
);
if
(
nfact
==
1
)
legend
(
legend_curve
{:},
'Location'
,
'NorthWest'
);
xlabel
(
'log2(Dimension)'
);
ylabel
(
legendy
{
h
});
end
end
%LA boucle fait remettre les compteurs a zero, que ce soit des
%numero de courbes ou des couleurs, c'est pourquoi il faut la
%mettre en premier et
%forcer la couleur du dense (voire ci dessous).
semilogy
(
log2
(
DIMS
),
squeeze
(
mean_tdense
),
'-+'
,
'Color'
,[
0
0.8
0.8
],
'LineWidth'
,
thickness_curve
);
legend_curve
{
nRCGS
+
1
}
=
[
'Dense '
];
% legend the figure,title, font ...
grid
on
;
axis
([
log2
(
DIMS
(
1
))
log2
(
DIMS
(
end
))
ymin
ymax
]);
title
([
'nb factor : '
,
int2str
(
NB_FACTS
(
nfact
))]
);
if
(
nfact
==
1
)
legend
(
legend_curve
{:},
'Location'
,
'NorthWest'
);
xlabel
(
'log2(Dimension)'
);
ylabel
(
'Time'
);
end
end
fighandle
.
Name
=
[
'Faust-'
matrix_or_vector
' multiplication (constraint : '
constraint
')'
];
figure_name
=
[
figure_dir
filesep
'RuntimeComp-'
matrix_or_vector
'_multiplication_constraint_'
constraint
];
print
(
figure_name
,
format_fig
);
This diff is collapsed.
Click to expand it.
misc/demo/Runtime_comparison/runtime_comparison.m
+
33
−
23
View file @
b29b7a56
...
...
@@ -109,8 +109,8 @@ end
%% time comparison
t_faust
=
zeros
(
Nb_mult
+
1
,
NDims
,
NRCGs
,
Nnb_facts
);
t_dense
=
zeros
(
Nb_mult
+
1
,
NDims
);
t_faust
=
zeros
(
Nb_mult
+
1
,
NDims
,
NRCGs
,
Nnb_facts
,
2
);
t_dense
=
zeros
(
Nb_mult
+
1
,
NDims
,
2
);
h
=
waitbar
(
0
,
'runtime comparison (faust vs dense matrix) for various configuration ...'
);
for
i
=
1
:
Nb_mult
+
1
...
...
@@ -119,6 +119,13 @@ for i=1:Nb_mult+1
for
j
=
1
:
NDims
dim
=
Dims
(
j
);
if
strcmp
(
matrix_or_vector
,
'matrix'
)
dim2
=
dim
;
% multiplication by a square matrix
elseif
strcmp
(
matrix_or_vector
,
'vector'
)
dim2
=
1
;
% multiplication by a column-vector
else
error
(
'matrix_or_vector string must be equal to matrix or vector'
);
end
for
k
=
1
:
NRCGs
...
...
@@ -128,50 +135,53 @@ for i=1:Nb_mult+1
nfact
=
nb_facts
(
l
);
fact
=
gen_artificial_faust
(
dim
,
RCG
,
nfact
,
constraint
);
faust_transform
=
matlab_faust
(
fact
);
if
strcmp
(
matrix_or_vector
,
'matrix'
)
x
=
rand
(
dim
);
y
=
zeros
(
dim
);
yfaust
=
zeros
(
dim
);
elseif
strcmp
(
matrix_or_vector
,
'vector'
)
x
=
rand
(
dim
,
1
);
y
=
zeros
(
dim
,
1
);
yfaust
=
zeros
(
dim
,
1
);
x
=
rand
(
dim
,
dim2
);
y
=
zeros
(
dim
,
dim2
);
yfaust
=
zeros
(
dim
,
dim2
);
y_trans
=
zeros
(
dim
,
dim2
);
yfaust_trans
=
zeros
(
dim
,
dim2
);
else
error
(
'matrix_or_vector string must be equal to matrix or vector'
);
end
taillefaust
=
size
(
faust_transform
);
if
((
taillefaust
(
1
)
~=
dim
)
+
(
taillefaust
(
2
)
~=
dim
))
error
(
'invalid faust'
);
end
%% multiplication dense
if
(
k
==
1
)
&&
(
l
==
1
)
A
=
list_dense
{
j
};
tic
;
y
=
A
*
x
;
t
=
toc
;
t_dense
(
i
,
j
)
=
t
;
tdense
=
toc
;
t_dense
(
i
,
j
,
1
)
=
tdense
;
tic
y_trans
=
A
'*
x
;
tdense_trans
=
toc
;
t_dense
(
i
,
j
,
2
)
=
tdense_trans
;
end
%% multiplication par un faust
faust_transform
=
list_faust
{
j
,
k
,
l
};
tic
;
yfaust
=
faust_transform
*
x
;
t
=
toc
;
t_faust
(
i
,
j
,
k
,
l
)
=
t
;
tfaust
=
toc
;
t_faust
(
i
,
j
,
k
,
l
,
1
)
=
tfaust
;
tic
;
yfaust_trans
=
mtimes_trans
(
faust_transform
,
x
,
'T'
);
tfaust_trans
=
toc
;
t_faust
(
i
,
j
,
k
,
l
,
2
)
=
tfaust_trans
;
end
end
end
end
close
(
h
);
t_faust
(
1
,:,:,:)
=
[];
t_dense
(
1
,:)
=
[];
t_faust
(
1
,:,:,:
,:
)
=
[];
t_dense
(
1
,:
,:
)
=
[];
runPath
=
which
(
mfilename
);
pathname
=
fileparts
(
runPath
);
matfile
=
fullfile
(
pathname
,
'runtime_comparison.mat'
);
save
(
matfile
,
't_faust'
,
't_dense'
,
'params'
);
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