Skip to content

Conversation

li-roy
Copy link
Contributor

@li-roy li-roy commented Oct 17, 2018

Stack:
    :white_circle:  #12766 Change return type of Tensor::dtype() from ScalarType to TypeMeta  💚
    :white_circle:  #12767 reduce Device to 32bits  💚
    :black_circle:  #12768 use TypeMeta instead of ScalarType in TensorOptions  💚

Note: DefaultTensorOptions no longer fits in 64-bits.

I kept functions that take ScalarType as input to minimize changes for now.

Differential Revision: D10419671

Differential Revision: D10419671
Differential Version: 60878909
Differential Revision: D10419671
Differential Version: 61134806
TypeExtendedInterface& getType(TensorOptions options) {
return globalContext().getType(
options.backend(), options.dtype(), options.is_variable());
options.backend(), dataTypeToScalarType(options.dtype().id()), options.is_variable());

This comment was marked as off-topic.

}
}

void set_dtype(optional<ScalarType> dtype) & noexcept {

This comment was marked as off-topic.

return TensorOptions().dtype(dtype);
}

inline TensorOptions dtype(ScalarType dtype) {

This comment was marked as off-topic.

AT_CUDNN_CHECK(cudnnDropoutGetStatesSize(handle, &state_size));
AT_ASSERT(options.device().type() == kCUDA);
AT_ASSERT(options.dtype() == kByte);
AT_ASSERT(dataTypeToScalarType(options.dtype().id()) == kByte);

This comment was marked as off-topic.

options);
AT_CHECK(
at::isFloatingType(options.dtype()),
at::isFloatingType(dataTypeToScalarType(options.dtype().id())),

This comment was marked as off-topic.

Copy link
Contributor

@ezyang ezyang left a comment

Choose a reason for hiding this comment

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

Approved, but with comments.

Roy Li added 6 commits October 22, 2018 15:47
Differential Revision: D10419671
Differential Version: 61337004
Differential Revision: D10419671
Differential Version: 61345557
Differential Revision: D10419671
Differential Version: 61438577
Differential Revision: D10419671
Differential Version: 61590771
Differential Revision: D10419671
Differential Version: 61603924
Differential Revision: D10419671
Differential Version: 61616762
@li-roy li-roy closed this Oct 25, 2018
@li-roy li-roy reopened this Oct 25, 2018
Roy Li added 2 commits October 24, 2018 21:46
Differential Revision: D10419671
Differential Version: 61622039
Differential Revision: D10419671
Differential Version: 61622526

/// Constructs a `TensorOptions` object with the given dtype.
/// legacy constructor to support ScalarType
/* implicit */ TensorOptions(ScalarType dtype) : TensorOptions() {

This comment was marked as off-topic.

Roy Li added 4 commits October 25, 2018 11:51
Differential Revision: D10419671
Differential Version: 61681127
Differential Revision: D10419671
Differential Version: 61685404
Differential Revision: D10419671
Differential Version: 61727366
Differential Revision: D10419671
Differential Version: 61759285
zdevito pushed a commit to zdevito/ATen that referenced this pull request Oct 26, 2018
Summary:
Pull Request resolved: pytorch/pytorch#12768

Note: DefaultTensorOptions no longer fits in 64-bits.

I kept functions that take ScalarType as input to minimize changes for now.

Reviewed By: ezyang

Differential Revision: D10419671

fbshipit-source-id: 9cc8c5982fde9ff243e03d55c0c52c2aa2c7efd8
goldsborough added a commit to goldsborough/pytorch that referenced this pull request Oct 26, 2018
@soumith soumith deleted the export-D10419671 branch February 21, 2019 23:24
@ezyang ezyang added the merged label Jun 25, 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.

2 participants