1#pragma once
2
3#include <torch/csrc/distributed/rpc/message.h>
4#include <torch/csrc/distributed/rpc/rpc_command_base.h>
5#include <torch/csrc/jit/serialization/pickler.h>
6
7namespace torch {
8namespace distributed {
9namespace rpc {
10
11// Return value of a builtin operator or a TorchScript function.
12class TORCH_API ScriptResp final : public RpcCommandBase {
13 public:
14 explicit ScriptResp(at::IValue&& values);
15
16 const at::IValue& value();
17 c10::intrusive_ptr<Message> toMessageImpl() && override;
18 static std::unique_ptr<ScriptResp> fromMessage(const Message& message);
19
20 private:
21 const at::IValue value_;
22};
23
24} // namespace rpc
25} // namespace distributed
26} // namespace torch
27