Closed
Conversation
Differential Revision: D14381774 Differential Version: 74716818
This was referenced Mar 8, 2019
li-roy
commented
Mar 8, 2019
|
|
||
| Type & TypeDefault::toBackend(Backend b) const { | ||
| return at::globalContext().getNonVariableType(b,scalarType()); | ||
| return at::globalContext().getNonVariableType(b,typeMetaToScalarType(typeMeta())); |
Contributor
Author
There was a problem hiding this comment.
This change is orthogonal and not making progress (typeMeta() needs to go), but I'd like to just get rid of scalarType() for now.
Differential Revision: D14381774 Differential Version: 74726649
ezyang
reviewed
Mar 8, 2019
| void set_default_tensor_type(PyTensorType& type) { | ||
| auto aten_type = type.aten_type(); | ||
| if (!at::isFloatingType(aten_type->scalarType())) { | ||
| if (!at::isFloatingType(static_cast<at::ScalarType>(type.scalar_type))) { |
Contributor
There was a problem hiding this comment.
I'm surprised you need a cast here
added 6 commits
March 8, 2019 13:11
Differential Revision: D14381774 Differential Version: 74808627
Differential Revision: D14381774 Differential Version: 74811454
Differential Revision: D14381774 Differential Version: 74818454
Differential Revision: D14381774 Differential Version: 74831196
Differential Revision: D14381774 Differential Version: 74843003
Differential Revision: D14381774 Differential Version: 74983514
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack:
:white_circle: #17530 Small clean up of aten_op 💚
:white_circle: #17601 Store ScalarType and Backend instead of Type in TensorIterator 💚
:white_circle: #17785 Remove Type::elementSizeInBytes 💚
:white_circle: #17723 Store python default type as PyTensorType instead of at::Type 💚
:white_circle: #17786 Pass ScalarType separately from Type in python constructors 💚
:black_circle: #17792 Remove Type::ScalarType() 💚
:white_circle: #17603 Remove conversion operator from Type to TensorOptions 💛
:white_circle: #17787 Add ScalarType arg to Type::options() 💛
Differential Revision: D14381774