Make name() part of IMethod interface (#63995)
authorWill Constable <whc@fb.com>
Mon, 30 Aug 2021 20:29:51 +0000 (13:29 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Mon, 30 Aug 2021 20:31:55 +0000 (13:31 -0700)
commit85df73658ca38e894542e649bd053f269e77880a
tree7734a165d6abbcf906088c0ba1d6b21f4acef62e
parentb9933f08b985f9105e00804d5c99016841bd4cc7
Make name() part of IMethod interface (#63995)

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

JIT methods already have name() in their interface, and Py methods have names in their implementation.  I'm adding this for a particular case where someone tried to use name() on a JIT method that we're replacing with an IMethod.

Test Plan: add case to imethod API test

Reviewed By: suo

Differential Revision: D30559401

fbshipit-source-id: 76236721f5cd9a9d9d488ddba12bfdd01d679a2c
test/cpp/api/imethod.cpp
torch/csrc/api/include/torch/imethod.h
torch/csrc/deploy/deploy.h
torch/csrc/jit/api/method.h