Data types and precision
Need to check through all large summation steps to make sure data precision requirements are met.
Two important spots that come to mind:
-
Phase accumulation due to gradients. This vector will be on the timestep of the simulation, and may be as long as 10ms depending on the sequence. This could mean a vector length of ~10000 for a 1us timestep. Since TF32 has only ~7 decimal points of precision, we may be getting close to rounding errors
-
Summation of particles. This is batch size dependent. With batches of >100,000 particles, we are getting close to the precision limit for TF32. Although in cases where spins dont interfere perfectly constructively, this limit is much farther away.
Overall, we should try to avoid using higher precision unless absolutely necessary. Or maybe warn the user of possible rounding errors if the defined parameters may cause it.