pytensor 2.36.2__tar.gz → 2.37.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytensor-2.36.2/pytensor.egg-info → pytensor-2.37.0}/PKG-INFO +1 -1
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/extending/creating_an_op.rst +3 -3
- {pytensor-2.36.2 → pytensor-2.37.0}/pyproject.toml +7 -13
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/_version.py +3 -3
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/breakpoint.py +2 -2
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/configdefaults.py +0 -9
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/configparser.py +0 -1
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/gradient.py +17 -19
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/basic.py +1 -1
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/dispatch/scan.py +7 -2
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/dispatch/slinalg.py +30 -10
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/dispatch/tensor_basic.py +3 -20
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/linker.py +1 -1
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/mlx/dispatch/core.py +0 -18
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/cache.py +49 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/basic.py +16 -43
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/blockwise.py +3 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/compile_ops.py +1 -1
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/elemwise.py +13 -2
- pytensor-2.37.0/pytensor/link/numba/dispatch/linalg/_LAPACK.py +948 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/linalg/decomposition/cholesky.py +11 -13
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/linalg/decomposition/lu.py +6 -15
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/linalg/decomposition/lu_factor.py +4 -3
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/linalg/decomposition/qr.py +73 -312
- pytensor-2.37.0/pytensor/link/numba/dispatch/linalg/decomposition/schur.py +228 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/linalg/solve/cholesky.py +9 -8
- pytensor-2.37.0/pytensor/link/numba/dispatch/linalg/solve/general.py +85 -0
- pytensor-2.37.0/pytensor/link/numba/dispatch/linalg/solve/linear_control.py +100 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/linalg/solve/lu_solve.py +5 -12
- pytensor-2.37.0/pytensor/link/numba/dispatch/linalg/solve/posdef.py +116 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/linalg/solve/symmetric.py +44 -130
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/linalg/solve/triangular.py +6 -8
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/linalg/solve/tridiagonal.py +22 -94
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/linalg/utils.py +2 -64
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/random.py +1 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/scalar.py +1 -1
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/scan.py +4 -2
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/slinalg.py +190 -123
- pytensor-2.37.0/pytensor/link/numba/dispatch/sparse/__init__.py +1 -0
- pytensor-2.37.0/pytensor/link/numba/dispatch/sparse/basic.py +86 -0
- pytensor-2.37.0/pytensor/link/numba/dispatch/sparse/math.py +372 -0
- pytensor-2.37.0/pytensor/link/numba/dispatch/sparse/variable.py +420 -0
- pytensor-2.37.0/pytensor/link/numba/dispatch/string_codegen.py +31 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/subtensor.py +1 -1
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/tensor_basic.py +3 -3
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/typed_list.py +13 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/vectorize_codegen.py +19 -8
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/linker.py +1 -1
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/vm.py +1 -1
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/raise_op.py +5 -2
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/scalar/basic.py +26 -45
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/scan/basic.py +9 -11
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/scan/op.py +56 -51
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/scan/rewriting.py +5 -7
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/scan/utils.py +16 -18
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/sparse/basic.py +27 -18
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/sparse/math.py +88 -67
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/sparse/variable.py +9 -7
- pytensor-2.37.0/pytensor/tensor/_linalg/solve/linear_control.py +366 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/_linalg/solve/rewriting.py +41 -18
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/basic.py +20 -50
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/blockwise.py +15 -4
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/extra_ops.py +1 -2
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/fft.py +3 -3
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/linalg.py +1 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/nlinalg.py +3 -3
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/optimize.py +302 -238
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/reshape.py +131 -122
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/rewriting/blas_c.py +1 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/rewriting/linalg.py +179 -51
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/rewriting/math.py +48 -24
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/rewriting/reshape.py +3 -2
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/rewriting/subtensor_lift.py +5 -1
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/shape.py +6 -5
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/signal/conv.py +2 -7
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/slinalg.py +270 -430
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/subtensor.py +12 -11
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/type.py +12 -13
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/type_other.py +2 -2
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/xtensor/linalg.py +8 -19
- {pytensor-2.36.2 → pytensor-2.37.0/pytensor.egg-info}/PKG-INFO +1 -1
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor.egg-info/SOURCES.txt +9 -8
- {pytensor-2.36.2 → pytensor-2.37.0}/tests/test_gradient.py +12 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/tests/test_raise_op.py +1 -6
- pytensor-2.36.2/doc/library/tensor/conv.rst +0 -11
- pytensor-2.36.2/pytensor/link/numba/dispatch/linalg/_LAPACK.py +0 -557
- pytensor-2.36.2/pytensor/link/numba/dispatch/linalg/solve/general.py +0 -147
- pytensor-2.36.2/pytensor/link/numba/dispatch/linalg/solve/norm.py +0 -55
- pytensor-2.36.2/pytensor/link/numba/dispatch/linalg/solve/posdef.py +0 -224
- pytensor-2.36.2/pytensor/link/numba/dispatch/sparse.py +0 -206
- pytensor-2.36.2/pytensor/tensor/conv/__init__.py +0 -10
- pytensor-2.36.2/pytensor/tensor/conv/abstract_conv.py +0 -3720
- pytensor-2.36.2/tests/tensor/conv/c_code/corr3d_gemm.c +0 -421
- pytensor-2.36.2/tests/tensor/conv/c_code/corr_gemm.c +0 -570
- {pytensor-2.36.2 → pytensor-2.37.0}/LICENSE.txt +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/MANIFEST.in +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/README.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/.templates/PLACEHOLDER +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/.templates/layout.html +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/.templates/nb-badges.html +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/.templates/rendered_citation.html +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/LICENSE.txt +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/README.md +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/_drafts/benchmark_mlx_v_jax_corrected.ipynb +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/_thumbnails/autodiff/vector_jacobian_product.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/acknowledgement.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/bcast.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/bcast.svg +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/blog.md +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/conf.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/core_development_guide.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/css.inc +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/dev_start_guide.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/environment.yml +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/extending/apply.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/extending/apply.svg +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/extending/apply2.svg +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/extending/creating_a_c_op.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/extending/creating_a_numba_jax_op.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/extending/ctype.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/extending/extending_faq.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/extending/extending_pytensor_solution_1.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/extending/graph_rewriting.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/extending/graphstructures.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/extending/index.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/extending/inplace.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/extending/op.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/extending/other_ops.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/extending/pics/symbolic_graph_opt.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/extending/pics/symbolic_graph_unopt.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/extending/pipeline.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/extending/scan.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/extending/tips.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/extending/type.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/extending/unittest.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/extending/using_params.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/faq.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/gallery/applications/normalizing_flows_in_pytensor.ipynb +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/gallery/autodiff/vector_jacobian_product.ipynb +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/gallery/introduction/pytensor_intro.ipynb +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/gallery/optimize/root.ipynb +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/gallery/page_footer.md +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/gallery/rewrites/graph_rewrites.ipynb +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/gallery/scan/scan_tutorial.ipynb +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/generate_dtype_tensor_table.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/glossary.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/images/Elman_srnn.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/images/PyTensor.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/images/PyTensor_RGB.svg +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/images/PyTensor_logo.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/images/binder.svg +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/images/blocksparse.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/images/colab.svg +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/images/github.svg +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/images/lstm.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/images/lstm_memorycell.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/images/talk2010.gif +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/images/talk2010.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/index.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/install.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/internal/how_to_release.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/internal/index.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/internal/metadocumentation.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/introduction.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/compile/debugmode.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/compile/function.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/compile/index.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/compile/io.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/compile/mode.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/compile/nanguardmode.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/compile/opfromgraph.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/compile/ops.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/compile/profilemode.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/compile/shared.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/config.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/d3viz/examples/d3viz/css/d3-context-menu.css +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/d3viz/examples/d3viz/css/d3viz.css +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/d3viz/examples/d3viz/js/d3-context-menu.js +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/d3viz/examples/d3viz/js/d3.v3.min.js +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/d3viz/examples/d3viz/js/d3viz.js +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/d3viz/examples/d3viz/js/dagre-d3.min.js +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/d3viz/examples/d3viz/js/graphlib-dot.min.js +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/d3viz/examples/mlp.html +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/d3viz/examples/mlp.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/d3viz/examples/mlp2.html +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/d3viz/examples/mlp2.pdf +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/d3viz/examples/mlp2.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/d3viz/examples/ofg.html +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/d3viz/examples/ofg2.html +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/d3viz/index.ipynb +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/d3viz/index.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/d3viz/index_files/index_10_0.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/d3viz/index_files/index_11_0.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/d3viz/index_files/index_24_0.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/d3viz/index_files/index_25_0.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/graph/features.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/graph/fgraph.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/graph/graph.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/graph/index.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/graph/op.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/graph/replace.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/graph/type.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/graph/utils.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/index.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/misc/pkl_utils.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/printing.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/scalar/index.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/scan.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/sparse/index.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/sparse/sandbox.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/tensor/basic.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/tensor/basic_opt.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/tensor/bcast.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/tensor/bcast.svg +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/tensor/elemwise.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/tensor/extra_ops.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/tensor/fft.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/tensor/functional.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/tensor/index.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/tensor/io.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/tensor/math_opt.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/tensor/nlinalg.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/tensor/optimize.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/tensor/plot_fft.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/tensor/random/distributions.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/tensor/random/index.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/tensor/slinalg.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/tensor/utils.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/typed_list.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/xtensor/index.md +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/xtensor/linalg.md +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/xtensor/math.md +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/xtensor/module_functions.md +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/xtensor/random.md +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/library/xtensor/type.md +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/links.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/optimizations.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/pylintrc +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/robots.txt +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/troubleshooting.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/adding.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/adding_solution_1.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/aliasing.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/apply.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/apply.svg +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/bcast.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/broadcasting.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/conditions.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/debug_faq.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/dlogistic.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/examples.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/faq_tutorial.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/gradients.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/index.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/loading_and_saving.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/logistic.gp +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/logistic.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/loop.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/loop_solution_1.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/modes.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/modes_solution_1.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/multi_cores.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/nan_tutorial.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/pics/d3viz.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/pics/logreg_pydotprint_predict.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/pics/logreg_pydotprint_prediction.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/pics/logreg_pydotprint_train.png +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/printing_drawing.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/prng.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/profiling.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/profiling_example.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/profiling_example_out.prof +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/shape_info.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/sparse.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/tutorial/symbolic_graphs.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/doc/user_guide.rst +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/bin/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/bin/pytensor_cache.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/compile/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/compile/builders.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/compile/compiledir.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/compile/compilelock.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/compile/debugmode.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/compile/function/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/compile/function/pfunc.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/compile/function/types.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/compile/io.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/compile/mode.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/compile/monitormode.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/compile/nanguardmode.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/compile/ops.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/compile/profiling.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/compile/sharedvalue.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/d3viz/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/d3viz/css/d3-context-menu.css +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/d3viz/css/d3viz.css +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/d3viz/d3viz.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/d3viz/formatting.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/d3viz/html/template.html +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/d3viz/js/d3-context-menu.js +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/d3viz/js/d3.v3.min.js +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/d3viz/js/d3viz.js +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/d3viz/js/dagre-d3.min.js +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/d3viz/js/graphlib-dot.min.js +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/graph/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/graph/basic.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/graph/destroyhandler.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/graph/features.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/graph/fg.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/graph/null_type.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/graph/op.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/graph/replace.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/graph/rewriting/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/graph/rewriting/basic.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/graph/rewriting/db.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/graph/rewriting/kanren.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/graph/rewriting/unify.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/graph/rewriting/utils.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/graph/traversal.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/graph/type.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/graph/utils.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/ifelse.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/ipython.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/c/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/c/basic.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/c/c_code/lazylinker_c.c +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/c/c_code/pytensor_mod_helper.h +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/c/cmodule.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/c/cutils.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/c/cvm.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/c/exceptions.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/c/interface.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/c/lazylinker_c.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/c/op.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/c/params_type.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/c/type.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/dispatch/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/dispatch/basic.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/dispatch/blas.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/dispatch/blockwise.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/dispatch/einsum.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/dispatch/elemwise.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/dispatch/extra_ops.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/dispatch/math.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/dispatch/nlinalg.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/dispatch/pad.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/dispatch/random.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/dispatch/scalar.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/dispatch/shape.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/dispatch/signal/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/dispatch/signal/conv.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/dispatch/sort.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/dispatch/sparse.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/dispatch/subtensor.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/jax/ops.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/mlx/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/mlx/dispatch/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/mlx/dispatch/basic.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/mlx/dispatch/blockwise.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/mlx/dispatch/elemwise.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/mlx/dispatch/extra_ops.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/mlx/dispatch/math.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/mlx/dispatch/nlinalg.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/mlx/dispatch/shape.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/mlx/dispatch/signal/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/mlx/dispatch/signal/conv.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/mlx/dispatch/slinalg.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/mlx/dispatch/sort.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/mlx/dispatch/subtensor.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/mlx/linker.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/cython_support.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/extra_ops.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/linalg/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/linalg/decomposition/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/linalg/solve/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/linalg/solve/utils.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/nlinalg.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/shape.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/signal/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/signal/conv.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/numba/dispatch/sort.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/pytorch/dispatch/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/pytorch/dispatch/basic.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/pytorch/dispatch/blas.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/pytorch/dispatch/blockwise.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/pytorch/dispatch/elemwise.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/pytorch/dispatch/extra_ops.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/pytorch/dispatch/math.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/pytorch/dispatch/nlinalg.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/pytorch/dispatch/scalar.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/pytorch/dispatch/shape.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/pytorch/dispatch/slinalg.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/pytorch/dispatch/sort.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/pytorch/dispatch/subtensor.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/pytorch/linker.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/link/utils.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/misc/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/misc/check_blas.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/misc/check_blas_many.sh +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/misc/check_duplicate_key.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/misc/elemwise_openmp_speedup.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/misc/elemwise_time_test.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/misc/frozendict.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/misc/may_share_memory.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/misc/ordered_set.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/misc/pkl_utils.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/npy_2_compat.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/printing.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/py.typed +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/scalar/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/scalar/c_code/Faddeeva.cc +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/scalar/c_code/Faddeeva.hh +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/scalar/c_code/gamma.c +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/scalar/c_code/incbet.c +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/scalar/loop.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/scalar/math.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/scalar/sharedvar.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/scan/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/scan/checkpoints.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/scan/scan_perform.pyx +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/scan/scan_perform_ext.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/scan/views.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/sparse/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/sparse/linalg.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/sparse/rewriting.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/sparse/sharedvar.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/sparse/type.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/sparse/utils.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/_linalg/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/_linalg/solve/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/_linalg/solve/tridiagonal.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/blas.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/blas_c.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/blas_headers.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/c_code/alt_blas_common.h +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/c_code/alt_blas_template.c +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/c_code/dimshuffle.c +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/einsum.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/elemwise.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/elemwise_cgen.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/exceptions.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/fourier.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/functional.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/interpolate.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/math.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/pad.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/random/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/random/basic.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/random/op.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/random/rewriting/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/random/rewriting/basic.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/random/rewriting/jax.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/random/rewriting/numba.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/random/type.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/random/utils.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/random/var.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/rewriting/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/rewriting/basic.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/rewriting/blas.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/rewriting/blockwise.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/rewriting/einsum.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/rewriting/elemwise.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/rewriting/extra_ops.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/rewriting/jax.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/rewriting/numba.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/rewriting/ofg.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/rewriting/shape.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/rewriting/special.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/rewriting/subtensor.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/rewriting/uncanonicalize.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/sharedvar.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/signal/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/sort.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/special.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/utils.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/var.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/variable.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/tensor/xlogx.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/typed_list/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/typed_list/basic.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/typed_list/rewriting.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/typed_list/type.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/updates.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/utils.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/xtensor/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/xtensor/basic.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/xtensor/indexing.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/xtensor/math.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/xtensor/random.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/xtensor/reduction.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/xtensor/rewriting/__init__.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/xtensor/rewriting/basic.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/xtensor/rewriting/indexing.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/xtensor/rewriting/math.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/xtensor/rewriting/reduction.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/xtensor/rewriting/shape.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/xtensor/rewriting/utils.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/xtensor/rewriting/vectorization.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/xtensor/shape.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/xtensor/type.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor/xtensor/vectorization.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor.egg-info/dependency_links.txt +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor.egg-info/entry_points.txt +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor.egg-info/requires.txt +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/pytensor.egg-info/top_level.txt +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/scripts/mypy-failing.txt +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/scripts/slowest_tests/update-slowest-times-issue.sh +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/setup.cfg +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/setup.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/tests/link/c/c_code/test_cenum.h +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/tests/link/c/c_code/test_quadratic_function.c +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/tests/test_breakpoint.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/tests/test_config.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/tests/test_ifelse.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/tests/test_printing.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/tests/test_rop.py +0 -0
- {pytensor-2.36.2 → pytensor-2.37.0}/tests/test_updates.py +0 -0
|
@@ -495,7 +495,7 @@ If both outputs are disconnected PyTensor will not bother calling the :meth:`L_o
|
|
|
495
495
|
|
|
496
496
|
from pytensor.graph.op import Op
|
|
497
497
|
from pytensor.graph.basic import Apply
|
|
498
|
-
from pytensor.gradient import DisconnectedType
|
|
498
|
+
from pytensor.gradient import DisconnectedType, disconnected_type
|
|
499
499
|
|
|
500
500
|
class TransposeAndSumOp(Op):
|
|
501
501
|
__props__ = ()
|
|
@@ -539,13 +539,13 @@ If both outputs are disconnected PyTensor will not bother calling the :meth:`L_o
|
|
|
539
539
|
out1_grad, out2_grad = output_grads
|
|
540
540
|
|
|
541
541
|
if isinstance(out1_grad.type, DisconnectedType):
|
|
542
|
-
x_grad =
|
|
542
|
+
x_grad = disconnected_type()
|
|
543
543
|
else:
|
|
544
544
|
# Transpose the last two dimensions of the output gradient
|
|
545
545
|
x_grad = pt.swapaxes(out1_grad, -1, -2)
|
|
546
546
|
|
|
547
547
|
if isinstance(out2_grad.type, DisconnectedType):
|
|
548
|
-
y_grad =
|
|
548
|
+
y_grad = disconnected_type()
|
|
549
549
|
else:
|
|
550
550
|
# Broadcast the output gradient to the same shape as y
|
|
551
551
|
y_grad = pt.broadcast_to(pt.expand_dims(out2_grad, -1), y.shape)
|
|
@@ -149,27 +149,21 @@ lines-after-imports = 2
|
|
|
149
149
|
# TODO: Get rid of these:
|
|
150
150
|
"**/__init__.py" = ["F401", "E402", "F403"]
|
|
151
151
|
"pytensor/tensor/linalg.py" = ["F403"]
|
|
152
|
+
# Modules that use print-statements, skip "T201"
|
|
152
153
|
"pytensor/link/c/cmodule.py" = ["PTH", "T201"]
|
|
153
154
|
"pytensor/misc/elemwise_time_test.py" = ["T201"]
|
|
154
155
|
"pytensor/misc/elemwise_openmp_speedup.py" = ["T201"]
|
|
155
156
|
"pytensor/misc/check_duplicate_key.py" = ["T201"]
|
|
156
157
|
"pytensor/misc/check_blas.py" = ["T201"]
|
|
157
158
|
"pytensor/bin/pytensor_cache.py" = ["T201"]
|
|
158
|
-
# For the tests we skip `E402` because `pytest.importorskip` is used:
|
|
159
|
-
"tests/link/jax/test_scalar.py" = ["E402"]
|
|
160
|
-
"tests/link/jax/test_tensor_basic.py" = ["E402"]
|
|
161
|
-
"tests/link/numba/test_basic.py" = ["E402"]
|
|
162
|
-
"tests/link/numba/test_cython_support.py" = ["E402"]
|
|
163
|
-
"tests/link/numba/test_performance.py" = ["E402"]
|
|
164
|
-
"tests/link/numba/test_sparse.py" = ["E402"]
|
|
165
|
-
"tests/link/numba/test_tensor_basic.py" = ["E402"]
|
|
166
|
-
"tests/tensor/test_math_scipy.py" = ["E402"]
|
|
167
|
-
"tests/sparse/test_basic.py" = ["E402"]
|
|
168
|
-
"tests/sparse/test_sp2.py" = ["E402"]
|
|
169
|
-
"tests/sparse/test_utils.py" = ["E402"]
|
|
170
|
-
"tests/sparse/sandbox/test_sp.py" = ["E402", "F401"]
|
|
171
159
|
"tests/compile/test_monitormode.py" = ["T201"]
|
|
172
160
|
"scripts/run_mypy.py" = ["T201"]
|
|
161
|
+
# Test modules of optional backends that use `pytest.importorskip`, skip "E402"
|
|
162
|
+
"tests/link/jax/**/test_*.py" = ["E402"]
|
|
163
|
+
"tests/link/numba/**/test_*.py" = ["E402"]
|
|
164
|
+
"tests/link/pytorch/**/test_*.py" = ["E402"]
|
|
165
|
+
"tests/link/mlx/**/test_*.py" = ["E402"]
|
|
166
|
+
|
|
173
167
|
|
|
174
168
|
|
|
175
169
|
[tool.mypy]
|
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2026-01-
|
|
11
|
+
"date": "2026-01-23T09:04:26+0100",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "2.
|
|
14
|
+
"full-revisionid": "9834e96cee86d9f18436be5fa9e31c692bf6326f",
|
|
15
|
+
"version": "2.37.0"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import numpy as np
|
|
2
2
|
|
|
3
|
-
from pytensor.gradient import
|
|
3
|
+
from pytensor.gradient import disconnected_type
|
|
4
4
|
from pytensor.graph.basic import Apply, Variable
|
|
5
5
|
from pytensor.graph.op import Op
|
|
6
6
|
from pytensor.tensor.basic import as_tensor_variable
|
|
@@ -142,7 +142,7 @@ class PdbBreakpoint(Op):
|
|
|
142
142
|
output_storage[i][0] = inputs[i + 1]
|
|
143
143
|
|
|
144
144
|
def grad(self, inputs, output_gradients):
|
|
145
|
-
return [
|
|
145
|
+
return [disconnected_type(), *output_gradients]
|
|
146
146
|
|
|
147
147
|
def infer_shape(self, fgraph, inputs, input_shapes):
|
|
148
148
|
# Return the shape of every input but the condition (first input)
|
|
@@ -270,15 +270,6 @@ def add_basic_configvars():
|
|
|
270
270
|
in_c_key=False,
|
|
271
271
|
)
|
|
272
272
|
|
|
273
|
-
config.add(
|
|
274
|
-
"conv__assert_shape",
|
|
275
|
-
"If True, AbstractConv* ops will verify that user-provided"
|
|
276
|
-
" shapes match the runtime shapes (debugging option,"
|
|
277
|
-
" may slow down compilation)",
|
|
278
|
-
BoolParam(False),
|
|
279
|
-
in_c_key=False,
|
|
280
|
-
)
|
|
281
|
-
|
|
282
273
|
config.add(
|
|
283
274
|
"print_global_stats",
|
|
284
275
|
"Print some global statistics (time spent) at the end",
|
|
@@ -494,22 +494,25 @@ def Lop(
|
|
|
494
494
|
coordinates of the tensor elements.
|
|
495
495
|
If `f` is a list/tuple, then return a list/tuple with the results.
|
|
496
496
|
"""
|
|
497
|
-
|
|
498
|
-
_eval_points: list[Variable] = [pytensor.tensor.as_tensor_variable(eval_points)]
|
|
499
|
-
else:
|
|
500
|
-
_eval_points = [pytensor.tensor.as_tensor_variable(x) for x in eval_points]
|
|
497
|
+
from pytensor.tensor import as_tensor_variable
|
|
501
498
|
|
|
502
|
-
if not isinstance(
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
499
|
+
if not isinstance(eval_points, Sequence):
|
|
500
|
+
eval_points = [eval_points]
|
|
501
|
+
_eval_points = [
|
|
502
|
+
x if isinstance(x, Variable) else as_tensor_variable(x) for x in eval_points
|
|
503
|
+
]
|
|
504
|
+
|
|
505
|
+
if not isinstance(f, Sequence):
|
|
506
|
+
f = [f]
|
|
507
|
+
_f = [x if isinstance(x, Variable) else as_tensor_variable(x) for x in f]
|
|
506
508
|
|
|
507
509
|
grads = list(_eval_points)
|
|
508
510
|
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
511
|
+
using_list = isinstance(wrt, list)
|
|
512
|
+
using_tuple = isinstance(wrt, tuple)
|
|
513
|
+
if not isinstance(wrt, Sequence):
|
|
514
|
+
wrt = [wrt]
|
|
515
|
+
_wrt = [x if isinstance(x, Variable) else as_tensor_variable(x) for x in wrt]
|
|
513
516
|
|
|
514
517
|
assert len(_f) == len(grads)
|
|
515
518
|
known = dict(zip(_f, grads, strict=True))
|
|
@@ -523,8 +526,6 @@ def Lop(
|
|
|
523
526
|
return_disconnected=return_disconnected,
|
|
524
527
|
)
|
|
525
528
|
|
|
526
|
-
using_list = isinstance(wrt, list)
|
|
527
|
-
using_tuple = isinstance(wrt, tuple)
|
|
528
529
|
return as_list_or_tuple(using_list, using_tuple, ret)
|
|
529
530
|
|
|
530
531
|
|
|
@@ -2104,16 +2105,13 @@ def jacobian(
|
|
|
2104
2105
|
idx, expr, *wrt = args
|
|
2105
2106
|
return grad(expr[idx], wrt, **grad_kwargs)
|
|
2106
2107
|
|
|
2107
|
-
jacobian_matrices
|
|
2108
|
+
jacobian_matrices = pytensor.scan(
|
|
2108
2109
|
inner_function,
|
|
2109
2110
|
sequences=pytensor.tensor.arange(expression.size),
|
|
2110
2111
|
non_sequences=[expression.ravel(), *wrt],
|
|
2112
|
+
return_updates=False,
|
|
2111
2113
|
return_list=True,
|
|
2112
2114
|
)
|
|
2113
|
-
if updates:
|
|
2114
|
-
raise ValueError(
|
|
2115
|
-
"The scan used to build the jacobian matrices returned a list of updates"
|
|
2116
|
-
)
|
|
2117
2115
|
|
|
2118
2116
|
if jacobian_matrices[0].ndim < (expression.ndim + wrt[0].ndim):
|
|
2119
2117
|
# There was some raveling or squeezing done prior to getting the jacobians
|
|
@@ -284,7 +284,7 @@ class PerformLinker(LocalLinker):
|
|
|
284
284
|
"""
|
|
285
285
|
|
|
286
286
|
required_rewrites: tuple[str, ...] = ("minimum_compile", "py_only")
|
|
287
|
-
incompatible_rewrites: tuple[str, ...] = ("
|
|
287
|
+
incompatible_rewrites: tuple[str, ...] = ("cxx_only",)
|
|
288
288
|
|
|
289
289
|
def __init__(
|
|
290
290
|
self, allow_gc: bool | None = None, schedule: Callable | None = None
|
|
@@ -10,7 +10,7 @@ from pytensor.scan.op import Scan
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
@jax_funcify.register(Scan)
|
|
13
|
-
def jax_funcify_Scan(op: Scan, **kwargs):
|
|
13
|
+
def jax_funcify_Scan(op: Scan, node, **kwargs):
|
|
14
14
|
# Note: This implementation is different from the internal PyTensor Scan op.
|
|
15
15
|
# In particular, we don't make use of the provided buffers for recurring outputs (MIT-SOT, SIT-SOT)
|
|
16
16
|
# These buffers include the initial state and enough space to store as many intermediate results as needed.
|
|
@@ -29,7 +29,10 @@ def jax_funcify_Scan(op: Scan, **kwargs):
|
|
|
29
29
|
|
|
30
30
|
# Optimize inner graph (exclude any defalut rewrites that are incompatible with JAX mode)
|
|
31
31
|
rewriter = (
|
|
32
|
-
get_mode(op.mode)
|
|
32
|
+
get_mode(op.mode)
|
|
33
|
+
.including("jax")
|
|
34
|
+
.excluding("numba", *JAX._optimizer.exclude)
|
|
35
|
+
.optimizer
|
|
33
36
|
)
|
|
34
37
|
rewriter(op.fgraph)
|
|
35
38
|
scan_inner_func = jax_funcify(op.fgraph, **kwargs)
|
|
@@ -216,6 +219,8 @@ def jax_funcify_Scan(op: Scan, **kwargs):
|
|
|
216
219
|
if trace.shape[0] > buffer_size:
|
|
217
220
|
# Trace is longer than buffer, keep just the last `buffer.shape[0]` entries
|
|
218
221
|
partial_trace = trace[-buffer_size:]
|
|
222
|
+
elif trace.shape[0] == buffer_size:
|
|
223
|
+
partial_trace = trace
|
|
219
224
|
else:
|
|
220
225
|
# Trace is shorter than buffer, this happens when we keep the initial_state
|
|
221
226
|
if init_state.ndim < buffer.ndim:
|
|
@@ -3,6 +3,7 @@ import warnings
|
|
|
3
3
|
import jax
|
|
4
4
|
|
|
5
5
|
from pytensor.link.jax.dispatch.basic import jax_funcify
|
|
6
|
+
from pytensor.tensor._linalg.solve.linear_control import SolveSylvester
|
|
6
7
|
from pytensor.tensor.slinalg import (
|
|
7
8
|
LU,
|
|
8
9
|
QR,
|
|
@@ -13,6 +14,7 @@ from pytensor.tensor.slinalg import (
|
|
|
13
14
|
Expm,
|
|
14
15
|
LUFactor,
|
|
15
16
|
PivotToPermutations,
|
|
17
|
+
Schur,
|
|
16
18
|
Solve,
|
|
17
19
|
SolveTriangular,
|
|
18
20
|
)
|
|
@@ -92,7 +94,6 @@ def jax_funcify_Solve(op, **kwargs):
|
|
|
92
94
|
def jax_funcify_SolveTriangular(op, **kwargs):
|
|
93
95
|
lower = op.lower
|
|
94
96
|
unit_diagonal = op.unit_diagonal
|
|
95
|
-
check_finite = op.check_finite
|
|
96
97
|
|
|
97
98
|
def solve_triangular(A, b):
|
|
98
99
|
return jax.scipy.linalg.solve_triangular(
|
|
@@ -101,7 +102,7 @@ def jax_funcify_SolveTriangular(op, **kwargs):
|
|
|
101
102
|
lower=lower,
|
|
102
103
|
trans=0, # this is handled by explicitly transposing A, so it will always be 0 when we get to here.
|
|
103
104
|
unit_diagonal=unit_diagonal,
|
|
104
|
-
check_finite=
|
|
105
|
+
check_finite=False,
|
|
105
106
|
)
|
|
106
107
|
|
|
107
108
|
return solve_triangular
|
|
@@ -132,27 +133,23 @@ def jax_funcify_PivotToPermutation(op, **kwargs):
|
|
|
132
133
|
def jax_funcify_LU(op, **kwargs):
|
|
133
134
|
permute_l = op.permute_l
|
|
134
135
|
p_indices = op.p_indices
|
|
135
|
-
check_finite = op.check_finite
|
|
136
136
|
|
|
137
137
|
if p_indices:
|
|
138
138
|
raise ValueError("JAX does not support the p_indices argument")
|
|
139
139
|
|
|
140
140
|
def lu(*inputs):
|
|
141
|
-
return jax.scipy.linalg.lu(
|
|
142
|
-
*inputs, permute_l=permute_l, check_finite=check_finite
|
|
143
|
-
)
|
|
141
|
+
return jax.scipy.linalg.lu(*inputs, permute_l=permute_l, check_finite=False)
|
|
144
142
|
|
|
145
143
|
return lu
|
|
146
144
|
|
|
147
145
|
|
|
148
146
|
@jax_funcify.register(LUFactor)
|
|
149
147
|
def jax_funcify_LUFactor(op, **kwargs):
|
|
150
|
-
check_finite = op.check_finite
|
|
151
148
|
overwrite_a = op.overwrite_a
|
|
152
149
|
|
|
153
150
|
def lu_factor(a):
|
|
154
151
|
return jax.scipy.linalg.lu_factor(
|
|
155
|
-
a, check_finite=
|
|
152
|
+
a, check_finite=False, overwrite_a=overwrite_a
|
|
156
153
|
)
|
|
157
154
|
|
|
158
155
|
return lu_factor
|
|
@@ -161,12 +158,11 @@ def jax_funcify_LUFactor(op, **kwargs):
|
|
|
161
158
|
@jax_funcify.register(CholeskySolve)
|
|
162
159
|
def jax_funcify_ChoSolve(op, **kwargs):
|
|
163
160
|
lower = op.lower
|
|
164
|
-
check_finite = op.check_finite
|
|
165
161
|
overwrite_b = op.overwrite_b
|
|
166
162
|
|
|
167
163
|
def cho_solve(c, b):
|
|
168
164
|
return jax.scipy.linalg.cho_solve(
|
|
169
|
-
(c, lower), b, check_finite=
|
|
165
|
+
(c, lower), b, check_finite=False, overwrite_b=overwrite_b
|
|
170
166
|
)
|
|
171
167
|
|
|
172
168
|
return cho_solve
|
|
@@ -189,3 +185,27 @@ def jax_funcify_Expm(op, **kwargs):
|
|
|
189
185
|
return jax.scipy.linalg.expm(x)
|
|
190
186
|
|
|
191
187
|
return expm
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
@jax_funcify.register(Schur)
|
|
191
|
+
def jax_funcify_Schur(op, **kwargs):
|
|
192
|
+
output = op.output
|
|
193
|
+
|
|
194
|
+
if op.sort is not None:
|
|
195
|
+
warnings.warn(
|
|
196
|
+
"jax.scipy.linalg.schur only supports sort=None. The sort argument is ignored."
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
def schur(a):
|
|
200
|
+
T, Z = jax.scipy.linalg.schur(a, output=output)
|
|
201
|
+
return T, Z
|
|
202
|
+
|
|
203
|
+
return schur
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
@jax_funcify.register(SolveSylvester)
|
|
207
|
+
def jax_funcify_SolveSylsterer(op, **kwargs):
|
|
208
|
+
def solve_sylvester(a, b, c):
|
|
209
|
+
return jax.scipy.linalg.solve_sylvester(a, b, c)
|
|
210
|
+
|
|
211
|
+
return solve_sylvester
|
|
@@ -17,16 +17,15 @@ from pytensor.tensor.basic import (
|
|
|
17
17
|
ScalarFromTensor,
|
|
18
18
|
Split,
|
|
19
19
|
TensorFromScalar,
|
|
20
|
-
Tri,
|
|
21
20
|
get_scalar_constant_value,
|
|
22
21
|
)
|
|
23
22
|
from pytensor.tensor.exceptions import NotScalarConstantError
|
|
24
23
|
from pytensor.tensor.shape import Shape_i
|
|
25
24
|
|
|
26
25
|
|
|
27
|
-
ARANGE_CONCRETE_VALUE_ERROR = """JAX requires the arguments of `jax.numpy.arange`
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
ARANGE_CONCRETE_VALUE_ERROR = """JAX requires the arguments of `jax.numpy.arange` to be constants.
|
|
27
|
+
The graph that you defined thus cannot be JIT-compiled by JAX.
|
|
28
|
+
An example of a graph that can be compiled to JAX:
|
|
30
29
|
>>> import pytensor.tensor as pt
|
|
31
30
|
>>> pt.arange(1, 10, 2)
|
|
32
31
|
"""
|
|
@@ -185,19 +184,3 @@ def jax_funcify_ScalarFromTensor(op, **kwargs):
|
|
|
185
184
|
return jnp.array(x).flatten()[0]
|
|
186
185
|
|
|
187
186
|
return scalar_from_tensor
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
@jax_funcify.register(Tri)
|
|
191
|
-
def jax_funcify_Tri(op, node, **kwargs):
|
|
192
|
-
# node.inputs is N, M, k
|
|
193
|
-
const_args = [getattr(x, "data", None) for x in node.inputs]
|
|
194
|
-
|
|
195
|
-
def tri(*args):
|
|
196
|
-
# args is N, M, k
|
|
197
|
-
args = [
|
|
198
|
-
x if const_x is None else const_x
|
|
199
|
-
for x, const_x in zip(args, const_args, strict=True)
|
|
200
|
-
]
|
|
201
|
-
return jnp.tri(*args, dtype=op.dtype)
|
|
202
|
-
|
|
203
|
-
return tri
|
|
@@ -13,7 +13,6 @@ from pytensor.tensor.basic import (
|
|
|
13
13
|
ScalarFromTensor,
|
|
14
14
|
Split,
|
|
15
15
|
TensorFromScalar,
|
|
16
|
-
Tri,
|
|
17
16
|
get_scalar_constant_value,
|
|
18
17
|
)
|
|
19
18
|
from pytensor.tensor.exceptions import NotScalarConstantError
|
|
@@ -219,23 +218,6 @@ def mlx_funcify_ScalarFromTensor(op, **kwargs):
|
|
|
219
218
|
return scalar_from_tensor
|
|
220
219
|
|
|
221
220
|
|
|
222
|
-
@mlx_funcify.register(Tri)
|
|
223
|
-
def mlx_funcify_Tri(op, node, **kwargs):
|
|
224
|
-
# node.inputs -> N, M, k
|
|
225
|
-
const_args = [getattr(inp, "data", None) for inp in node.inputs]
|
|
226
|
-
dtype = convert_dtype_to_mlx(op.dtype)
|
|
227
|
-
|
|
228
|
-
def tri(*args):
|
|
229
|
-
# Replace args with compile-time constants when available
|
|
230
|
-
args = [
|
|
231
|
-
arg if const_a is None else const_a
|
|
232
|
-
for arg, const_a in zip(args, const_args, strict=True)
|
|
233
|
-
]
|
|
234
|
-
return mx.tri(*args, dtype=dtype)
|
|
235
|
-
|
|
236
|
-
return tri
|
|
237
|
-
|
|
238
|
-
|
|
239
221
|
@mlx_funcify.register(AllocEmpty)
|
|
240
222
|
def mlx_funcify_AllocEmpty(op, node, **kwargs):
|
|
241
223
|
dtype = convert_dtype_to_mlx(op.dtype)
|
|
@@ -5,6 +5,9 @@ from tempfile import NamedTemporaryFile
|
|
|
5
5
|
from typing import Any
|
|
6
6
|
from weakref import WeakKeyDictionary
|
|
7
7
|
|
|
8
|
+
import numba
|
|
9
|
+
from llvmlite import ir
|
|
10
|
+
from numba.core import cgutils
|
|
8
11
|
from numba.core.caching import CacheImpl, _CacheLocator
|
|
9
12
|
|
|
10
13
|
from pytensor.configdefaults import config
|
|
@@ -127,3 +130,49 @@ def compile_numba_function_src(
|
|
|
127
130
|
CACHED_SRC_FUNCTIONS[res] = cache_key
|
|
128
131
|
|
|
129
132
|
return res # type: ignore
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
@numba.extending.intrinsic(prefer_literal=True)
|
|
136
|
+
def _call_cached_ptr(typingctx, get_ptr_func, func_type_ref, unique_func_name_lit):
|
|
137
|
+
"""
|
|
138
|
+
Enable caching of function pointers returned by `get_ptr_func`.
|
|
139
|
+
|
|
140
|
+
When one of our Numba-dispatched functions depends on a pointer to a compiled function function (e.g. when we call
|
|
141
|
+
cython_lapack routines), numba will refuse to cache the function, because the pointer may change between runs.
|
|
142
|
+
|
|
143
|
+
This intrinsic allows us to cache the pointer ourselves, by storing it in a global variable keyed by a literal
|
|
144
|
+
`unique_func_name_lit`. The first time the intrinsic is called, it will call `get_ptr_func` to get the pointer, store it
|
|
145
|
+
in the global variable, and return it. Subsequent calls will load the pointer from the global variable.
|
|
146
|
+
"""
|
|
147
|
+
func_type = func_type_ref.instance_type
|
|
148
|
+
cache_key = unique_func_name_lit.literal_value
|
|
149
|
+
|
|
150
|
+
def codegen(context, builder, signature, args):
|
|
151
|
+
ptr_ty = ir.PointerType(ir.IntType(8))
|
|
152
|
+
null = ptr_ty(None)
|
|
153
|
+
align = 64
|
|
154
|
+
|
|
155
|
+
mod = builder.module
|
|
156
|
+
var = cgutils.add_global_variable(mod, ptr_ty, f"_ptr_cache_{cache_key}")
|
|
157
|
+
var.align = align
|
|
158
|
+
var.linkage = "private"
|
|
159
|
+
var.initializer = null
|
|
160
|
+
|
|
161
|
+
var_val = builder.load_atomic(var, "acquire", align)
|
|
162
|
+
result_ptr = cgutils.alloca_once_value(builder, var_val)
|
|
163
|
+
|
|
164
|
+
with builder.if_then(builder.icmp_signed("==", var_val, null), likely=False):
|
|
165
|
+
sig = typingctx.resolve_function_type(get_ptr_func, [], {})
|
|
166
|
+
f = context.get_function(get_ptr_func, sig)
|
|
167
|
+
new_ptr = f(builder, [])
|
|
168
|
+
new_ptr = builder.inttoptr(new_ptr, ptr_ty)
|
|
169
|
+
builder.store_atomic(new_ptr, var, "release", align)
|
|
170
|
+
builder.store(new_ptr, result_ptr)
|
|
171
|
+
|
|
172
|
+
sfunc = cgutils.create_struct_proxy(func_type)(context, builder)
|
|
173
|
+
sfunc.c_addr = builder.load(result_ptr)
|
|
174
|
+
|
|
175
|
+
return sfunc._getvalue()
|
|
176
|
+
|
|
177
|
+
sig = func_type(get_ptr_func, func_type_ref, unique_func_name_lit)
|
|
178
|
+
return sig, codegen
|
|
@@ -14,14 +14,13 @@ from pytensor.graph.basic import Apply, Constant, Variable
|
|
|
14
14
|
from pytensor.graph.fg import FunctionGraph
|
|
15
15
|
from pytensor.graph.type import Type
|
|
16
16
|
from pytensor.link.numba.cache import compile_numba_function_src, hash_from_pickle_dump
|
|
17
|
-
from pytensor.link.numba.dispatch.sparse import CSCMatrixType, CSRMatrixType
|
|
18
17
|
from pytensor.link.utils import (
|
|
19
18
|
fgraph_to_python,
|
|
20
19
|
)
|
|
21
20
|
from pytensor.scalar.basic import ScalarType
|
|
22
21
|
from pytensor.sparse import SparseTensorType
|
|
23
22
|
from pytensor.tensor.random.type import RandomGeneratorType
|
|
24
|
-
from pytensor.tensor.type import
|
|
23
|
+
from pytensor.tensor.type import DenseTensorType
|
|
25
24
|
from pytensor.tensor.utils import hash_from_ndarray
|
|
26
25
|
from pytensor.typed_list import TypedListType
|
|
27
26
|
|
|
@@ -112,7 +111,7 @@ def get_numba_type(
|
|
|
112
111
|
Return Numba scalars for zero dimensional :class:`TensorType`\s.
|
|
113
112
|
"""
|
|
114
113
|
|
|
115
|
-
if isinstance(pytensor_type,
|
|
114
|
+
if isinstance(pytensor_type, DenseTensorType):
|
|
116
115
|
dtype = pytensor_type.numpy_dtype
|
|
117
116
|
numba_dtype = numba.from_dtype(dtype)
|
|
118
117
|
if force_scalar or (
|
|
@@ -125,18 +124,26 @@ def get_numba_type(
|
|
|
125
124
|
numba_dtype = numba.from_dtype(dtype)
|
|
126
125
|
return numba_dtype
|
|
127
126
|
elif isinstance(pytensor_type, SparseTensorType):
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
from pytensor.link.numba.dispatch.sparse.variable import (
|
|
128
|
+
CSCMatrixType,
|
|
129
|
+
CSRMatrixType,
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
data_array = numba.types.Array(
|
|
133
|
+
numba.from_dtype(pytensor_type.numpy_dtype), 1, layout
|
|
134
|
+
)
|
|
135
|
+
indices_array = numba.types.Array(numba.from_dtype(np.int32), 1, layout)
|
|
136
|
+
indptr_array = numba.types.Array(numba.from_dtype(np.int32), 1, layout)
|
|
130
137
|
if pytensor_type.format == "csr":
|
|
131
|
-
return CSRMatrixType(
|
|
138
|
+
return CSRMatrixType(data_array, indices_array, indptr_array)
|
|
132
139
|
if pytensor_type.format == "csc":
|
|
133
|
-
return CSCMatrixType(
|
|
140
|
+
return CSCMatrixType(data_array, indices_array, indptr_array)
|
|
134
141
|
elif isinstance(pytensor_type, RandomGeneratorType):
|
|
135
142
|
return numba.types.NumPyRandomGeneratorType("NumPyRandomGeneratorType")
|
|
136
143
|
elif isinstance(pytensor_type, TypedListType):
|
|
137
144
|
return numba.types.List(get_numba_type(pytensor_type.ttype))
|
|
138
|
-
|
|
139
|
-
|
|
145
|
+
|
|
146
|
+
raise NotImplementedError(f"Numba type not implemented for {pytensor_type}")
|
|
140
147
|
|
|
141
148
|
|
|
142
149
|
def create_numba_signature(
|
|
@@ -171,40 +178,6 @@ def create_numba_signature(
|
|
|
171
178
|
return numba.types.void(*input_types)
|
|
172
179
|
|
|
173
180
|
|
|
174
|
-
def create_tuple_creator(f, n):
|
|
175
|
-
"""Construct a compile-time ``tuple``-comprehension-like loop.
|
|
176
|
-
|
|
177
|
-
See https://github.com/numba/numba/issues/2771#issuecomment-414358902
|
|
178
|
-
"""
|
|
179
|
-
warnings.warn(
|
|
180
|
-
"create_tuple_creator is deprecated and will be removed in a future release",
|
|
181
|
-
FutureWarning,
|
|
182
|
-
)
|
|
183
|
-
|
|
184
|
-
assert n > 0
|
|
185
|
-
|
|
186
|
-
f = numba_njit(f)
|
|
187
|
-
|
|
188
|
-
@numba_njit
|
|
189
|
-
def creator(args):
|
|
190
|
-
return (f(0, *args),)
|
|
191
|
-
|
|
192
|
-
for i in range(1, n):
|
|
193
|
-
|
|
194
|
-
@numba_njit
|
|
195
|
-
def creator(args, creator=creator, i=i):
|
|
196
|
-
return (*creator(args), f(i, *args))
|
|
197
|
-
|
|
198
|
-
return numba_njit(lambda *args: creator(args))
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
def create_tuple_string(x):
|
|
202
|
-
if len(x) == 1:
|
|
203
|
-
return f"({x[0]},)"
|
|
204
|
-
else:
|
|
205
|
-
return f"({', '.join(x)})"
|
|
206
|
-
|
|
207
|
-
|
|
208
181
|
@numba.extending.intrinsic
|
|
209
182
|
def direct_cast(typingctx, val, typ):
|
|
210
183
|
if isinstance(typ, numba.types.TypeRef):
|
|
@@ -86,6 +86,7 @@ def numba_funcify_Blockwise(op: BlockwiseWithCoreShape, node, **kwargs):
|
|
|
86
86
|
output_bc_patterns,
|
|
87
87
|
output_dtypes,
|
|
88
88
|
inplace_pattern,
|
|
89
|
+
False, # allow_core_scalar
|
|
89
90
|
(), # constant_inputs
|
|
90
91
|
inputs,
|
|
91
92
|
tuple_core_shapes,
|
|
@@ -98,6 +99,7 @@ def numba_funcify_Blockwise(op: BlockwiseWithCoreShape, node, **kwargs):
|
|
|
98
99
|
# If the core op cannot be cached, the Blockwise wrapper cannot be cached either
|
|
99
100
|
blockwise_key = None
|
|
100
101
|
else:
|
|
102
|
+
blockwise_cache_version = 1
|
|
101
103
|
blockwise_key = "_".join(
|
|
102
104
|
map(
|
|
103
105
|
str,
|
|
@@ -108,6 +110,7 @@ def numba_funcify_Blockwise(op: BlockwiseWithCoreShape, node, **kwargs):
|
|
|
108
110
|
blockwise_op.signature,
|
|
109
111
|
input_bc_patterns,
|
|
110
112
|
core_op_key,
|
|
113
|
+
blockwise_cache_version,
|
|
111
114
|
),
|
|
112
115
|
)
|
|
113
116
|
)
|
|
@@ -68,7 +68,7 @@ def numba_funcify_OpFromGraph(op, node=None, **kwargs):
|
|
|
68
68
|
output_specs = [Out(o, borrow=False) for o in fgraph.outputs]
|
|
69
69
|
insert_deepcopy(fgraph, wrapped_inputs=input_specs, wrapped_outputs=output_specs)
|
|
70
70
|
fgraph_fn, fgraph_cache_key = numba_funcify_and_cache_key(
|
|
71
|
-
fgraph, squeeze_output=True, **kwargs
|
|
71
|
+
fgraph, squeeze_output=True, fgraph_name="numba_ofg", **kwargs
|
|
72
72
|
)
|
|
73
73
|
|
|
74
74
|
if fgraph_cache_key is None:
|
|
@@ -14,11 +14,11 @@ from pytensor.link.numba.cache import (
|
|
|
14
14
|
)
|
|
15
15
|
from pytensor.link.numba.dispatch import basic as numba_basic
|
|
16
16
|
from pytensor.link.numba.dispatch.basic import (
|
|
17
|
-
create_tuple_string,
|
|
18
17
|
numba_funcify_and_cache_key,
|
|
19
18
|
register_funcify_and_cache_key,
|
|
20
19
|
register_funcify_default_op_cache_key,
|
|
21
20
|
)
|
|
21
|
+
from pytensor.link.numba.dispatch.string_codegen import create_tuple_string
|
|
22
22
|
from pytensor.link.numba.dispatch.vectorize_codegen import (
|
|
23
23
|
_vectorized,
|
|
24
24
|
encode_literals,
|
|
@@ -365,6 +365,7 @@ def numba_funcify_Elemwise(op, node, **kwargs):
|
|
|
365
365
|
output_bc_patterns_enc,
|
|
366
366
|
output_dtypes_enc,
|
|
367
367
|
inplace_pattern_enc,
|
|
368
|
+
True, # allow_core_scalar
|
|
368
369
|
(), # constant_inputs
|
|
369
370
|
inputs,
|
|
370
371
|
core_output_shapes, # core_shapes
|
|
@@ -466,6 +467,16 @@ def numba_funcify_DimShuffle(op: DimShuffle, node, **kwargs):
|
|
|
466
467
|
|
|
467
468
|
return squeeze_to_0d
|
|
468
469
|
|
|
470
|
+
elif op.input_ndim == 0:
|
|
471
|
+
# DimShuffle can only be an expand_dims or a no_op
|
|
472
|
+
# This branch uses asarray in case we get a scalar due to https://github.com/numba/numba/issues/10358
|
|
473
|
+
new_shape = shape_template
|
|
474
|
+
new_strides = strides_template
|
|
475
|
+
|
|
476
|
+
@numba_basic.numba_njit
|
|
477
|
+
def dimshuffle(x):
|
|
478
|
+
return as_strided(np.asarray(x), shape=new_shape, strides=new_strides)
|
|
479
|
+
|
|
469
480
|
else:
|
|
470
481
|
|
|
471
482
|
@numba_basic.numba_njit
|
|
@@ -490,7 +501,7 @@ def numba_funcify_DimShuffle(op: DimShuffle, node, **kwargs):
|
|
|
490
501
|
|
|
491
502
|
return as_strided(x, shape=new_shape, strides=new_strides)
|
|
492
503
|
|
|
493
|
-
cache_version =
|
|
504
|
+
cache_version = 2
|
|
494
505
|
return dimshuffle, cache_version
|
|
495
506
|
|
|
496
507
|
|