Skip to content

Guard sizes/strides in TH/THC for scalars.#10145

Closed
gchanan wants to merge 1 commit intopytorch:masterfrom
gchanan:prepare_th_thc_size_stride
Closed

Guard sizes/strides in TH/THC for scalars.#10145
gchanan wants to merge 1 commit intopytorch:masterfrom
gchanan:prepare_th_thc_size_stride

Conversation

@gchanan
Copy link
Contributor

@gchanan gchanan commented Aug 1, 2018

No description provided.

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.

return THTensor_isZeroDim(self) ? 1 : self->size(dim);
}

#include "generic/THTensorFastGetSet.hpp"

This comment was marked as off-topic.

This comment was marked as off-topic.

return self->stride(dim);
}

int64_t THCTensor_strideLegacyNoScalars(THCState *state, const THCTensor *self, int dim) {

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

Copy link
Contributor

@cpuhrsch cpuhrsch left a comment

Choose a reason for hiding this comment

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

Looks fine, except two minor comments.

zdevito pushed a commit to zdevito/ATen that referenced this pull request Aug 2, 2018
Summary: Pull Request resolved: pytorch/pytorch#10145

Differential Revision: D9125791

Pulled By: gchanan

fbshipit-source-id: d0b8c88c49d7af85971a4531a63fd85a97bfbec7
goodlux pushed a commit to goodlux/pytorch that referenced this pull request Aug 15, 2018
Summary: Pull Request resolved: pytorch#10145

Differential Revision: D9125791

Pulled By: gchanan

fbshipit-source-id: d0b8c88c49d7af85971a4531a63fd85a97bfbec7
@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.

4 participants