-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Merge ProfiledTensorType and TensorType #24284
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 PR finishes the unification of all Tensor types into a single object. ProfiledTensorType is renamed to TensorType and the old TensorType is deleted. Notes: * Fixes bug in merge for VaryingShape by changing its representation to an optional list of optional ints. * Removes ProfiledTensorType::create(type) invocations that can now simply be expect calls on tensor type.
Merge ProfiledTensorType and TensorType This PR finishes the unification of all Tensor types into a single object. ProfiledTensorType is renamed to TensorType and the old TensorType is deleted. Notes: * Fixes bug in merge for VaryingShape by changing its representation to an optional list of optional ints. * Removes ProfiledTensorType::create(type) invocations that can now simply be expect calls on tensor type. gh-metadata: pytorch pytorch 24284 gh/zdevito/85/head
Merge ProfiledTensorType and TensorType This PR finishes the unification of all Tensor types into a single object. ProfiledTensorType is renamed to TensorType and the old TensorType is deleted. Notes: * Fixes bug in merge for VaryingShape by changing its representation to an optional list of optional ints. * Removes ProfiledTensorType::create(type) invocations that can now simply be expect calls on tensor type. gh-metadata: pytorch pytorch 24284 gh/zdevito/85/head
Merge ProfiledTensorType and TensorType This PR finishes the unification of all Tensor types into a single object. ProfiledTensorType is renamed to TensorType and the old TensorType is deleted. Notes: * Fixes bug in merge for VaryingShape by changing its representation to an optional list of optional ints. * Removes ProfiledTensorType::create(type) invocations that can now simply be expect calls on tensor type. gh-metadata: pytorch pytorch 24284 gh/zdevito/85/head
Merge ProfiledTensorType and TensorType This PR finishes the unification of all Tensor types into a single object. ProfiledTensorType is renamed to TensorType and the old TensorType is deleted. Notes: * Fixes bug in merge for VaryingShape by changing its representation to an optional list of optional ints. * Removes ProfiledTensorType::create(type) invocations that can now simply be expect calls on tensor type. gh-metadata: pytorch pytorch 24284 gh/zdevito/85/head
Merge ProfiledTensorType and TensorType This PR finishes the unification of all Tensor types into a single object. ProfiledTensorType is renamed to TensorType and the old TensorType is deleted. Notes: * Fixes bug in merge for VaryingShape by changing its representation to an optional list of optional ints. * Removes ProfiledTensorType::create(type) invocations that can now simply be expect calls on tensor type. gh-metadata: pytorch pytorch 24284 gh/zdevito/85/head
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.
"aten::prod(Tensor self, *, int? dtype) -> Tensor", | ||
}, | ||
[](Node* node) -> type_vec_t { | ||
if (auto type = node->input(0)->type()->cast<TensorType>()) { |
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.
aren't we guaranteed that self
has a tensor type here?
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.
yes, seems like that is true
aten/src/ATen/core/jit_type.h
Outdated
VaryingShape(const std::vector<int64_t>& vec) | ||
: size_(vec.size()), dims_(vec.begin(), vec.end()) {} | ||
: VaryingShape(ListOfOptionalInts(vec.begin(), vec.end())) {} |
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.
Errr, deja vu, isn't there another PR floating with this exact change?
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.
yeah, I split that out from this one, because it is higher priority to merge that one to prevent a hang in some client code. I will delete these changes from this PR.
Merge ProfiledTensorType and TensorType This PR finishes the unification of all Tensor types into a single object. ProfiledTensorType is renamed to TensorType and the old TensorType is deleted. Notes: * Fixes bug in merge for VaryingShape by changing its representation to an optional list of optional ints. * Removes ProfiledTensorType::create(type) invocations that can now simply be expect calls on tensor type. gh-metadata: pytorch pytorch 24284 gh/zdevito/85/head
Summary: Pull Request resolved: #24284 This PR finishes the unification of all Tensor types into a single object. ProfiledTensorType is renamed to TensorType and the old TensorType is deleted. Notes: * Fixes bug in merge for VaryingShape by changing its representation to an optional list of optional ints. * Removes ProfiledTensorType::create(type) invocations that can now simply be expect calls on tensor type. Test Plan: Imported from OSS Differential Revision: D16794034 Pulled By: zdevito fbshipit-source-id: 10362398d0bb166d0d385d74801e95d9b87d9dfc
Summary: Pull Request resolved: pytorch/pytorch#24284 This PR finishes the unification of all Tensor types into a single object. ProfiledTensorType is renamed to TensorType and the old TensorType is deleted. Notes: * Fixes bug in merge for VaryingShape by changing its representation to an optional list of optional ints. * Removes ProfiledTensorType::create(type) invocations that can now simply be expect calls on tensor type. Test Plan: Imported from OSS Differential Revision: D16794034 Pulled By: zdevito fbshipit-source-id: 10362398d0bb166d0d385d74801e95d9b87d9dfc
Stack from ghstack:
This PR finishes the unification of all Tensor types into a single object.
ProfiledTensorType is renamed to TensorType and the old TensorType is
deleted.
Notes:
optional list of optional ints.
simply be expect calls on tensor type.
Differential Revision: D16794034