mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Since there are such cycles in libfmt and PyTorch, which are detected by clang-tidy. ``` /home/cyy/pytorch/third_party/fmt/include/fmt/format-inl.h:25:10: error: circular header file dependency detected while including 'format.h', please check the include path [misc-header-include-cycle,-warnings-as-errors] 25 | #include "format.h" | ^ /home/cyy/pytorch/third_party/fmt/include/fmt/format.h:4530:12: note: 'format-inl.h' included from here 4530 | # include "format-inl.h" ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/127233 Approved by: https://github.com/ezyang
20 lines
398 B
C++
20 lines
398 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__(py::args args, py::kwargs kwargs);
|
|
|
|
c10::StrongTypePtr class_type_;
|
|
};
|
|
|
|
} // namespace torch::jit
|