Skip to content

tensor len member #581

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

Merged
merged 4 commits into from
Feb 3, 2021
Merged

tensor len member #581

merged 4 commits into from
Feb 3, 2021

Conversation

DvirDukhan
Copy link
Collaborator

this PR adds a new len member to RAI_Tensor which is lazy evaluated on RAI_TensorLength
This should reduce the amount of calls to RAI_TensorLength

closes #495

@codecov
Copy link

codecov bot commented Jan 28, 2021

Codecov Report

Merging #581 (68534d6) into master (14e82db) will increase coverage by 0.98%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #581      +/-   ##
==========================================
+ Coverage   74.33%   75.32%   +0.98%     
==========================================
  Files          39       39              
  Lines        6063     6062       -1     
==========================================
+ Hits         4507     4566      +59     
+ Misses       1556     1496      -60     
Impacted Files Coverage Δ
src/backends/onnxruntime.c 60.75% <100.00%> (-0.11%) ⬇️
src/backends/tensorflow.c 70.50% <100.00%> (-0.09%) ⬇️
...c/serialization/RDB/decoder/current/v1/decode_v1.c 64.63% <100.00%> (-0.22%) ⬇️
.../serialization/RDB/decoder/previous/v0/decode_v0.c 61.39% <100.00%> (-0.25%) ⬇️
src/tensor.c 84.64% <100.00%> (+8.18%) ⬆️
src/backends/torch.c 78.96% <0.00%> (+7.29%) ⬆️

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 14e82db...68534d6. Read the comment docs.

filipecosta90
filipecosta90 previously approved these changes Jan 29, 2021
@DvirDukhan
Copy link
Collaborator Author

@filipecosta90 Can we benchmark before merge?

Copy link
Contributor

@lantiga lantiga left a comment

Choose a reason for hiding this comment

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

LGTM

@DvirDukhan DvirDukhan merged commit 5686016 into master Feb 3, 2021
@DvirDukhan DvirDukhan deleted the improve_tensor_len_calculation branch February 3, 2021 07:15
DvirDukhan added a commit that referenced this pull request Feb 3, 2021
@chayim chayim mentioned this pull request Jul 22, 2021
@chayim chayim mentioned this pull request Nov 7, 2021
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.

Improve RAI_TensorLength performance
3 participants