mirror of
https://github.com/amd/blis.git
synced 2026-05-11 09:39:59 +00:00
More edits to mixeddt matlab scripts.
Details:
- Renamed scripts in test/mixeddt/matlab:
plot_case_all.m -> plot_dom_all.m
plot_case_md.m -> plot_dom_case.m
plot_all_md.m -> plot_dt_all.m
- Added plot_dt_select.m in order to plot select graphs for the main
body of the mixeddt paper, and added additional related legend
handling in plot_gemm_perf.m.
- Added test/mixeddt/matlab/output and a .gitkeep file within in order
to force git to recognize the directory.
This commit is contained in:
0
test/mixeddt/matlab/output/.gitkeep
Normal file
0
test/mixeddt/matlab/output/.gitkeep
Normal file
@@ -1,4 +1,4 @@
|
||||
function r_val = plot_case_all( is_mt )
|
||||
function r_val = plot_dom_all( is_mt )
|
||||
|
||||
cases( 1, : ) = [ 'rrr' ];
|
||||
cases( 2, : ) = [ 'rrc' ];
|
||||
@@ -15,7 +15,7 @@ for i = 1:n_cases
|
||||
|
||||
thecase = cases( i, : );
|
||||
|
||||
plot_case_md( thecase, is_mt );
|
||||
plot_dom_case( thecase, is_mt );
|
||||
end
|
||||
|
||||
r_val = 0;
|
||||
@@ -1,4 +1,4 @@
|
||||
function r_val = plot_case_md( mdcase, is_mt )
|
||||
function r_val = plot_dom_case( mdcase, is_mt )
|
||||
|
||||
if is_mt == 1
|
||||
thr_str = 'mt';
|
||||
@@ -27,9 +27,7 @@ filetemp_open = '../output_%s_%sgemm_openblas.m';
|
||||
% the data files, and finally save the results to different variable names.
|
||||
file_blis_sref = sprintf( filetemp_blis, thr_str, 'ssss' );
|
||||
file_open_sref = sprintf( filetemp_open, thr_str, 'ssss' );
|
||||
%str = sprintf( ' Loading %s', file_blis_sref ); disp(str);
|
||||
run( file_blis_sref )
|
||||
%str = sprintf( ' Loading %s', file_open_sref ); disp(str);
|
||||
run( file_open_sref )
|
||||
data_gemm_asm_blis_sref( :, : ) = data_gemm_asm_blis( :, : );
|
||||
data_gemm_openblas_sref( :, : ) = data_gemm_openblas( :, : );
|
||||
@@ -38,9 +36,7 @@ data_gemm_openblas_sref( :, : ) = data_gemm_openblas( :, : );
|
||||
% the data files, and finally save the results to different variable names.
|
||||
file_blis_dref = sprintf( filetemp_blis, thr_str, 'dddd' );
|
||||
file_open_dref = sprintf( filetemp_open, thr_str, 'dddd' );
|
||||
%str = sprintf( ' Loading %s', file_blis_dref ); disp(str);
|
||||
run( file_blis_dref )
|
||||
%str = sprintf( ' Loading %s', file_open_dref ); disp(str);
|
||||
run( file_open_dref )
|
||||
data_gemm_asm_blis_dref( :, : ) = data_gemm_asm_blis( :, : );
|
||||
data_gemm_openblas_dref( :, : ) = data_gemm_openblas( :, : );
|
||||
@@ -49,9 +45,7 @@ data_gemm_openblas_dref( :, : ) = data_gemm_openblas( :, : );
|
||||
% the data files, and finally save the results to different variable names.
|
||||
file_blis_cref = sprintf( filetemp_blis, thr_str, 'cccs' );
|
||||
file_open_cref = sprintf( filetemp_open, thr_str, 'cccs' );
|
||||
%str = sprintf( ' Loading %s', file_blis_cref ); disp(str);
|
||||
run( file_blis_cref )
|
||||
%str = sprintf( ' Loading %s', file_open_cref ); disp(str);
|
||||
run( file_open_cref )
|
||||
data_gemm_asm_blis_cref( :, : ) = data_gemm_asm_blis( :, : );
|
||||
data_gemm_openblas_cref( :, : ) = data_gemm_openblas( :, : );
|
||||
@@ -60,9 +54,7 @@ data_gemm_openblas_cref( :, : ) = data_gemm_openblas( :, : );
|
||||
% the data files, and finally save the results to different variable names.
|
||||
file_blis_zref = sprintf( filetemp_blis, thr_str, 'zzzd' );
|
||||
file_open_zref = sprintf( filetemp_open, thr_str, 'zzzd' );
|
||||
%str = sprintf( ' Loading %s', file_blis_zref ); disp(str);
|
||||
run( file_blis_zref )
|
||||
%str = sprintf( ' Loading %s', file_open_zref ); disp(str);
|
||||
run( file_open_zref )
|
||||
data_gemm_asm_blis_zref( :, : ) = data_gemm_asm_blis( :, : );
|
||||
data_gemm_openblas_zref( :, : ) = data_gemm_openblas( :, : );
|
||||
@@ -142,7 +134,7 @@ end
|
||||
%set(gcf,'PaperOrientation','landscape');
|
||||
%end
|
||||
|
||||
outfile = sprintf( 'gemm_%s', mdcase );
|
||||
outfile = sprintf( 'output/gemm_%s', mdcase );
|
||||
|
||||
print(gcf, outfile,'-bestfit','-dpdf');
|
||||
%print(gcf, 'gemm_md','-fillpage','-dpdf');
|
||||
@@ -1,4 +1,4 @@
|
||||
function r_val = plot_all_md( is_mt )
|
||||
function r_val = plot_dt_all( is_mt )
|
||||
|
||||
if is_mt == 1
|
||||
thr_str = 'mt';
|
||||
@@ -139,5 +139,5 @@ set(gcf,'PaperPosition', [0 0 48 22]);
|
||||
set(gcf,'PaperPositionMode','manual');
|
||||
set(gcf,'PaperOrientation','landscape');
|
||||
end
|
||||
print(gcf, 'gemm_md','-bestfit','-dpdf');
|
||||
print(gcf, 'output/gemm_md','-bestfit','-dpdf');
|
||||
%print(gcf, 'gemm_md','-fillpage','-dpdf');
|
||||
148
test/mixeddt/matlab/plot_dt_select.m
Normal file
148
test/mixeddt/matlab/plot_dt_select.m
Normal file
@@ -0,0 +1,148 @@
|
||||
function r_val = plot_dt_select( dom, is_mt )
|
||||
|
||||
if is_mt == 1
|
||||
thr_str = 'mt';
|
||||
else
|
||||
thr_str = 'st';
|
||||
end
|
||||
|
||||
if dom == 'r'
|
||||
|
||||
dt_combos( 1, : ) = [ 'dsss' ];
|
||||
dt_combos( 2, : ) = [ 'sddd' ];
|
||||
dt_combos( 3, : ) = [ 'sdds' ];
|
||||
dt_combos( 4, : ) = [ 'dssd' ];
|
||||
dt_combos( 5, : ) = [ 'ddds' ];
|
||||
dt_combos( 6, : ) = [ 'sssd' ];
|
||||
|
||||
else
|
||||
|
||||
dt_combos( 1, : ) = [ 'csss' ];
|
||||
dt_combos( 2, : ) = [ 'zddd' ];
|
||||
dt_combos( 3, : ) = [ 'ccss' ];
|
||||
dt_combos( 4, : ) = [ 'zzdd' ];
|
||||
dt_combos( 5, : ) = [ 'cscs' ];
|
||||
dt_combos( 6, : ) = [ 'zdzd' ];
|
||||
end
|
||||
|
||||
n_combos = size(dt_combos,1);
|
||||
|
||||
filetemp_blis = '../output_%s_%sgemm_asm_blis.m';
|
||||
filetemp_open = '../output_%s_%sgemm_openblas.m';
|
||||
|
||||
% Construct filenames for the "reference" (single real) data, then load
|
||||
% the data files, and finally save the results to different variable names.
|
||||
file_blis_sref = sprintf( filetemp_blis, thr_str, 'ssss' );
|
||||
file_open_sref = sprintf( filetemp_open, thr_str, 'ssss' );
|
||||
run( file_blis_sref )
|
||||
run( file_open_sref )
|
||||
data_gemm_asm_blis_sref( :, : ) = data_gemm_asm_blis( :, : );
|
||||
data_gemm_openblas_sref( :, : ) = data_gemm_openblas( :, : );
|
||||
|
||||
% Construct filenames for the "reference" (double real) data, then load
|
||||
% the data files, and finally save the results to different variable names.
|
||||
file_blis_dref = sprintf( filetemp_blis, thr_str, 'dddd' );
|
||||
file_open_dref = sprintf( filetemp_open, thr_str, 'dddd' );
|
||||
run( file_blis_dref )
|
||||
run( file_open_dref )
|
||||
data_gemm_asm_blis_dref( :, : ) = data_gemm_asm_blis( :, : );
|
||||
data_gemm_openblas_dref( :, : ) = data_gemm_openblas( :, : );
|
||||
|
||||
% Construct filenames for the "reference" (single complex) data, then load
|
||||
% the data files, and finally save the results to different variable names.
|
||||
file_blis_cref = sprintf( filetemp_blis, thr_str, 'cccs' );
|
||||
file_open_cref = sprintf( filetemp_open, thr_str, 'cccs' );
|
||||
run( file_blis_cref )
|
||||
run( file_open_cref )
|
||||
data_gemm_asm_blis_cref( :, : ) = data_gemm_asm_blis( :, : );
|
||||
data_gemm_openblas_cref( :, : ) = data_gemm_openblas( :, : );
|
||||
|
||||
% Construct filenames for the "reference" (double complex) data, then load
|
||||
% the data files, and finally save the results to different variable names.
|
||||
file_blis_zref = sprintf( filetemp_blis, thr_str, 'zzzd' );
|
||||
file_open_zref = sprintf( filetemp_open, thr_str, 'zzzd' );
|
||||
run( file_blis_zref )
|
||||
run( file_open_zref )
|
||||
data_gemm_asm_blis_zref( :, : ) = data_gemm_asm_blis( :, : );
|
||||
data_gemm_openblas_zref( :, : ) = data_gemm_openblas( :, : );
|
||||
|
||||
%fig = figure;
|
||||
fig = figure('Position', [100, 100, 1024, 1300]);
|
||||
orient( fig, 'portrait' );
|
||||
%set(gcf,'Position',[0 0 2000 900]);
|
||||
set(gcf,'PaperUnits', 'inches');
|
||||
%set(gcf,'PaperSize', [16 12.4]);
|
||||
%set(gcf,'PaperPosition', [0 0 16 12.4]);
|
||||
set(gcf,'PaperSize', [9 11.0]);
|
||||
set(gcf,'PaperPosition', [0 0 9 11.0]);
|
||||
%set(gcf,'PaperPositionMode','auto');
|
||||
set(gcf,'PaperPositionMode','manual');
|
||||
set(gcf,'PaperOrientation','portrait');
|
||||
|
||||
for dti = 1:n_combos
|
||||
%for dti = 1:1
|
||||
|
||||
% Grab the current datatype combination.
|
||||
combo = dt_combos( dti, : );
|
||||
|
||||
str = sprintf( 'Plotting %d: %s', dti, combo ); disp(str);
|
||||
|
||||
if combo(4) == 's'
|
||||
data_gemm_asm_blis_ref( :, : ) = data_gemm_asm_blis_sref( :, : );
|
||||
data_gemm_openblas_ref( :, : ) = data_gemm_openblas_sref( :, : );
|
||||
refch = 's';
|
||||
else %if combo(4) == 'd'
|
||||
data_gemm_asm_blis_ref( :, : ) = data_gemm_asm_blis_dref( :, : );
|
||||
data_gemm_openblas_ref( :, : ) = data_gemm_openblas_dref( :, : );
|
||||
refch = 'd';
|
||||
end
|
||||
|
||||
if ( combo(1) == 'c' || combo(1) == 'z' ) && ...
|
||||
( combo(2) == 'c' || combo(2) == 'z' ) && ...
|
||||
( combo(3) == 'c' || combo(3) == 'z' )
|
||||
if combo(4) == 's'
|
||||
data_gemm_asm_blis_ref( :, : ) = data_gemm_asm_blis_cref( :, : );
|
||||
data_gemm_openblas_ref( :, : ) = data_gemm_openblas_cref( :, : );
|
||||
refch = 'c';
|
||||
else %if combo(4) == 'd'
|
||||
data_gemm_asm_blis_ref( :, : ) = data_gemm_asm_blis_zref( :, : );
|
||||
data_gemm_openblas_ref( :, : ) = data_gemm_openblas_zref( :, : );
|
||||
refch = 'z';
|
||||
end
|
||||
end
|
||||
|
||||
% Construct filenames for the data files from templates.
|
||||
file_blis = sprintf( filetemp_blis, thr_str, combo );
|
||||
file_open = sprintf( filetemp_open, thr_str, combo );
|
||||
|
||||
% Load the data files.
|
||||
%str = sprintf( ' Loading %s', file_blis ); disp(str);
|
||||
run( file_blis )
|
||||
%str = sprintf( ' Loading %s', file_open ); disp(str);
|
||||
run( file_open )
|
||||
|
||||
% Plot the result.
|
||||
plot_gemm_perf( combo, ...
|
||||
data_gemm_asm_blis, ...
|
||||
data_gemm_asm_blis_ref, ...
|
||||
data_gemm_openblas, ...
|
||||
data_gemm_openblas_ref, ...
|
||||
is_mt, refch, 3, 2, dti );
|
||||
|
||||
end
|
||||
|
||||
|
||||
%if 0
|
||||
%set(gcf,'Position',[0 0 2000 900]);
|
||||
%set(gcf,'PaperUnits', 'inches');
|
||||
%set(gcf,'PaperSize', [48 22]);
|
||||
%set(gcf,'PaperPosition', [0 0 48 22]);
|
||||
%%set(gcf,'PaperPositionMode','auto');
|
||||
%set(gcf,'PaperPositionMode','manual');
|
||||
%set(gcf,'PaperOrientation','landscape');
|
||||
%end
|
||||
|
||||
outfile = sprintf( 'output/gemm_select_%c', dom );
|
||||
|
||||
print(gcf, outfile,'-bestfit','-dpdf');
|
||||
%print(gcf, 'gemm_md','-fillpage','-dpdf');
|
||||
@@ -124,77 +124,115 @@ ylim( ax1, [y_begin y_end] );
|
||||
|
||||
if rows == 8 && cols == 16
|
||||
|
||||
if theid == 1
|
||||
leg = legend( ...
|
||||
[ ...
|
||||
blis_ref ...
|
||||
blis_md ...
|
||||
open_md ...
|
||||
], ...
|
||||
blis_sref_legend, ...
|
||||
blis_legend, ...
|
||||
open_legend, ...
|
||||
'Location', 'best' );
|
||||
%'Location', legend_loc );
|
||||
set( leg,'Box','off' );
|
||||
set( leg,'Color','none' );
|
||||
set( leg,'FontSize',fontsize-2 );
|
||||
set( leg,'Units','inches' );
|
||||
elseif theid == 9
|
||||
leg = legend( ...
|
||||
[ ...
|
||||
blis_ref ...
|
||||
blis_md ...
|
||||
open_md ...
|
||||
], ...
|
||||
blis_dref_legend, ...
|
||||
blis_legend, ...
|
||||
open_legend, ...
|
||||
'Location', 'best' );
|
||||
%'Location', legend_loc );
|
||||
set( leg,'Box','off' );
|
||||
set( leg,'Color','none' );
|
||||
set( leg,'FontSize',fontsize-2 );
|
||||
set( leg,'Units','inches' );
|
||||
end
|
||||
if theid == 1
|
||||
leg = legend( ...
|
||||
[ ...
|
||||
blis_ref ...
|
||||
blis_md ...
|
||||
open_md ...
|
||||
], ...
|
||||
blis_sref_legend, ...
|
||||
blis_legend, ...
|
||||
open_legend, ...
|
||||
'Location', 'best' );
|
||||
%'Location', legend_loc );
|
||||
set( leg,'Box','off' );
|
||||
set( leg,'Color','none' );
|
||||
set( leg,'FontSize',fontsize-2 );
|
||||
set( leg,'Units','inches' );
|
||||
elseif theid == 9
|
||||
leg = legend( ...
|
||||
[ ...
|
||||
blis_ref ...
|
||||
blis_md ...
|
||||
open_md ...
|
||||
], ...
|
||||
blis_dref_legend, ...
|
||||
blis_legend, ...
|
||||
open_legend, ...
|
||||
'Location', 'best' );
|
||||
%'Location', legend_loc );
|
||||
set( leg,'Box','off' );
|
||||
set( leg,'Color','none' );
|
||||
set( leg,'FontSize',fontsize-2 );
|
||||
set( leg,'Units','inches' );
|
||||
end
|
||||
|
||||
else % rows == 4 && cols == 4
|
||||
elseif rows == 4 && cols == 4
|
||||
|
||||
if theid == 1
|
||||
leg = legend( ...
|
||||
[ ...
|
||||
blis_ref ...
|
||||
blis_md ...
|
||||
open_md ...
|
||||
], ...
|
||||
blis_ref_legend, ...
|
||||
blis_legend, ...
|
||||
open_legend, ...
|
||||
'Location', legend_loc );
|
||||
%'Location', 'best' );
|
||||
set( leg,'Box','off' );
|
||||
set( leg,'Color','none' );
|
||||
set( leg,'FontSize',fontsize-2 );
|
||||
set( leg,'Units','inches' );
|
||||
set( leg,'Position',[1.03 3.46 0.7 0.3 ] );
|
||||
elseif theid == 3
|
||||
leg = legend( ...
|
||||
[ ...
|
||||
blis_ref ...
|
||||
blis_md ...
|
||||
open_md ...
|
||||
], ...
|
||||
blis_ref_legend, ...
|
||||
blis_legend, ...
|
||||
open_legend, ...
|
||||
'Location', legend_loc );
|
||||
%'Location', 'best' );
|
||||
set( leg,'Box','off' );
|
||||
set( leg,'Color','none' );
|
||||
set( leg,'FontSize',fontsize-2 );
|
||||
set( leg,'Units','inches' );
|
||||
set( leg,'Position',[3.51 3.46 0.7 0.3 ] );
|
||||
end
|
||||
if theid == 1
|
||||
leg = legend( ...
|
||||
[ ...
|
||||
blis_ref ...
|
||||
blis_md ...
|
||||
open_md ...
|
||||
], ...
|
||||
blis_ref_legend, ...
|
||||
blis_legend, ...
|
||||
open_legend, ...
|
||||
'Location', legend_loc );
|
||||
%'Location', 'best' );
|
||||
set( leg,'Box','off' );
|
||||
set( leg,'Color','none' );
|
||||
set( leg,'FontSize',fontsize-2 );
|
||||
set( leg,'Units','inches' );
|
||||
set( leg,'Position',[1.03 3.46 0.7 0.3 ] );
|
||||
elseif theid == 3
|
||||
leg = legend( ...
|
||||
[ ...
|
||||
blis_ref ...
|
||||
blis_md ...
|
||||
open_md ...
|
||||
], ...
|
||||
blis_ref_legend, ...
|
||||
blis_legend, ...
|
||||
open_legend, ...
|
||||
'Location', legend_loc );
|
||||
%'Location', 'best' );
|
||||
set( leg,'Box','off' );
|
||||
set( leg,'Color','none' );
|
||||
set( leg,'FontSize',fontsize-2 );
|
||||
set( leg,'Units','inches' );
|
||||
set( leg,'Position',[3.51 3.46 0.7 0.3 ] );
|
||||
end
|
||||
|
||||
elseif rows == 3 && cols == 2
|
||||
|
||||
if theid == 1
|
||||
leg = legend( ...
|
||||
[ ...
|
||||
blis_ref ...
|
||||
blis_md ...
|
||||
open_md ...
|
||||
], ...
|
||||
blis_ref_legend, ...
|
||||
blis_legend, ...
|
||||
open_legend, ...
|
||||
'Location', legend_loc );
|
||||
%'Location', 'best' );
|
||||
set( leg,'Box','off' );
|
||||
set( leg,'Color','none' );
|
||||
set( leg,'FontSize',fontsize-2 );
|
||||
set( leg,'Units','inches' );
|
||||
%set( leg,'Position',[1.03 3.46 0.7 0.3 ] );
|
||||
elseif theid == 2
|
||||
leg = legend( ...
|
||||
[ ...
|
||||
blis_ref ...
|
||||
blis_md ...
|
||||
open_md ...
|
||||
], ...
|
||||
blis_ref_legend, ...
|
||||
blis_legend, ...
|
||||
open_legend, ...
|
||||
'Location', legend_loc );
|
||||
%'Location', 'best' );
|
||||
set( leg,'Box','off' );
|
||||
set( leg,'Color','none' );
|
||||
set( leg,'FontSize',fontsize-2 );
|
||||
set( leg,'Units','inches' );
|
||||
%set( leg,'Position',[3.51 3.46 0.7 0.3 ] );
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user