use float constants and functions in float functions#1647
use float constants and functions in float functions#1647wanghan-iapcm merged 11 commits intodeepmodeling:develfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## devel #1647 +/- ##
=======================================
Coverage 76.15% 76.15%
=======================================
Files 94 94
Lines 7850 7850
=======================================
Hits 5978 5978
Misses 1872 1872 Continue to review full report at Codecov.
|
|
CI failure also happens on the |
|
Does your revision pass the UTs on GPU? |
I cannot build the UTs on GPU even on the |
Should be fixed by #1651 |
Yes. |
Co-authored-by: Denghui Lu <denghuilu@pku.edu.cn>
denghuilu
left a comment
There was a problem hiding this comment.
All UTs within the api_cc and lib folders have passed in an ROCm GPU environment, except this one:
Not found: Op type not registered 'MatrixDiagV3' in binary running on j17r2n14. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) `tf.contrib.resampler` should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.
unknown file: Failure
C++ exception with description "DeePMD-kit Error: TensorFlow Error: Not found: Op type not registered 'MatrixDiagV3' in binary running on j17r2n14. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) `tf.contrib.resampler` should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed." thrown in SetUp().
[ FAILED ] TestInferDeepPolarNew.cpu_build_nlist (378 ms)
It's a TF library problem obviously, so it should have little effect on the correctness of the test program.
Same as deepmodeling#1647, but a function was missing. Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Same as #1647, but a function was missing. Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Same as deepmodeling#1647, but a function was missing. Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Before this commit, almost all functions use double constants even under float precision. We know that a float will cast to double when adding/multiplying double.
This PR also uses
sqrtfandfmodffor GPU device float functions, instead of doublesqrtandfmod.