diff --git a/ci/run_sot_test.sh b/ci/run_sot_test.sh index 08baa62a4ca98..25b70acf99cb0 100644 --- a/ci/run_sot_test.sh +++ b/ci/run_sot_test.sh @@ -48,7 +48,7 @@ function run_sot_test() { run_and_check "Uninstalling numpy for Python 3.14..." \ $PYTHON_WITH_SPECIFY_VERSION -m pip uninstall -y "numpy" run_and_check "Installing numpy>=2.3.5 for Python 3.14..." \ - $PYTHON_WITH_SPECIFY_VERSION -m pip install "numpy>=2.3.5" + $PYTHON_WITH_SPECIFY_VERSION -m pip install --force-reinstall --no-cache-dir "numpy>=2.3.5" fi # cd to sot test dir diff --git a/paddle/fluid/pybind/sot/cpython_internals/internals_3_14.c b/paddle/fluid/pybind/sot/cpython_internals/internals_3_14.c index b0a22f642ca28..7d70193f2488e 100644 --- a/paddle/fluid/pybind/sot/cpython_internals/internals_3_14.c +++ b/paddle/fluid/pybind/sot/cpython_internals/internals_3_14.c @@ -18,6 +18,7 @@ limitations under the License. */ #include #include +#include #define Py_BUILD_CORE // internal/pycore_opcode.h need this macro #define NEED_OPCODE_TABLES // To get _PyOpcode_Caches and _PyOpcode_Deopt @@ -141,7 +142,7 @@ static void Internal_take_ownership(PyFrameObject *f, PyErr_SetRaisedException(exc); } if (!_PyObject_GC_IS_TRACKED((PyObject *)f)) { - _PyObject_GC_TRACK((PyObject *)f); + PyObject_GC_Track((PyObject *)f); } Py_END_CRITICAL_SECTION(); }