Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove the dependency on inputs from inputs_zero #1417

Merged
merged 7 commits into from
Jan 15, 2022

Conversation

njzjz
Copy link
Member

@njzjz njzjz commented Jan 13, 2022

When profiling on multiple CPU threads, I notice that inputs_zero always runs after descriptor is computed. However, Some threads have nothing to do during ProdEnvMatA.

image

inputs_zero can be used to fill waiting time and runs with ProdEnvMatA at the same time...

image

(cherry picked from commit e704b4a)

When profiling on multiple CPU threads, I notice that `inputs_zero` always runs after descriptor is computed. However, Some threads have nothing to do during ProdEnvMatA.

(cherry picked from commit e704b4a)
@codecov-commenter
Copy link

codecov-commenter commented Jan 13, 2022

Codecov Report

Merging #1417 (3b0c501) into devel (0d30288) will increase coverage by 1.29%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##            devel    #1417      +/-   ##
==========================================
+ Coverage   74.42%   75.71%   +1.29%     
==========================================
  Files          92       92              
  Lines        7507     7656     +149     
==========================================
+ Hits         5587     5797     +210     
+ Misses       1920     1859      -61     
Impacted Files Coverage Δ
deepmd/fit/ener.py 90.90% <71.42%> (-0.80%) ⬇️
deepmd/model/ener.py 91.96% <100.00%> (+0.22%) ⬆️
deepmd/utils/tabulate.py 80.00% <0.00%> (-4.35%) ⬇️
source/op/_gelu.py 69.23% <0.00%> (-2.20%) ⬇️
deepmd/descriptor/se_a.py 94.15% <0.00%> (ø)
source/op/_tabulate_grad.py 100.00% <0.00%> (ø)
source/op/_prod_force_grad.py 100.00% <0.00%> (ø)
source/op/_prod_virial_grad.py 100.00% <0.00%> (ø)
source/op/_soft_min_force_grad.py 100.00% <0.00%> (ø)
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0d30288...3b0c501. Read the comment docs.

Copy link
Collaborator

@wanghan-iapcm wanghan-iapcm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not a good idea to change the interface of the EnerFitting for the sake of little performance improvement.

@njzjz
Copy link
Member Author

njzjz commented Jan 14, 2022

It is not a good idea to change the interface of the EnerFitting for the sake of little performance improvement.

I can add it to input_dict instead.

This reverts commit c43ac3a.
(cherry picked from commit a4c32c7)
@njzjz
Copy link
Member Author

njzjz commented Jan 14, 2022

Done. It will also work when there's nothing in the input_dict.

Copy link
Collaborator

@wanghan-iapcm wanghan-iapcm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve this PR, but I really do not like the input_dict, which makes the interfaces unclear...

@wanghan-iapcm wanghan-iapcm merged commit b88c1da into deepmodeling:devel Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants