Move Factory functions from Type to TypeExtendedInterface.#12025
Move Factory functions from Type to TypeExtendedInterface.#12025gchanan wants to merge 6 commits intopytorch:masterfrom
Conversation
This makes a few changes wrt Type, with the ultimate goal of removing Type from the public Methods/Functions. In particular: 1) Removes factory functions from Type, into TypeExtendedInterface. 2) sparse_coo_tensor is now a first class at:: namespace function, with TensorOptions overloads. 3) We move from Type-based sparse_coo_tensor dispatch to function-based. Note we still require a number of changes to get rid of type in the public interface, in particular TensorOptions needs to support CUDA vs non-CUDA dispatch. That is coming in a future patch.
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.
…mespace. Also changes getVariableType in the same way.
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.
|
@pytorchbot retest this please. |
facebook-github-bot
left a comment
There was a problem hiding this comment.
gchanan is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: This makes a few changes wrt Type, with the ultimate goal of removing Type from the public Methods/Functions. In particular: 1) Removes factory functions from Type, into TypeExtendedInterface. 2) sparse_coo_tensor is now a first class at:: namespace function, with TensorOptions overloads. 3) We move from Type-based sparse_coo_tensor dispatch to function-based. Note we still require a number of changes to get rid of tType in the public interface, in particular TensorOptions needs to support CUDA vs non-CUDA dispatch. That is coming in a future patch. Pull Request resolved: pytorch/pytorch#12025 Reviewed By: ezyang Differential Revision: D10017205 Pulled By: gchanan fbshipit-source-id: 00807a37b09ed33f0656aaa165bb925abb026320
| # the default would never make sense. | ||
| - func: sparse_coo_tensor(IntList size, *, TensorOptions options) -> Tensor | ||
|
|
||
| - func: sparse_coo_tensor(IndexTensor indices, Tensor values, *, TensorOptions options) -> Tensor |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This makes a few changes wrt Type, with the ultimate goal of removing Type from the public Methods/Functions. In particular:
Note we still require a number of changes to get rid of tType in the public interface, in particular TensorOptions needs to support CUDA vs non-CUDA dispatch. That is coming in a future patch.