Skip to content

Eliminate numel == -1 state, delete Storage-only constructor#12656

Closed
ezyang wants to merge 15 commits intomasterfrom
export-D10380678
Closed

Eliminate numel == -1 state, delete Storage-only constructor#12656
ezyang wants to merge 15 commits intomasterfrom
export-D10380678

Conversation

@ezyang
Copy link
Copy Markdown
Contributor

@ezyang ezyang commented Oct 15, 2018

Stack:
    :black_circle:  #12656 Eliminate numel == -1 state, delete Storage-only constructor  💚
    :white_circle:  #12692 Disable CopyFrom src with uninitialized storage  💚
    :white_circle:  #12713 Documentation on TensorImpl.  💚

I originally wanted to do this in two steps, but deleting the Storage-only
constructor also changes the default numel state (which breaks tests),
so easiest to do it all in one go.)

  • I still need a way to compute the correct TensorTypeId for all of the
    Caffe2 constructors; rather than hard-code it, I wrote a function
    in at::detail::computeTensorTypeId() to do this calculation. Maybe
    this function could be used more widely, but for now, it's used
    by Caffe2 only.
  • Added a pile more TensorTypeId for all of Caffe2's supported DeviceTypes
  • Because I still can't put arbitrary TypeMeta in TensorOptions, the
    TensorTypeId() calculation doesn't respect dtype. For now, this is
    not a problem, but this might block work to split non-POD dtypes
    into their own TensorTypeId.

Differential Revision: D10380678

Differential Revision: D10380678
Differential Version: 60667915
Differential Revision: D10380678
Differential Version: 60672880
Differential Revision: D10380678
Differential Version: 60675169
Differential Revision: D10380678
Differential Version: 60675603
Differential Revision: D10380678
Differential Version: 60728426
Differential Revision: D10380678
Differential Version: 60745432
Differential Revision: D10380678
Differential Version: 60752287
Differential Revision: D10380678
Differential Version: 60781439
Differential Revision: D10380678
Differential Version: 60819667
Differential Revision: D10380678
Differential Version: 60820092
Differential Revision: D10380678
Differential Version: 60871490
Differential Revision: D10380678
Differential Version: 61005630
Differential Revision: D10380678
Differential Version: 61036016
Differential Revision: D10380678
Differential Version: 61131697
Copy link
Copy Markdown
Contributor

@li-roy li-roy left a comment

Choose a reason for hiding this comment

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

lgtm

Differential Revision: D10380678
Differential Version: 61539323
zdevito pushed a commit to zdevito/ATen that referenced this pull request Oct 25, 2018
Summary:
Pull Request resolved: pytorch/pytorch#12656

I originally wanted to do this in two steps, but deleting the Storage-only
constructor also changes the default numel state (which breaks tests),
so easiest to do it all in one go.)

- I still need a way to compute the correct TensorTypeId for all of the
  Caffe2 constructors; rather than hard-code it, I wrote a function
  in at::detail::computeTensorTypeId() to do this calculation.  Maybe
  this function could be used more widely, but for now, it's used
  by Caffe2 only.
- Added a pile more TensorTypeId for all of Caffe2's supported DeviceTypes
- Because I still can't put arbitrary TypeMeta in TensorOptions, the
  TensorTypeId() calculation doesn't respect dtype.  For now, this is
  not a problem, but this might block work to split non-POD dtypes
  into their own TensorTypeId.

Reviewed By: li-roy

Differential Revision: D10380678

fbshipit-source-id: 10c5d12020596fc9f27d5579adffad00513af363
@soumith soumith deleted the export-D10380678 branch February 21, 2019 23:24
@ezyang ezyang added the merged label Jun 25, 2019
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
…#12656)

Summary:
Pull Request resolved: pytorch#12656

I originally wanted to do this in two steps, but deleting the Storage-only
constructor also changes the default numel state (which breaks tests),
so easiest to do it all in one go.)

- I still need a way to compute the correct TensorTypeId for all of the
  Caffe2 constructors; rather than hard-code it, I wrote a function
  in at::detail::computeTensorTypeId() to do this calculation.  Maybe
  this function could be used more widely, but for now, it's used
  by Caffe2 only.
- Added a pile more TensorTypeId for all of Caffe2's supported DeviceTypes
- Because I still can't put arbitrary TypeMeta in TensorOptions, the
  TensorTypeId() calculation doesn't respect dtype.  For now, this is
  not a problem, but this might block work to split non-POD dtypes
  into their own TensorTypeId.

Reviewed By: li-roy

Differential Revision: D10380678

fbshipit-source-id: 10c5d12020596fc9f27d5579adffad00513af363
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