Skip to content

Conversation

@iseeyuan
Copy link
Contributor

@iseeyuan iseeyuan commented Nov 12, 2019

Stack from ghstack:

Differential Revision: D18499600

@iseeyuan iseeyuan requested a review from apaszke as a code owner November 12, 2019 17:35
@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Nov 12, 2019
Copy link
Contributor

@zdevito zdevito left a comment

Choose a reason for hiding this comment

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

Looks good, but the schema in the mobile registration need to be checked for correctness.

[]() {
})
).op(
"_aten::append.Tensor(Tensor self) -> void",
Copy link
Contributor

Choose a reason for hiding this comment

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

The schema here do not match the implementation of the operator. If this is untested in the mobile interpreter, then many of the schema in this file may be wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, schema in this file may be wrong. @smessmer Just curious: if we are using names only, would the schema be necessary in mobile? It looks like schema is required for boxed registration, but it's not checked in the registration itself. Could you confirm if a correct schema is required for registrations in this file. If it is, how to know what's the correct schema?

Copy link
Contributor

Choose a reason for hiding this comment

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

if you register multiple ops with the same operator name + overload name but mismatching schemas, the operator library will throw an error. This didn't happen here because _aten::append.Tensor is allowed to mismatch with aten::append.Tensor, they're different ops.

@zdevito
Copy link
Contributor

zdevito commented Nov 16, 2019

This is causing a test failure on master, I've started the unland to fix:
https://app.circleci.com/jobs/github/pytorch/pytorch/3626363

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in ff4e782.

iseeyuan pushed a commit that referenced this pull request Nov 16, 2019
Overload name is required in mobile operators with the same name but different schema. Since it's not used in JIT, it's safe to add overload names for JIT operators.

Re-commit after a revert of #29656, because of backward compatibility failure. Adding overload name also triggers backward compatibility failures, so the overload names of append are added in this PR. Will contact the backward compatibility to add more overload names. 

Differential Revision: [D18555484](https://our.internmc.facebook.com/intern/diff/D18555484)
@facebook-github-bot facebook-github-bot deleted the gh/iseeyuan/27/head branch November 19, 2019 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants