-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[REBASE] Merge THTensor into TensorImpl #10479
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.