caffe2::Tensor::is_same() (#15407)
authorSebastian Messmer <messmer@fb.com>
Fri, 11 Jan 2019 00:06:29 +0000 (16:06 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 11 Jan 2019 00:22:25 +0000 (16:22 -0800)
commitda7468853ae322252270bbb58032668bd21b7457
treeb292b044b2d14c7068c3b0329b7b6eabe921963f
parentb9e1028cff3689bf39aac797acaf93c3ef903927
caffe2::Tensor::is_same() (#15407)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15407

Don't ask the tensor for its intrusive pointer if we just want to check if two tensors are the same.
This mirrors ATen APIs.

Reviewed By: dzhulgakov

Differential Revision: D13520389

fbshipit-source-id: 681317f36f480ab60e532bb08a073f98f39770fd
caffe2/core/tensor.h
caffe2/operators/experimental/c10/cpu/add_cpu.cc
caffe2/operators/experimental/c10/cpu/mul_cpu.cc
caffe2/operators/experimental/c10/cpu/stop_gradient_cpu.cc