[jit] Remove graph() call from abstract Function interface. (#65967)

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

Graph is an implementation detail. If user wants to get access to the
underlying graph, they should be able to explicitly dynamic cast instead.
ghstack-source-id: 141659819

Test Plan: no behavior change.

Reviewed By: gmagogsfm

Differential Revision: D31326153

fbshipit-source-id: a0e984f57c6013494b92a7095bf5bb660035eb84
This commit is contained in:
Zhengxu Chen
2021-10-27 11:52:48 -07:00
committed by Facebook GitHub Bot
parent 7c48b9ee25
commit b55a2500d2
43 changed files with 324 additions and 261 deletions

View File

@ -32,7 +32,7 @@ constexpr auto kInternalModule = "torch.distributed.rpc.internal";
struct PythonTypeResolver : public jit::Resolver {
std::shared_ptr<jit::SugaredValue> resolveValue(
const std::string& /* unused */,
torch::jit::Function& /* unused */,
torch::jit::GraphFunction& /* unused */,
const jit::SourceRange& /* unused */) override {
TORCH_INTERNAL_ASSERT(
false, "RPC Type resolver does not need to resolve value");