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

Features/590 nbytes #683

Merged
merged 5 commits into from Oct 13, 2020
Merged

Features/590 nbytes #683

merged 5 commits into from Oct 13, 2020

Conversation

lenablind
Copy link
Collaborator

@lenablind lenablind commented Oct 9, 2020

Description

Implementation of properties nbytes, gnbytes, lnbytes which return the memory consumed by the underlying tensor.
nbytes is equivalent to gnbytes, lnbytes refers to the local torch tensor.

Numpy analogue: https://numpy.org/doc/stable/reference/generated/numpy.ndarray.nbytes.html

Issue/s resolved: #590

Changes proposed:

  • Introduction of properties nbytes, gnbytes, lnbytes
  • Implementation of corresponding tests

Type of change

  • New feature (non-breaking change which adds functionality)

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 Oct 9, 2020

Codecov Report

Merging #683 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #683      +/-   ##
==========================================
+ Coverage   97.46%   97.47%   +0.01%     
==========================================
  Files          87       87              
  Lines       17094    17182      +88     
==========================================
+ Hits        16660    16748      +88     
  Misses        434      434              
Impacted Files Coverage Δ
heat/core/dndarray.py 96.74% <100.00%> (+0.02%) ⬆️
heat/core/tests/test_dndarray.py 100.00% <100.00%> (ø)

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 a79bbf8...d83de1d. Read the comment docs.

@coquelin77 coquelin77 merged commit bc99e60 into master Oct 13, 2020
@coquelin77 coquelin77 deleted the features/590-nbytes branch October 13, 2020 07:56
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.

Implement dndarray property nbytes
2 participants