Skip to content

[pytorch] change detach() & detach_() to no-op for USE_STATIC_DISPATCH mode#28400

Closed
ljk53 wants to merge 1 commit intogh/ljk53/67/basefrom
gh/ljk53/67/head
Closed

[pytorch] change detach() & detach_() to no-op for USE_STATIC_DISPATCH mode#28400
ljk53 wants to merge 1 commit intogh/ljk53/67/basefrom
gh/ljk53/67/head

Conversation

@ljk53
Copy link
Contributor

@ljk53 ljk53 commented Oct 22, 2019

Stack from ghstack:

Summary:
This is yet-another fix to issue #26764.

Some mobile models call tensor.detach() which won't work with
static-dispatch mode. We disable autograd for static-dispatch / mobile
build anyway so it seems fine to make these op-ops.

Test Plan:

  • With stacked PRs, confirmed it can run failed models now.

Differential Revision: D18055852

…H mode

Summary:
This is yet-another fix to issue #26764.

Some mobile models call tensor.detach() which won't work with
static-dispatch mode. We disable autograd for static-dispatch / mobile
build anyway so it seems fine to make these op-ops.

Test Plan:
- With stacked PRs, confirmed it can run failed models now.

[ghstack-poisoned]
ljk53 added a commit that referenced this pull request Oct 22, 2019
…H mode

Summary:
This is yet-another fix to issue #26764.

Some mobile models call tensor.detach() which won't work with
static-dispatch mode. We disable autograd for static-dispatch / mobile
build anyway so it seems fine to make these op-ops.

Test Plan:
- With stacked PRs, confirmed it can run failed models now.

ghstack-source-id: d73ec06
Pull Request resolved: #28400
@ljk53 ljk53 requested review from ezyang, gchanan and yf225 October 22, 2019 02:39
@facebook-github-bot
Copy link
Contributor

@ljk53 merged this pull request in d0d8b8c.

zdevito pushed a commit to zdevito/ATen that referenced this pull request Oct 22, 2019
…8400)

Summary:
Pull Request resolved: pytorch/pytorch#28400

This is yet-another fix to issue #26764.

Some mobile models call tensor.detach() which won't work with
static-dispatch mode. We disable autograd for static-dispatch / mobile
build anyway so it seems fine to make these op-ops.

Test Plan: - With stacked PRs, confirmed it can run failed models now.

Differential Revision: D18055852

Pulled By: ljk53

fbshipit-source-id: bff3a55fee2ca68ac5333fb4978c11fd18dfcc91
@facebook-github-bot facebook-github-bot deleted the gh/ljk53/67/head branch October 28, 2019 22:16
@gchanan
Copy link
Contributor

gchanan commented Nov 5, 2019

so, what's the plan for addressing this when STATIC_DISPATCH goes away?

thiagocrepaldi pushed a commit to thiagocrepaldi/pytorch that referenced this pull request Feb 4, 2020
…torch#28400)

Summary:
Pull Request resolved: pytorch#28400

This is yet-another fix to issue pytorch#26764.

Some mobile models call tensor.detach() which won't work with
static-dispatch mode. We disable autograd for static-dispatch / mobile
build anyway so it seems fine to make these op-ops.

Test Plan: - With stacked PRs, confirmed it can run failed models now.

Differential Revision: D18055852

Pulled By: ljk53

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants