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

Improving RDF #290

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Improving RDF #290

wants to merge 2 commits into from

Conversation

PythonFZ
Copy link
Member

@PythonFZ PythonFZ commented Aug 2, 2021

I attempted to optimize the RDF code a little bit.

On an 108000 atoms system using

experiment.run_computation.RadialDistributionFunction(
    number_of_configurations=40, minibatch=32, batches=1, benchmark=True, correct_minibatch_batching=20
)

on an RTX2080 this code is about 20 % faster then the old code (0.76 GHz v. 0.91 GHz).

Main changes are:

  • optimized TF function usage
  • reduce redundancy
  • optimize batch size so the GPU usage keeps almost constant over the full computation and not only on the start

Additions:

  • benchmark kwarg
  • correct_minibatch_batching kwarg

Still missing

  • fix for large values on correct_minibatch_batching
  • documentation
  • small systems seem to fail

@PythonFZ PythonFZ changed the base branch from main to development August 2, 2021 20:23
@SamTov
Copy link
Member

SamTov commented Aug 2, 2021

Can you elaborate on the small systems seem to fail?

@PythonFZ
Copy link
Member Author

PythonFZ commented Aug 3, 2021

Can you elaborate on the small systems seem to fail?

There are value errors and the RDFs look sometimes different to what they should look like.

@SamTov
Copy link
Member

SamTov commented Aug 3, 2021

If you have any example that would be helpful. It's an odd problem.

@SamTov
Copy link
Member

SamTov commented Aug 15, 2021

Is this PR ready to go?

@SamTov SamTov marked this pull request as ready for review August 15, 2021 13:25
Copy link
Member

@SamTov SamTov left a comment

Choose a reason for hiding this comment

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

all the code looks good. if tests pass we can go with it unless there are some specific issues

@PythonFZ
Copy link
Member Author

Unfortunately there are still issues with the Code that need to be resolved.

@SamTov
Copy link
Member

SamTov commented Aug 15, 2021

Which ones? I'd like to bring this PR in so that I can run a black restructure on the code and merge the correctly formatted version. This could also wait until after all current PRs are done but it will make it a bit messier.

Copy link
Member

@SamTov SamTov left a comment

Choose a reason for hiding this comment

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

Removing approval to avoid accidental merge.

@PythonFZ
Copy link
Member Author

If I remember correctly, running it with different parameters for correct_minibatch_batching gave different results

@SamTov
Copy link
Member

SamTov commented Aug 15, 2021

I will look into it tonight

@SamTov
Copy link
Member

SamTov commented Aug 16, 2021

I've run the RDF on a 1000 atom system with differing correct mini batch arguments and received the same values each time. I will now check the small system size comment.

@PythonFZ PythonFZ added the draft label Sep 17, 2021
@SamTov SamTov added the wontfix This will not be worked on label Sep 17, 2021
@SamTov
Copy link
Member

SamTov commented Nov 17, 2021

@PythonFZ I think this can really be closed now.

@PythonFZ
Copy link
Member Author

@PythonFZ I think this can really be closed now.

I don't think it has to - the idea is still valid and would improve the RDF speed. It needs to be fixed and tested before merging, but I don't see any need to close this PR.

@PythonFZ PythonFZ marked this pull request as draft November 17, 2021 15:17
@SamTov SamTov changed the base branch from development to main November 25, 2021 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
draft wontfix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants