Repository: pytorch
Issue: hasSpecialCase INTERNAL ASSERT FAILED: We don't have an op for aten::to but it isn't a special case.
Labels: oncall: jit,triaged

## Stack trace
```
RuntimeError: hasSpecialCase INTERNAL ASSERT FAILED at /pytorch/torch/csrc/jit/passes/alias_analysis.cpp:300, please report a bug to PyTorch. We don't have an op for aten::to but it isn't a special case. (analyzeImpl at /pytorch/torch/csrc/jit/passes/alias_analysis.cpp:300)
frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x33 (0x7f672f887193 in /usr/local/lib/python3.6/dist-packages/torch/lib/libc10.so)
frame #1: <unknown function> + 0x410926b (0x7f6733feb26b in /usr/local/lib/python3.6/dist-packages/torch/lib/libtorch.so)
frame #2: <unknown function> + 0x410afc0 (0x7f6733fecfc0 in /usr/local/lib/python3.6/dist-packages/torch/lib/libtorch.so)
frame #3: torch::jit::AliasDb::AliasDb(std::shared_ptr<torch::jit::Graph>) + 0x215 (0x7f6733fed265 in /usr/local/lib/python3.6/dist-packages/torch/lib/libtorch.so)
frame #4: torch::jit::EliminateDeadCode(std::shared_ptr<torch::jit::Graph> const&, torch::jit::DCESideEffectPolicy) + 0x5e (0x7f673402532e in /usr/local/lib/python3.6/dist-packages/torch/lib/libtorch.so)
frame #5: <unknown function> + 0x4157a4b (0x7f6734039a4b in /usr/local/lib/python3.6/dist-packages/torch/lib/libtorch.so)
frame #6: torch::jit::FixupTraceScopeBlocks(std::shared_ptr<torch::jit::Graph>&, torch::jit::script::Module*) + 0x38b (0x7f673403ce3b in /usr/local/lib/python3.6/dist-packages/torch/lib/libtorch.so)
frame #7: torch::jit::tracer::trace(std::vector<c10::IValue, std::allocator<c10::IValue> >, std::function<std::vector<c10::IValue, std::allocator<c10::IValue> > (std::vector<c10::IValue, std::allocator<c10::IValue> >)> const&, std::function<std::string (at::Tensor const&)>, bool, torch::jit::script::Module*) + 0x5a6 (0x7f67341f9aa6 in /usr/local/lib/python3.6/dist-packages/torch/lib/libtorch.so)
frame #8: <unknown function> + 0x758231 (0x7f677b17c231 in /usr/local/lib/python3.6/dist-packages/torch/lib/libtorch_python.so)
frame #9: <unknown function> + 0x771ab2 (0x7f677b195ab2 in /usr/local/lib/python3.6/dist-packages/torch/lib/libtorch_python.so)
frame #10: <unknown function> + 0x2961c4 (0x7f677acba1c4 in /usr/local/lib/python3.6/dist-packages/torch/lib/libtorch_python.so)
frame #11: _PyCFunction_FastCallDict + 0x35c (0x5674fc in /usr/bin/python3)
frame #12: /usr/bin/python3() [0x50abb3]
frame #13: _PyEval_EvalFrameDefault + 0x449 (0x50c5b9 in /usr/bin/python3)
frame #14: /usr/bin/python3() [0x508245]
frame #15: /usr/bin/python3() [0x50a080]
frame #16: /usr/bin/python3() [0x50aa7d]
frame #17: _PyEval_EvalFrameDefault + 0x449 (0x50c5b9 in /usr/bin/python3)
frame #18: /usr/bin/python3() [0x508245]
frame #19: /usr/bin/python3() [0x50a080]
frame #20: /usr/bin/python3() [0x50aa7d]
frame #21: _PyEval_EvalFrameDefault + 0x449 (0x50c5b9 in /usr/bin/python3)
frame #22: /usr/bin/python3() [0x508245]
frame #23: /usr/bin/python3() [0x50a080]
frame #24: /usr/bin/python3() [0x50aa7d]
frame #25: _PyEval_EvalFrameDefault + 0x449 (0x50c5b9 in /usr/bin/python3)
frame #26: /usr/bin/python3() [0x508245]
frame #27: /usr/bin/python3() [0x50a080]
frame #28: /usr/bin/python3() [0x50aa7d]
frame #29: _PyEval_EvalFrameDefault + 0x449 (0x50c5b9 in /usr/bin/python3)
frame #30: /usr/bin/python3() [0x509d48]
frame #31: /usr/bin/python3() [0x50aa7d]
frame #32: _PyEval_EvalFrameDefault + 0x449 (0x50c5b9 in /usr/bin/python3)
frame #33: /usr/bin/python3() [0x508245]
frame #34: PyEval_EvalCode + 0x23 (0x50b403 in /usr/bin/python3)
frame #35: /usr/bin/python3() [0x635222]
frame #36: PyRun_FileExFlags + 0x97 (0x6352d7 in /usr/bin/python3)
frame #37: PyRun_SimpleFileExFlags + 0x17f (0x638a8f in /usr/bin/python3)
frame #38: Py_Main + 0x591 (0x639631 in /usr/bin/python3)
frame #39: main + 0xe0 (0x4b0f40 in /usr/bin/python3)
frame #40: __libc_start_main + 0xe7 (0x7f6783c12b97 in /lib/x86_64-linux-gnu/libc.so.6)
frame #41: _start + 0x2a (0x5b2fda in /usr/bin/python3)
```

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

## Environment

PyTorch version: 1.4.0
Is debug build: No
CUDA used to build PyTorch: 10.1

OS: Ubuntu 18.04.4 LTS
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
CMake version: version 3.10.2

Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 10.1.168
GPU models and configuration: 
GPU 0: GeForce RTX 2080 Ti
GPU 1: GeForce RTX 2080 Ti
GPU 2: GeForce RTX 2080 Ti
GPU 3: GeForce RTX 2080 Ti

Nvidia driver version: 440.59
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.0

Versions of relevant libraries:
[pip3] numpy==1.18.2
[pip3] torch==1.4.0
[pip3] torchvision==0.5.0
[conda] Could not collect


## Additional context

<!-- Add any other context about the problem here. -->


cc @suo