fix alias annotations on to, cpu, cuda (#16460)
authorMichael Suo <suo@fb.com>
Mon, 28 Jan 2019 23:04:53 +0000 (15:04 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 28 Jan 2019 23:20:23 +0000 (15:20 -0800)
commit1a77918955ba88b47c5559fa922f4f8683cb7f62
tree35ea379fc75d4fbc058e347ae6c8eccc4addc92f
parente3c0926c449dd8645583216c96a981d43efe2aef
fix alias annotations on to, cpu, cuda (#16460)

Summary:
Fix alias annotations for ops that may return a fresh tensor. The previous version was overly conservative.

Currently there is no actual behavior change in the alias analysis, but we may use the information in the future.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16460

Differential Revision: D13849086

Pulled By: suo

fbshipit-source-id: cd23b314a800e5e077d866e74456d37a321439d5
torch/csrc/jit/passes/alias_analysis.cpp
torch/csrc/jit/register_prim_ops.cpp