Skip to content

Commit

Permalink
fix python version
Browse files Browse the repository at this point in the history
  • Loading branch information
zrr1999 committed Feb 3, 2025
1 parent 7ae36b8 commit b13c4b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions paddle/fluid/pybind/jit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ void BindGuard(pybind11::module *m) {

void BindGuardTree(pybind11::module *m) {
#if SOT_IS_SUPPORTED
#if PY_3_11_PLUS
py::class_<GuardTree, std::shared_ptr<GuardTree>>(
*m, "GuardTree", R"DOC(GuardTree Class.)DOC")
.def(py::init<
Expand Down Expand Up @@ -194,6 +195,7 @@ void BindGuardTree(pybind11::module *m) {
py::arg("var_expr"),
py::arg("key_expr"));
#endif
#endif
}

void BindSot(pybind11::module *m) {
Expand Down Expand Up @@ -261,8 +263,10 @@ void BindSot(pybind11::module *m) {
},
py::arg("py_codes"));
BindGuard(m);
#if PY_3_11_PLUS
BindGuardTree(m);
#endif
#endif
}

} // namespace paddle::pybind

0 comments on commit b13c4b0

Please sign in to comment.