提交 a2b79859 authored 作者: Ricardo Vieira's avatar Ricardo Vieira 提交者: Michael Osthege

Use `PyObject_CallNoArgs` to call thunks from VM

上级 70b0ce75
......@@ -477,7 +477,7 @@ static PyObject *pycall(CLazyLinker *self, Py_ssize_t node_idx, int verbose) {
double t0 = pytime(NULL);
if (verbose)
fprintf(stderr, "calling via Python (node %i)\n", (int)node_idx);
rval = PyObject_CallObject(thunk, NULL);
rval = PyObject_CallNoArgs(thunk);
if (rval) {
double t1 = pytime(NULL);
double ti = PyFloat_AsDouble(PyList_GetItem(self->call_times, node_idx));
......@@ -491,7 +491,7 @@ static PyObject *pycall(CLazyLinker *self, Py_ssize_t node_idx, int verbose) {
if (verbose) {
fprintf(stderr, "calling via Python (node %i)\n", (int)node_idx);
}
rval = PyObject_CallObject(thunk, NULL);
rval = PyObject_CallNoArgs(thunk);
}
return rval;
}
......@@ -981,7 +981,7 @@ static PyTypeObject lazylinker_ext_CLazyLinkerType = {
};
static PyObject *get_version(PyObject *dummy, PyObject *args) {
PyObject *result = PyFloat_FromDouble(0.3);
PyObject *result = PyFloat_FromDouble(0.31);
return result;
}
......
......@@ -14,7 +14,7 @@ from pytensor.link.c.cmodule import GCC_compiler
_logger = logging.getLogger(__file__)
force_compile = False
version = 0.3 # must match constant returned in function get_version()
version = 0.31 # must match constant returned in function get_version()
lazylinker_ext: ModuleType | None = None
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论