change detach() & detach_() to no-op for USE_STATIC_DISPATCH mode (#28400)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/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