Skip to content

Conversation

@ezyang
Copy link
Contributor

@ezyang ezyang commented Oct 3, 2019

Stack from ghstack:

Fixes #27291

I'm a little annoyed that I have to reintroduce manual binding code. But it's
probably not a good idea to teach the codegen how to do fastpath functions
(is it?)

Signed-off-by: Edward Z. Yang [email protected]

Differential Revision: D17763486

Fixes #27291

I think this deletes at::numel function too, making it technically BC-breaking,
but I don't think we intended to generate that function in the first place.

Signed-off-by: Edward Z. Yang <[email protected]>

[ghstack-poisoned]
@pytorchbot pytorchbot added caffe2 module: internals Related to internal abstractions in c10 and ATen module: operators module: pybind Related to our Python bindings / interactions with other Python libraries labels Oct 3, 2019
Fixes #27291

I'm a little annoyed that I have to reintroduce manual binding code.  But it's
probably not a good idea to teach the codegen how to do fastpath functions
(is it?)

Signed-off-by: Edward Z. Yang <[email protected]>

[ghstack-poisoned]
ezyang added a commit that referenced this pull request Oct 3, 2019
Fixes #27291

I'm a little annoyed that I have to reintroduce manual binding code.  But it's
probably not a good idea to teach the codegen how to do fastpath functions
(is it?)

Signed-off-by: Edward Z. Yang <[email protected]>

ghstack-source-id: 53d0e3e
Pull Request resolved: #27294
Fixes #27291

I'm a little annoyed that I have to reintroduce manual binding code.  But it's
probably not a good idea to teach the codegen how to do fastpath functions
(is it?)

Signed-off-by: Edward Z. Yang <[email protected]>

[ghstack-poisoned]
@ezyang ezyang added the module: xla Related to XLA support label Oct 3, 2019
@ezyang ezyang requested a review from ailzhang October 3, 2019 17:35
@ezyang
Copy link
Contributor Author

ezyang commented Oct 3, 2019

@ailzhang this one breaks xla but it should be a pretty simple fix; just delete the numel() implementation. (This is under the assumption that your TensorImpl::numel implementation does the right thing. Which it should.)

@ailzhang
Copy link
Contributor

ailzhang commented Oct 3, 2019

Thanks @ezyang , I'm starting a local run to verify the change. :D Will report back once it's finished.

Fixes #27291

I'm a little annoyed that I have to reintroduce manual binding code.  But it's
probably not a good idea to teach the codegen how to do fastpath functions
(is it?)

Signed-off-by: Edward Z. Yang <[email protected]>

[ghstack-poisoned]
@pytorchbot pytorchbot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Oct 3, 2019
ezyang added a commit that referenced this pull request Oct 3, 2019
Fixes #27291

I'm a little annoyed that I have to reintroduce manual binding code.  But it's
probably not a good idea to teach the codegen how to do fastpath functions
(is it?)

Signed-off-by: Edward Z. Yang <[email protected]>

ghstack-source-id: 9ce95a1
Pull Request resolved: #27294
return [sorted(g, key=declkey) for g in grouped_decls]

# We need to add methods implemented manually in TensorImpl
# TODO: This seems to claim sizes() returns an int64_t. Really?
Copy link
Contributor

Choose a reason for hiding this comment

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

our Tensor::sizes() does return a int64_t iirc. It's number of dimensions. And yes I agree it's confusing :P

Copy link
Contributor

@ailzhang ailzhang left a comment

Choose a reason for hiding this comment

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

Fix is in pytorch/xla#1136

Fixes #27291

I'm a little annoyed that I have to reintroduce manual binding code.  But it's
probably not a good idea to teach the codegen how to do fastpath functions
(is it?)

Signed-off-by: Edward Z. Yang <[email protected]>

[ghstack-poisoned]
@pytorchbot pytorchbot added the module: typing Related to mypy type annotations label Oct 3, 2019
ezyang added a commit that referenced this pull request Oct 3, 2019
Fixes #27291

