KEMBAR78
Warn about poor performance creating Tensor from list of numpy.array's by kurtamohler · Pull Request #51680 · pytorch/pytorch · GitHub
Skip to content

Conversation

@kurtamohler
Copy link
Collaborator

Fixes #13918

@kurtamohler kurtamohler added module: performance Issues related to performance, either of kernel code or framework glue module: numpy Related to numpy support, and also numpy compatibility of our operators labels Feb 3, 2021
@kurtamohler kurtamohler requested a review from ezyang February 3, 2021 23:23
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Feb 3, 2021

💊 CI failures summary and remediations

As of commit 65216b8 (more details on the Dr. CI page and at hud.pytorch.org/pr/51680):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


Preview docs built from this PR

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@kurtamohler kurtamohler force-pushed the list-of-ndarray-warning-13918 branch from c4fb89d to e1c46b1 Compare February 3, 2021 23:53
@mruberry mruberry requested review from mruberry and removed request for ezyang February 4, 2021 03:57
@mruberry mruberry added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Feb 4, 2021
@kurtamohler kurtamohler force-pushed the list-of-ndarray-warning-13918 branch from e1c46b1 to 7450521 Compare February 4, 2021 17:43
@kurtamohler
Copy link
Collaborator Author

Looks like clang-tidy failure is upstream. Otherwise, I think this is ready to go, @mruberry

@codecov
Copy link

codecov bot commented Feb 4, 2021

Codecov Report

Merging #51680 (7450521) into master (001ff3a) will increase coverage by 0.30%.
The diff coverage is 92.00%.

❗ Current head 7450521 differs from pull request most recent head 65216b8. Consider uploading reports for the commit 65216b8 to get more accurate results

@@            Coverage Diff             @@
##           master   #51680      +/-   ##
==========================================
+ Coverage   80.60%   80.91%   +0.30%     
==========================================
  Files        1879     1948      +69     
  Lines      202892   212345    +9453     
==========================================
+ Hits       163543   171818    +8275     
- Misses      39349    40527    +1178     

@rgommers rgommers requested a review from mruberry March 15, 2021 10:57
@mruberry
Copy link
Collaborator

Either this or #51731, depending on which gets in first, will need to update to account for the other.

@kurtamohler
Copy link
Collaborator Author

Either this or #51731, depending on which gets in first, will need to update to account for the other.

The description of that PR says that it speeds up torch.tensor() to be "at least as fast (usually faster)" compared to torch.tensor(numpy.stack(list_of_arrays)). The benchmark results seem to support that claim. So I think that PR will make this one unnecessary, won't it?

@ezyang
Copy link
Contributor

ezyang commented Jul 19, 2021

@mruberry @kurtamohler what ever happened to this PR?

@kurtamohler
Copy link
Collaborator Author

@ezyang, I paused this because of #51731, but it seems that PR has paused too. I'll update this PR today

@kurtamohler kurtamohler force-pushed the list-of-ndarray-warning-13918 branch from 7450521 to 65216b8 Compare July 22, 2021 05:27
@facebook-github-bot
Copy link
Contributor

@ezyang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@ezyang merged this pull request in 5a00152.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed Merged module: numpy Related to numpy support, and also numpy compatibility of our operators module: performance Issues related to performance, either of kernel code or framework glue open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pytorch very slow to convert list of numpy arrays into tensors

5 participants