[REBASE] Merge THTensor into TensorImpl#10479
[REBASE] Merge THTensor into TensorImpl#10479gchanan wants to merge 33 commits intopytorch:masterfrom
Conversation
|
This is a direct rebase/merge of #10421; I have not yet reviewed this code. |
facebook-github-bot
left a comment
There was a problem hiding this comment.
gchanan has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
gchanan has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
gchanan has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
gchanan has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
gchanan has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Fix leaking of Storages (not StorageImpls) Reviewed By: li-roy Differential Revision: D9349824 fbshipit-source-id: d492d7d62be393cbc5955440278bd605e04767a4
|
This should be ready to review. Some notes:
|
| return size_[d]; | ||
| } | ||
| int64_t SparseTensorImpl::stride(int64_t d) const { | ||
| AT_ERROR("sparse tensors do not have strides"); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
| auto type = &globalContext().getType(tensorTypeIdToBackend(type_id), scalar_type); | ||
| auto storage = type->storage(true); | ||
| storage_ = storage->pImpl(); | ||
| storage_->retain(); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
| if (storage_) { | ||
| storage_->release(); | ||
| storage_ = nullptr; | ||
| } |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
| tensor->release(); | ||
| tensor = nullptr; | ||
| if (storage_) { | ||
| storage_->release(); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
| #define TH_GENERIC_FILE "generic/THTensor.h" | ||
| #else | ||
|
|
||
| /* a la lua? dim, storageoffset, ... et les methodes ? */ |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
facebook-github-bot
left a comment
There was a problem hiding this comment.
gchanan has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
gchanan has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Pull Request resolved: pytorch/pytorch#10479 Differential Revision: D9315800 Pulled By: gchanan fbshipit-source-id: b13ef0de3342600b02b54e0700eb02021a9d1a9e
No description provided.