I'm a little annoyed that I have to reintroduce manual binding code.  But it's
probably not a good idea to teach the codegen how to do fastpath functions
(is it?)

Signed-off-by: Edward Z. Yang <[email protected]>

ghstack-source-id: e65c8ab
Pull Request resolved: #27294
Fixes #27291

I'm a little annoyed that I have to reintroduce manual binding code.  But it's
probably not a good idea to teach the codegen how to do fastpath functions
(is it?)

Signed-off-by: Edward Z. Yang <[email protected]>

Differential Revision: [D17763486](https://our.internmc.facebook.com/intern/diff/D17763486)

[ghstack-poisoned]
ezyang added a commit that referenced this pull request Oct 4, 2019
Fixes #27291

I'm a little annoyed that I have to reintroduce manual binding code.  But it's
probably not a good idea to teach the codegen how to do fastpath functions
(is it?)

Signed-off-by: Edward Z. Yang <[email protected]>

ghstack-source-id: 74091b8
Pull Request resolved: #27294
Fixes #27291

I'm a little annoyed that I have to reintroduce manual binding code.  But it's
probably not a good idea to teach the codegen how to do fastpath functions
(is it?)

Signed-off-by: Edward Z. Yang <[email protected]>

Differential Revision: [D17763486](https://our.internmc.facebook.com/intern/diff/D17763486)

[ghstack-poisoned]
ezyang added a commit that referenced this pull request Oct 4, 2019
Fixes #27291

I'm a little annoyed that I have to reintroduce manual binding code.  But it's
probably not a good idea to teach the codegen how to do fastpath functions
(is it?)

Signed-off-by: Edward Z. Yang <[email protected]>

ghstack-source-id: 7b0973e
Pull Request resolved: #27294
Fixes #27291

I'm a little annoyed that I have to reintroduce manual binding code.  But it's
probably not a good idea to teach the codegen how to do fastpath functions
(is it?)

Signed-off-by: Edward Z. Yang <[email protected]>

Differential Revision: [D17763486](https://our.internmc.facebook.com/intern/diff/D17763486)

[ghstack-poisoned]
ezyang added a commit that referenced this pull request Oct 8, 2019
Fixes #27291

I'm a little annoyed that I have to reintroduce manual binding code.  But it's
probably not a good idea to teach the codegen how to do fastpath functions
(is it?)

Signed-off-by: Edward Z. Yang <[email protected]>

ghstack-source-id: 71653a9
Pull Request resolved: #27294
@facebook-github-bot
Copy link
Contributor

@ezyang merged this pull request in 013ca32.

zdevito pushed a commit to zdevito/ATen that referenced this pull request Oct 9, 2019
Summary:
Pull Request resolved: pytorch/pytorch#27294

Fixes #27291

I'm a little annoyed that I have to reintroduce manual binding code.  But it's
probably not a good idea to teach the codegen how to do fastpath functions
(is it?)

Signed-off-by: Edward Z. Yang <[email protected]>

Test Plan: Imported from OSS

Differential Revision: D17763486

Pulled By: ezyang

fbshipit-source-id: 5793b53e2db80b044e57faae325a95c649d9d459
@facebook-github-bot facebook-github-bot deleted the gh/ezyang/398/head branch October 28, 2019 22:12
thiagocrepaldi pushed a commit to thiagocrepaldi/pytorch that referenced this pull request Feb 4, 2020
Summary:
Pull Request resolved: pytorch#27294

Fixes pytorch#27291

I'm a little annoyed that I have to reintroduce manual binding code.  But it's
probably not a good idea to teach the codegen how to do fastpath functions
(is it?)

Signed-off-by: Edward Z. Yang <[email protected]>

Test Plan: Imported from OSS

Differential Revision: D17763486

Pulled By: ezyang

fbshipit-source-id: 5793b53e2db80b044e57faae325a95c649d9d459
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

caffe2 Merged module: internals Related to internal abstractions in c10 and ATen module: pybind Related to our Python bindings / interactions with other Python libraries module: typing Related to mypy type annotations module: xla Related to XLA support oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants