uncouple model precision and interface precision#2031
Conversation
This commit allows loading float models using double interface, or the other way around. The model precision is perceived from the type of `descrpt_attr/rcut`. All `run_model` and `session_input_tensors` are rewritten as templates. This is an important step of deepmodeling#1948. Next functions in the whole module can be migrated to templates.
Codecov ReportBase: 73.85% // Head: 73.86% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## devel #2031 +/- ##
=======================================
Coverage 73.85% 73.86%
=======================================
Files 198 198
Lines 19908 19934 +26
Branches 865 865
=======================================
+ Hits 14704 14724 +20
- Misses 4813 4818 +5
- Partials 391 392 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
wanghan-iapcm
left a comment
There was a problem hiding this comment.
This PR is great.
I have a question regarding the coverage of the UTs.
Ideally we should test all the four cases:
case 0: model_type == double interface_type == double
case 1: model_type == double interface_type == float
case 2: model_type == float interface_type == double
case 3: model_type == float interface_type == float
Do we currently only cover case 0? In this pr we may at least provide tests for the case 1
|
I added case 1. I found the accuracy of the float interface is not very high. |
The precision (an epsilon of 1e-4 ) is expected. |
This commit allows loading float models using the double interface, or the other way around. The model precision is perceived from the type of `descrpt_attr/rcut`. All `run_model` and `session_input_tensors` are rewritten as templates. This is an essential step of deepmodeling#1948. Next, functions in the whole module can be migrated to templates.
This commit allows loading float models using the double interface, or the other way around.
The model precision is perceived from the type of
descrpt_attr/rcut. Allrun_modelandsession_input_tensorsare rewritten as templates.This is an essential step of #1948. Next, functions in the whole module can be migrated to templates.