graphcore-research / pyscf-ipu

PySCF on IPU
https://github.com/graphcore-research/pyscf-ipu#readme
Apache License 2.0
41 stars 3 forks source link

add num_error visualisation on demand #118

Closed akrzgc closed 9 months ago

akrzgc commented 9 months ago

The change introduces functionality of numerical error visualisation for selected tensors (all possible at the moment). In order to visualise numerical error for a given nanoDFT.py run one should use new parameter --vis_num_error true. The script uses host callback to be able to save the tensors from the device to a number of files so that option shall not be used when profiling performance. The script assumes that the parameter provided as a --mol_str from the command line will be treated as molecule name and based on that the name of required helper directories and files will be created. However, one may also use a newly introduced parameter --molecule_name which would overwrite the --mol_str provided by the CLI.

The script executed with --vis_num_error true shall provide similar result to below ones: visualize_DFT_num_error_benzene visualize_DFT_num_error_c20

The change is addressing the first part of: https://github.com/graphcore-research/pyscf-ipu/issues/43

AlexanderMath commented 9 months ago

Looks good. Only suggestion: I think if we remove the +15 here the label would be put on top of the line.