mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Follows #131969 Pull Request resolved: https://github.com/pytorch/pytorch/pull/131986 Approved by: https://github.com/ezyang
20 lines
412 B
C++
20 lines
412 B
C++
#pragma once
|
|
|
|
#include <torch/csrc/utils/pybind.h>
|
|
#include <torch/custom_class.h>
|
|
|
|
namespace torch::jit {
|
|
|
|
void initPythonCustomClassBindings(PyObject* module);
|
|
|
|
struct ScriptClass {
|
|
ScriptClass(c10::StrongTypePtr class_type)
|
|
: class_type_(std::move(class_type)) {}
|
|
|
|
py::object __call__(const py::args& args, const py::kwargs& kwargs);
|
|
|
|
c10::StrongTypePtr class_type_;
|
|
};
|
|
|
|
} // namespace torch::jit
|