num_acc_experiment module
Numerical accuracy experiment for the qmatmul package.
Measures the relative error of float32 computations against a float64 reference, for both the direct (definition-based) and algo (proposed fast algorithm) approaches, CUDA backend. A single deterministic run per problem size is used (no repetitions or warm-up, as this is an accuracy study, not a timing study).
Primary metrics: relative_frobenius_error (global accuracy), and max_abs_error together with max_combined_error (worst-case accuracy; max_combined_error uses the same atol/rtol tolerance already used for the np.allclose correctness checks in main.py). max_relative_error, rms_error and min_abs_ref are auxiliary metrics characterizing the element-wise error distribution.
Link to project repository
- num_acc_experiment.relative_frobenius_error(C_approx, C_ref_f64)[source]
Relative error in Frobenius norm.
- num_acc_experiment.max_relative_error(C_approx, C_ref_f64, eps=1e-15)[source]
Element-wise relative error.