TEST OF SMATRIXGPU IMPLEMENTATION AND NUMERICAL FLUCTUATIONS
DONE BY: MAKSYM KIZITSKYI
SUPERVISOR: MATTEO CONCAS
CERN, 7 AUGUST 2024
GOALS OF THE WORK
Evaluate the implementation of SMatrixGPU to detect any numerical fluctuations during its operation.
These tests are crucial for identifying and addressing potential errors due to fluctuations that can occur during matrix operations, ensuring the reliability and accuracy of computations.
APPROACH
Initialize matrices with random floating-point values.
Perform basic matrix operations (inversion, copying, and multiplication) on both CPU and GPU.
Compare the results of CPU and GPU computations to verify the correctness and identify any discrepancies.
IMPLEMENTATION
Conducted inversion, copying, and multiplication tests on both symmetrical and general matrices.
Verified results by printing matrices in both decimal and binary formats.
Applied a tolerance level of 1e-5 for by-element comparisons in cases where numerical fluctuations occurred.
RESULTS
Without fast math
With fast math on
CONCLUSIONS
Tests revealed small numerical fluctuations (approximately 1e-7) in GPU operations, affecting an average of 3 out of 9 elements. The remaining elements were identical to the CPU results.
Disabling fast math operations can minimize these fluctuations.
For high-precision tasks, it is advisable to turn off fast math operations. If calculation speed is prioritized and an error margin of 1e-7 is acceptable, fast math can remain enabled.
THANK YOU FOR YOUR ATTENTION!