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

fix binary_op on operands with single element #868

Merged
merged 10 commits into from
Oct 8, 2021
Merged

Conversation

mtar
Copy link
Collaborator

@mtar mtar commented Sep 16, 2021

Description

This PR fixes a known bug in _operations.__binary_op() where the data of an DNDarray is copied to all processors if it only contains one element.

The fix introduces the method 'Split()' to MPICommunicator for splitting it into new ones. These new ones are used for the data transfer in __binary_op()

Issue/s resolved: #866

Changes proposed:

  • add MPICommunicator.Split()
  • fix data transfer in __binary_op()

Type of change

  • Bug fix / New feature

Due Diligence

  • All split configurations tested
  • Multiple dtypes tested in relevant functions
  • Documentation updated (if needed)
  • Updated changelog.md under the title "Pending Additions"

Does this change modify the behaviour of other functions? If so, which?

no

@codecov
Copy link

codecov bot commented Sep 16, 2021

Codecov Report

Merging #868 (18a8297) into master (c570047) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #868   +/-   ##
=======================================
  Coverage   95.48%   95.49%           
=======================================
  Files          64       64           
  Lines        9463     9472    +9     
=======================================
+ Hits         9036     9045    +9     
  Misses        427      427           
Flag Coverage Δ
gpu 94.62% <100.00%> (+<0.01%) ⬆️
unit 91.02% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
heat/core/_operations.py 95.87% <100.00%> (+0.10%) ⬆️
heat/core/communication.py 96.76% <100.00%> (+0.02%) ⬆️

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 c570047...18a8297. Read the comment docs.

@mtar mtar marked this pull request as ready for review September 16, 2021 13:34
heat/core/_operations.py Show resolved Hide resolved
heat/core/communication.py Outdated Show resolved Hide resolved
@coquelin77 coquelin77 merged commit 1e9619d into master Oct 8, 2021
@coquelin77 coquelin77 deleted the bug/866-op-nested branch October 8, 2021 09:55
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.

print binary operations one element nested arrays
2 participants