-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexperiments.m
57 lines (50 loc) · 924 Bytes
/
experiments.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
% experiments.m This script runs the experiments in [Sec. 5, 1].
%
% Requirements:
% CPFloat (https://github.com/north-numerical-computing/cpfloat/).
%
% References:
% [1] T. Mary and M. Mikaitis.
% Error Analysis of Matrix Multiplication with Narrow Range
% Floating-Point Arithmetic. hal-04671474. Aug. 2024.
clear all; rng(1);
input_format = 'fp8-e4m3';
accum_format = 'binary16';
p = 1;
matmul_test;
p = 2;
matmul_test;
p = 3;
matmul_test;
input_format = 'fp8-e5m2';
accum_format = 'binary16';
p = 1;
matmul_test;
p = 2;
matmul_test;
p = 3;
matmul_test;
input_format = 'fp8-e4m3';
accum_format = 'binary32';
p = 1;
matmul_test;
p = 2;
matmul_test;
p = 3;
matmul_test;
input_format = 'fp8-e5m2';
accum_format = 'binary32';
p = 1;
matmul_test;
p = 2;
matmul_test;
p = 3;
matmul_test;
input_format = 'binary16';
accum_format = 'binary32';
p = 1;
matmul_test;
p = 2;
matmul_test;
p = 3;
matmul_test;