xref: /aosp_15_r20/external/pytorch/torch/csrc/jit/python/python_custom_class.h (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1 #pragma once
2 
3 #include <torch/csrc/utils/pybind.h>
4 #include <torch/custom_class.h>
5 
6 namespace torch::jit {
7 
8 void initPythonCustomClassBindings(PyObject* module);
9 
10 struct ScriptClass {
ScriptClassScriptClass11   ScriptClass(c10::StrongTypePtr class_type)
12       : class_type_(std::move(class_type)) {}
13 
14   py::object __call__(const py::args& args, const py::kwargs& kwargs);
15 
16   c10::StrongTypePtr class_type_;
17 };
18 
19 } // namespace torch::jit
20