Skip to content

Remove new_Tensor and generated components#10194

Closed
cpuhrsch wants to merge 11 commits intopytorch:masterfrom
cpuhrsch:asdf
Closed

Remove new_Tensor and generated components#10194
cpuhrsch wants to merge 11 commits intopytorch:masterfrom
cpuhrsch:asdf

Conversation

@cpuhrsch
Copy link
Contributor

@cpuhrsch cpuhrsch commented Aug 3, 2018

No description provided.

type_ = &globalContext().getType(backend, scalar_type);
Storage* storage = type_->storage().release();
StorageImpl* storage_impl = storage->pImpl();
// storage_impl->retain();

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

}

TensorImpl::TensorImpl(Backend backend, ScalarType scalar_type) {
type_ = &globalContext().getType(backend, scalar_type);

This comment was marked as off-topic.

@ezyang
Copy link
Contributor

ezyang commented Aug 3, 2018

Unfortunately, probably going to conflict with #10210

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

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

template <typename T, typename Base>
static inline T* checked_cast_storage(Base* expr, const char * name, int pos, Backend backend, ScalarType scalar_type) {
template <typename T>
static inline T* checked_cast_storage(Storage* expr, const char * name, int pos, Backend backend, ScalarType scalar_type) {

This comment was marked as off-topic.


} // namespace at

inline std::ostream& operator<<(

This comment was marked as off-topic.

This comment was marked as off-topic.

}

std::unique_ptr<Storage> TensorImpl::storage() {
StorageImpl* storage = tensor->storage_;

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

StorageImpl* storage_impl = storage->pImpl();
// storage_impl->retain();
storage_impl->set_resizable(true);
tensor = new THTensor(storage_impl);

This comment was marked as off-topic.

Storage* storage = type_->storage().release();
StorageImpl* storage_impl = storage->pImpl();
// storage_impl->retain();
storage_impl->set_resizable(true);

This comment was marked as off-topic.

This comment was marked as off-topic.

type_ = &globalContext().getType(backend, scalar_type);
Storage* storage = type_->storage().release();
StorageImpl* storage_impl = storage->pImpl();
// storage_impl->retain();

This comment was marked as off-topic.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

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

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

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

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

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

zdevito pushed a commit to zdevito/ATen that referenced this pull request Aug 8, 2018
Summary: Pull Request resolved: pytorch/pytorch#10194

Differential Revision: D9160559

Pulled By: cpuhrsch

fbshipit-source-id: 133185b3d4258c154dc43f7572dbef6bfa6786f3
PenghuiCheng pushed a commit to PenghuiCheng/pytorch that referenced this pull request Aug 10, 2018
Summary: Pull Request resolved: pytorch#10194

Differential Revision: D9160559

Pulled By: cpuhrsch

fbshipit-source-id: 133185b3d4258c154dc43f7572dbef6bfa6786f3
goodlux pushed a commit to goodlux/pytorch that referenced this pull request Aug 15, 2018
Summary: Pull Request resolved: pytorch#10194

Differential Revision: D9160559

Pulled By: cpuhrsch

fbshipit-source-id: 133185b3d4258c154dc43f7572dbef6bfa6786f3
@ezyang ezyang added the merged label Jun 26, 2019
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.

4 participants