提交 104dc037 authored 作者: Brandon T. Willard's avatar Brandon T. Willard 提交者: Brandon T. Willard

Fix the type of t_fn in scan_perform.pyx

上级 e2e23668
/* Generated by Cython 0.29.27 */
/* Generated by Cython 0.29.28 */
#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
......@@ -9,8 +9,8 @@
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
#error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_29_27"
#define CYTHON_HEX_VERSION 0x001D1BF0
#define CYTHON_ABI "0_29_28"
#define CYTHON_HEX_VERSION 0x001D1CF0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
......@@ -172,7 +172,10 @@
#ifndef CYTHON_UNPACK_METHODS
#define CYTHON_UNPACK_METHODS 1
#endif
#ifndef CYTHON_FAST_THREAD_STATE
#if PY_VERSION_HEX >= 0x030B00A4
#undef CYTHON_FAST_THREAD_STATE
#define CYTHON_FAST_THREAD_STATE 0
#elif !defined(CYTHON_FAST_THREAD_STATE)
#define CYTHON_FAST_THREAD_STATE 1
#endif
#ifndef CYTHON_FAST_PYCALL
......@@ -187,7 +190,10 @@
#ifndef CYTHON_USE_DICT_VERSIONS
#define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
#endif
#ifndef CYTHON_USE_EXC_INFO_STACK
#if PY_VERSION_HEX >= 0x030B00A4
#undef CYTHON_USE_EXC_INFO_STACK
#define CYTHON_USE_EXC_INFO_STACK 0
#elif !defined(CYTHON_USE_EXC_INFO_STACK)
#define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
#endif
#endif
......@@ -2094,7 +2100,7 @@ static PyObject *__pyx_n_s_xrange;
static PyObject *__pyx_pf_6aesara_4scan_12scan_perform_get_version(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6aesara_4scan_12scan_perform_2perform(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_n_shared_outs, unsigned int __pyx_v_n_mit_mot_outs, unsigned int __pyx_v_n_seqs, unsigned int __pyx_v_n_mit_mot, unsigned int __pyx_v_n_mit_sot, unsigned int __pyx_v_n_sit_sot, unsigned int __pyx_v_n_nit_sot, int __pyx_v_as_while, PyArrayObject *__pyx_v_mintaps, PyObject *__pyx_v_tap_array, PyObject *__pyx_v_tap_array_len, PyArrayObject *__pyx_v_vector_seqs, PyArrayObject *__pyx_v_vector_outs, PyObject *__pyx_v_mit_mot_out_slices, PyArrayObject *__pyx_v_mitmots_preallocated, PyArrayObject *__pyx_v_outs_is_tensor, PyObject *__pyx_v_inner_input_storage, PyObject *__pyx_v_inner_output_storage, PyArrayObject *__pyx_v_destroy_map, PyObject *__pyx_v_outer_inputs, PyObject *__pyx_v_outer_outputs, PyObject *__pyx_v_outer_output_dtypes, PyObject *__pyx_v_outer_output_ndims, PyObject *__pyx_v_fn); /* proto */
static PyObject *__pyx_float_0_0;
static PyObject *__pyx_float_0_314;
static PyObject *__pyx_float_0_315;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_slice_;
......@@ -2113,7 +2119,7 @@ static PyObject *__pyx_codeobj__10;
*
*
* def get_version(): # <<<<<<<<<<<<<<
* return 0.314
* return 0.315
*
*/
......@@ -2139,20 +2145,20 @@ static PyObject *__pyx_pf_6aesara_4scan_12scan_perform_get_version(CYTHON_UNUSED
/* "aesara/scan/scan_perform.pyx":62
*
* def get_version():
* return 0.314 # <<<<<<<<<<<<<<
* return 0.315 # <<<<<<<<<<<<<<
*
* @cython.boundscheck(False)
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(__pyx_float_0_314);
__pyx_r = __pyx_float_0_314;
__Pyx_INCREF(__pyx_float_0_315);
__pyx_r = __pyx_float_0_315;
goto __pyx_L0;
/* "aesara/scan/scan_perform.pyx":61
*
*
* def get_version(): # <<<<<<<<<<<<<<
* return 0.314
* return 0.315
*
*/
......@@ -2499,7 +2505,7 @@ static PyObject *__pyx_pw_6aesara_4scan_12scan_perform_3perform(PyObject *__pyx_
}
static PyObject *__pyx_pf_6aesara_4scan_12scan_perform_2perform(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_n_shared_outs, unsigned int __pyx_v_n_mit_mot_outs, unsigned int __pyx_v_n_seqs, unsigned int __pyx_v_n_mit_mot, unsigned int __pyx_v_n_mit_sot, unsigned int __pyx_v_n_sit_sot, unsigned int __pyx_v_n_nit_sot, int __pyx_v_as_while, PyArrayObject *__pyx_v_mintaps, PyObject *__pyx_v_tap_array, PyObject *__pyx_v_tap_array_len, PyArrayObject *__pyx_v_vector_seqs, PyArrayObject *__pyx_v_vector_outs, PyObject *__pyx_v_mit_mot_out_slices, PyArrayObject *__pyx_v_mitmots_preallocated, PyArrayObject *__pyx_v_outs_is_tensor, PyObject *__pyx_v_inner_input_storage, PyObject *__pyx_v_inner_output_storage, PyArrayObject *__pyx_v_destroy_map, PyObject *__pyx_v_outer_inputs, PyObject *__pyx_v_outer_outputs, PyObject *__pyx_v_outer_output_dtypes, PyObject *__pyx_v_outer_output_ndims, PyObject *__pyx_v_fn) {
unsigned int __pyx_v_t_fn;
float __pyx_v_t_fn;
unsigned int __pyx_v_n_steps;
unsigned int __pyx_v_n_outs;
unsigned int __pyx_v_seqs_arg_offset;
......@@ -2600,7 +2606,8 @@ static PyObject *__pyx_pf_6aesara_4scan_12scan_perform_2perform(CYTHON_UNUSED Py
PyObject *__pyx_t_33 = NULL;
PyObject *__pyx_t_34 = NULL;
PyObject *__pyx_t_35 = NULL;
char const *__pyx_t_36;
float __pyx_t_36;
char const *__pyx_t_37;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
......@@ -2663,15 +2670,15 @@ static PyObject *__pyx_pf_6aesara_4scan_12scan_perform_2perform(CYTHON_UNUSED Py
/* "aesara/scan/scan_perform.pyx":160
* # 1. Unzip the number of steps and sequences. If number of steps is
* # negative flip sequences around, and make n_steps positive
* cdef unsigned int t_fn = 0 # <<<<<<<<<<<<<<
* cdef float t_fn = 0 # <<<<<<<<<<<<<<
* cdef unsigned int n_steps = outer_inputs[0].item()
* cdef unsigned int n_outs = n_mit_mot + n_mit_sot + n_sit_sot
*/
__pyx_v_t_fn = 0;
__pyx_v_t_fn = 0.0;
/* "aesara/scan/scan_perform.pyx":161
* # negative flip sequences around, and make n_steps positive
* cdef unsigned int t_fn = 0
* cdef float t_fn = 0
* cdef unsigned int n_steps = outer_inputs[0].item() # <<<<<<<<<<<<<<
* cdef unsigned int n_outs = n_mit_mot + n_mit_sot + n_sit_sot
* cdef unsigned int seqs_arg_offset = n_seqs + 1
......@@ -2702,7 +2709,7 @@ static PyObject *__pyx_pf_6aesara_4scan_12scan_perform_2perform(CYTHON_UNUSED Py
__pyx_v_n_steps = __pyx_t_4;
/* "aesara/scan/scan_perform.pyx":162
* cdef unsigned int t_fn = 0
* cdef float t_fn = 0
* cdef unsigned int n_steps = outer_inputs[0].item()
* cdef unsigned int n_outs = n_mit_mot + n_mit_sot + n_sit_sot # <<<<<<<<<<<<<<
* cdef unsigned int seqs_arg_offset = n_seqs + 1
......@@ -5127,14 +5134,14 @@ static PyObject *__pyx_pf_6aesara_4scan_12scan_perform_2perform(CYTHON_UNUSED Py
* if as_while:
* pdx = offset + n_shared_outs
*/
__pyx_t_16 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t_fn); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 396, __pyx_L1_error)
__pyx_t_16 = PyFloat_FromDouble(__pyx_v_t_fn); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 396, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_16);
__pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_16, __pyx_v_dt_fn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 396, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
__pyx_t_4 = __Pyx_PyInt_As_unsigned_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 396, __pyx_L1_error)
__pyx_t_36 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_36 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 396, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_t_fn = __pyx_t_4;
__pyx_v_t_fn = __pyx_t_36;
/* "aesara/scan/scan_perform.pyx":397
* dt_fn = time.time() - t0_fn
......@@ -6552,7 +6559,7 @@ static PyObject *__pyx_pf_6aesara_4scan_12scan_perform_2perform(CYTHON_UNUSED Py
__Pyx_XGOTREF(__pyx_t_32);
__Pyx_XGOTREF(__pyx_t_31);
__Pyx_XGOTREF(__pyx_t_30);
__pyx_t_28 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_36 = __pyx_filename;
__pyx_t_28 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_37 = __pyx_filename;
{
__Pyx_DECREF(__pyx_v_e);
__pyx_v_e = NULL;
......@@ -6568,7 +6575,7 @@ static PyObject *__pyx_pf_6aesara_4scan_12scan_perform_2perform(CYTHON_UNUSED Py
__Pyx_XGIVEREF(__pyx_t_33);
__Pyx_ErrRestore(__pyx_t_35, __pyx_t_34, __pyx_t_33);
__pyx_t_35 = 0; __pyx_t_34 = 0; __pyx_t_33 = 0; __pyx_t_32 = 0; __pyx_t_31 = 0; __pyx_t_30 = 0;
__pyx_lineno = __pyx_t_28; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_36;
__pyx_lineno = __pyx_t_28; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_37;
goto __pyx_L119_except_error;
}
}
......@@ -7258,7 +7265,7 @@ static PyObject *__pyx_pf_6aesara_4scan_12scan_perform_2perform(CYTHON_UNUSED Py
* return t_fn, i # <<<<<<<<<<<<<<
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_16 = __Pyx_PyInt_From_unsigned_int(__pyx_v_t_fn); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 585, __pyx_L1_error)
__pyx_t_16 = PyFloat_FromDouble(__pyx_v_t_fn); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 585, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_16);
__pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 585, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
......@@ -8623,7 +8630,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
*
*
* def get_version(): # <<<<<<<<<<<<<<
* return 0.314
* return 0.315
*
*/
__pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_scan_perform_pyx, __pyx_n_s_get_version, 61, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 61, __pyx_L1_error)
......@@ -8649,7 +8656,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
__pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_float_0_314 = PyFloat_FromDouble(0.314); if (unlikely(!__pyx_float_0_314)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_float_0_315 = PyFloat_FromDouble(0.315); if (unlikely(!__pyx_float_0_315)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
return 0;
......@@ -9047,7 +9054,7 @@ if (!__Pyx_RefNanny) {
*
*
* def get_version(): # <<<<<<<<<<<<<<
* return 0.314
* return 0.315
*
*/
__pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6aesara_4scan_12scan_perform_1get_version, NULL, __pyx_n_s_aesara_scan_scan_perform); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error)
......
......@@ -59,7 +59,7 @@ from aesara.scan.utils import InnerFunctionError
def get_version():
return 0.314
return 0.315
@cython.boundscheck(False)
def perform(
......@@ -157,7 +157,7 @@ def perform(
"""
# 1. Unzip the number of steps and sequences. If number of steps is
# negative flip sequences around, and make n_steps positive
cdef unsigned int t_fn = 0
cdef float t_fn = 0
cdef unsigned int n_steps = outer_inputs[0].item()
cdef unsigned int n_outs = n_mit_mot + n_mit_sot + n_sit_sot
cdef unsigned int seqs_arg_offset = n_seqs + 1
......
......@@ -23,7 +23,7 @@ if not config.cxx:
_logger = logging.getLogger("aesara.scan.scan_perform")
version = 0.314 # must match constant returned in function get_version()
version = 0.315 # must match constant returned in function get_version()
need_reload = False
scan_perform: Optional[ModuleType] = None
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论