Skip to content

Adding Single-Floating Point Precision #7

@Ali-Tehrani

Description

@Ali-Tehrani

I believe most of the cases of post-processing (e.g. QTAIM, Hirshfeld, electrostatics) doesn't require double precision (7 versus 15-16 decimal places) the way that Quantum chemistry codes require for the computation of the energy.

This would provide much greater speed-ups due to the less register usage per thread (max 255 32-bit registers), and higher FLOPS of 32- bit, e.g. TITAN V has 14.9 TFLOPS (FP32) versus 7.450 TFLOPS (FP64). I'll guess for the largest peptide (2390 basis-funcs, 9 amino-acids) this would bring atleast >2x speed-ups.

It would be tedious to implement but not hard at all, as you would use templates template<typename T> and use the correct function func<float>, func<double> according to the passed NumPy array in pymolecule.cu. It may be very difficult using Eigen to expose different functions, see https://github.com/pybind/pybind11/issues/3085 recommends using lambda functions or see https://github.com/pybind/pybind11/issues/1324.

Also see the paper
"P. Pokhilko, E. Epifanovsky, and A. I. Krylov, “Double precision is not needed
for many-body calculations: Emergent conventional wisdom,” J. Chem. Theory
Comput. 14, 4088–4096 (2018)"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions