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

REF: Reorganize how multi-device parallelism is implemented #322

Merged
merged 33 commits into from
Jul 17, 2024

Conversation

carterbox
Copy link
Contributor

@carterbox carterbox commented Jun 28, 2024

Purpose

Reduce communications overhead for multi-device reconstructions and hopefully speed up large reconstructions.

Separate multi-device parallelism from reconstruction logic (ptycho solver implementation).

Approach

Instead of synchronizing every update to the probe/object across all devices, use an approach that is more like distributed consensus where devices only communicate with their neighbors for object updates and synchronization only happens once per epoch.

The effect of this approach on performance is minor reduction in time per epoch for all numbers of GPUs, but increase in the number of epochs required for convergence for multi-gpu reconstructions because information is exchanged between GPUs less frequently.

Screenshot from 2024-07-09 12-28-25

Pre-Merge Checklists

Submitter

  • Write a helpfully descriptive pull request title.
  • Organize changes into logically grouped commits with descriptive commit messages.
  • Document all new functions.
  • Click 'details' on the readthedocs check to view the updated docs.
  • Write tests for new functions or explain why they are not needed.
  • Address any complaints from pep8speaks.

Reviewer

  • Actually read all of the code.
  • Run the new code yourself; the included tests should make this easy.
  • Write a summary of the changes as you understand them.
  • Thank the submitter.

@pep8speaks
Copy link

pep8speaks commented Jun 28, 2024

Hello @carterbox! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 459:81: E501 line too long (81 > 80 characters)

Line 158:81: E501 line too long (81 > 80 characters)
Line 180:22: E225 missing whitespace around operator
Line 218:22: E225 missing whitespace around operator
Line 247:22: E225 missing whitespace around operator
Line 398:29: E203 whitespace before ':'
Line 398:40: E203 whitespace before ':'
Line 410:48: E203 whitespace before ':'
Line 410:55: E203 whitespace before ':'
Line 411:27: E203 whitespace before ':'
Line 411:38: E203 whitespace before ':'
Line 419:25: E203 whitespace before ':'
Line 419:32: E203 whitespace before ':'
Line 428:25: E203 whitespace before ':'
Line 428:32: E203 whitespace before ':'
Line 429:29: E203 whitespace before ':'
Line 429:36: E203 whitespace before ':'
Line 436:41: E203 whitespace before ':'
Line 436:48: E203 whitespace before ':'
Line 438:29: E203 whitespace before ':'
Line 453:21: E203 whitespace before ':'
Line 453:32: E203 whitespace before ':'

Line 395:81: E501 line too long (101 > 80 characters)
Line 396:81: E501 line too long (105 > 80 characters)
Line 397:81: E501 line too long (103 > 80 characters)
Line 407:81: E501 line too long (101 > 80 characters)
Line 408:81: E501 line too long (105 > 80 characters)
Line 409:81: E501 line too long (103 > 80 characters)
Line 419:81: E501 line too long (101 > 80 characters)
Line 420:81: E501 line too long (105 > 80 characters)
Line 421:81: E501 line too long (103 > 80 characters)
Line 500:81: E501 line too long (87 > 80 characters)
Line 710:1: E302 expected 2 blank lines, found 1
Line 721:81: E501 line too long (84 > 80 characters)
Line 749:81: E501 line too long (88 > 80 characters)
Line 868:81: E501 line too long (81 > 80 characters)
Line 871:81: E501 line too long (86 > 80 characters)

Line 83:81: E501 line too long (85 > 80 characters)
Line 97:81: E501 line too long (85 > 80 characters)
Line 290:81: E501 line too long (85 > 80 characters)
Line 320:81: E501 line too long (85 > 80 characters)

Line 280:81: E501 line too long (82 > 80 characters)

Line 90:81: E501 line too long (85 > 80 characters)
Line 275:81: E501 line too long (82 > 80 characters)
Line 345:81: E501 line too long (81 > 80 characters)

Line 146:81: E501 line too long (81 > 80 characters)
Line 162:81: E501 line too long (82 > 80 characters)
Line 164:36: E203 whitespace before ':'
Line 166:40: E203 whitespace before ':'

Comment last updated at 2024-07-17 18:41:45 UTC

@carterbox carterbox marked this pull request as ready for review July 9, 2024 17:34
@carterbox carterbox merged commit 73242b0 into AdvancedPhotonSource:main Jul 17, 2024
3 of 7 checks passed
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.

3 participants