mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-22 14:15:01 +08:00
Mostly in torch/csrc/jit/runtime and in `ATen/cuda/` Pull Request resolved: https://github.com/pytorch/pytorch/pull/110314 Approved by: https://github.com/seemethere
21 lines
446 B
C++
21 lines
446 B
C++
#pragma once
|
|
|
|
#include <torch/csrc/jit/python/pybind_utils.h>
|
|
#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__(py::args args, py::kwargs kwargs);
|
|
|
|
c10::StrongTypePtr class_type_;
|
|
};
|
|
|
|
} // namespace torch::jit
|