Skip to content

Conversation

@gchanan
Copy link
Contributor

@gchanan gchanan commented Jul 24, 2018

…o dim.

Manifest:

  1. The scalar boolean is now in THTensor, although it isn't hooked up at the TH level yet.
  2. setScalar is gone, everything now goes through the maybeScalar equivalent (which is renamed)
  3. all "scalars" in this context now refer to "zero_dim" in order to differentiate this concept from the "Scalar" class.

…o dim.

Manifest:
1) The scalar boolean is now in THTensor, although it isn't hooked up at the TH level yet.
2) setScalar is gone, everything now goes through the maybeScalar equivalent (which is renamed)
3) all "scalars" in this context now refer to "zero_dim" in order to differentiate this concept from the "Scalar" class.
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@gchanan has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

std::vector<int64_t> sizes_;
std::vector<int64_t> strides_;

// TODO: get rid of this, use the sizes_/strides_ .size() instead

This comment was marked as off-topic.

@gchanan
Copy link
Contributor Author

gchanan commented Jul 24, 2018

New comment:

    // TODO: get rid of this, use the sizes_/strides_ .size() instead.
    // This requires making sure TH code can handle zero dims (empty sizes, strides).
    // Short-term plan is to dispatch dim/size/stride through a function that gives these
    // in a "legacy" format, i.e. 0-dim becomes 1-dim.  Then medium term we remove the legacy calls.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@gchanan has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@gchanan has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@ezyang
Copy link
Contributor

ezyang commented Jul 24, 2018

@pytorchbot retest this please

zdevito pushed a commit to zdevito/ATen that referenced this pull request Jul 25, 2018
…… (#9783)

Summary:
…o dim.

Manifest:
1) The scalar boolean is now in THTensor, although it isn't hooked up at the TH level yet.
2) setScalar is gone, everything now goes through the maybeScalar equivalent (which is renamed)
3) all "scalars" in this context now refer to "zero_dim" in order to differentiate this concept from the "Scalar" class.
Pull Request resolved: pytorch/pytorch#9783

Differential Revision: D8978911

Pulled By: gchanan

fbshipit-source-id: f09254be4bebad0e4c510fefe4158b4f7e92efe1
jramseyer pushed a commit to jramseyer/pytorch that referenced this pull request Jul 30, 2018
pytorch#9783)

Summary:
…o dim.

Manifest:
1) The scalar boolean is now in THTensor, although it isn't hooked up at the TH level yet.
2) setScalar is gone, everything now goes through the maybeScalar equivalent (which is renamed)
3) all "scalars" in this context now refer to "zero_dim" in order to differentiate this concept from the "Scalar" class.
Pull Request resolved: pytorch#9783

Differential Revision: D8978911

Pulled By: gchanan

fbshipit-source-id: f09254be4bebad0e4c510fefe4158b4f7e92efe1
goodlux pushed a commit to goodlux/pytorch that referenced this pull request Aug 15, 2018
pytorch#9783)

Summary:
…o dim.

Manifest:
1) The scalar boolean is now in THTensor, although it isn't hooked up at the TH level yet.
2) setScalar is gone, everything now goes through the maybeScalar equivalent (which is renamed)
3) all "scalars" in this context now refer to "zero_dim" in order to differentiate this concept from the "Scalar" class.
Pull Request resolved: pytorch#9783

Differential Revision: D8978911

Pulled By: gchanan

fbshipit-source-id: f09254be4bebad0e4c510fefe4158b4f7e92efe1
@ezyang ezyang added the merged label Jun 26, 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.

3 participants