pytensor 2.18.1__tar.gz → 2.18.2__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.18.1 → pytensor-2.18.2}/PKG-INFO +1 -1
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/_version.py +3 -3
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/compile/function/types.py +10 -4
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/compile/profiling.py +4 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/graph/basic.py +5 -1
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/graph/replace.py +14 -13
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/c/cmodule.py +29 -11
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/jax/dispatch/nlinalg.py +1 -3
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/numba/dispatch/basic.py +2 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/basic.py +81 -13
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/blas.py +77 -148
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/blockwise.py +33 -9
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/extra_ops.py +4 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/math.py +16 -2
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/rewriting/basic.py +12 -11
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/rewriting/blas.py +33 -8
- pytensor-2.18.2/pytensor/tensor/rewriting/blockwise.py +201 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/rewriting/linalg.py +10 -3
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/rewriting/math.py +92 -160
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/rewriting/shape.py +16 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/rewriting/subtensor.py +109 -26
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/shape.py +19 -16
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/subtensor.py +17 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor.egg-info/PKG-INFO +1 -1
- {pytensor-2.18.1 → pytensor-2.18.2}/scripts/mypy-failing.txt +0 -1
- pytensor-2.18.1/pytensor/tensor/rewriting/blockwise.py +0 -51
- {pytensor-2.18.1 → pytensor-2.18.2}/LICENSE.txt +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/MANIFEST.in +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/README.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/bin/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/bin/pytensor-cache +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/bin/pytensor_cache.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/.templates/PLACEHOLDER +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/.templates/layout.html +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/LICENSE.txt +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/README.md +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/acknowledgement.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/bcast.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/bcast.svg +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/conf.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/core_development_guide.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/css.inc +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/dev_start_guide.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/environment.yml +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/extending/apply.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/extending/apply.svg +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/extending/apply2.svg +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/extending/creating_a_c_op.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/extending/creating_a_numba_jax_op.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/extending/creating_an_op.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/extending/ctype.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/extending/extending_faq.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/extending/extending_pytensor_solution_1.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/extending/graph_rewriting.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/extending/graphstructures.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/extending/index.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/extending/inplace.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/extending/op.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/extending/other_ops.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/extending/pics/symbolic_graph_opt.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/extending/pics/symbolic_graph_unopt.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/extending/pipeline.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/extending/scan.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/extending/tips.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/extending/type.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/extending/unittest.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/extending/using_params.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/faq.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/generate_dtype_tensor_table.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/glossary.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/images/Elman_srnn.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/images/PyTensor_RGB.svg +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/images/blocksparse.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/images/lstm.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/images/lstm_memorycell.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/images/talk2010.gif +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/images/talk2010.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/index.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/install.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/internal/how_to_release.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/internal/index.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/internal/metadocumentation.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/introduction.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/compile/debugmode.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/compile/function.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/compile/index.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/compile/io.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/compile/mode.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/compile/nanguardmode.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/compile/opfromgraph.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/compile/ops.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/compile/profilemode.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/compile/shared.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/config.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/d3viz/examples/d3viz/css/d3-context-menu.css +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/d3viz/examples/d3viz/css/d3viz.css +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/d3viz/examples/d3viz/js/d3-context-menu.js +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/d3viz/examples/d3viz/js/d3.v3.min.js +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/d3viz/examples/d3viz/js/d3viz.js +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/d3viz/examples/d3viz/js/dagre-d3.min.js +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/d3viz/examples/d3viz/js/graphlib-dot.min.js +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/d3viz/examples/mlp.html +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/d3viz/examples/mlp.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/d3viz/examples/mlp2.html +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/d3viz/examples/mlp2.pdf +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/d3viz/examples/mlp2.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/d3viz/examples/ofg.html +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/d3viz/examples/ofg2.html +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/d3viz/index.ipynb +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/d3viz/index.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/d3viz/index_files/index_10_0.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/d3viz/index_files/index_11_0.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/d3viz/index_files/index_24_0.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/d3viz/index_files/index_25_0.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/gradient.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/graph/features.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/graph/fgraph.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/graph/graph.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/graph/index.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/graph/op.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/graph/type.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/graph/utils.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/index.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/misc/pkl_utils.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/printing.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/sandbox/index.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/sandbox/linalg.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/scalar/index.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/scan.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/sparse/index.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/sparse/sandbox.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/tensor/basic.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/tensor/basic_opt.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/tensor/bcast.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/tensor/bcast.svg +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/tensor/conv.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/tensor/elemwise.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/tensor/extra_ops.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/tensor/fft.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/tensor/index.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/tensor/io.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/tensor/math_opt.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/tensor/nlinalg.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/tensor/plot_fft.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/tensor/random/basic.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/tensor/random/index.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/tensor/random/utils.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/tensor/slinalg.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/tensor/utils.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/library/typed_list.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/links.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/optimizations.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/pylintrc +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/sandbox/ccodegen.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/sandbox/compilation.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/sandbox/debugging_with_stepmode.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/sandbox/elemwise_compiler.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/sandbox/function.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/sandbox/functional.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/sandbox/how_to_make_ops.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/sandbox/index.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/sandbox/index2.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/sandbox/interactive_debugger.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/sandbox/logistic_regression_example.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/sandbox/performance.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/sandbox/randomnumbers.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/sandbox/rethinkccodegen.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/sandbox/sandbox.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/sandbox/software.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/sandbox/sparse.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/sandbox/tensoroptools.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/scripts/docgen.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/troubleshooting.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/adding.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/adding_solution_1.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/aliasing.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/apply.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/apply.svg +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/bcast.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/broadcasting.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/conditions.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/debug_faq.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/dlogistic.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/examples.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/faq_tutorial.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/gradients.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/index.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/loading_and_saving.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/logistic.gp +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/logistic.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/loop.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/loop_solution_1.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/modes.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/modes_solution_1.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/multi_cores.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/nan_tutorial.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/pics/d3viz.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/pics/logreg_pydotprint_predict.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/pics/logreg_pydotprint_prediction.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/pics/logreg_pydotprint_train.png +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/printing_drawing.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/profiling.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/profiling_example.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/profiling_example_out.prof +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/shape_info.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/sparse.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/tutorial/symbolic_graphs.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/doc/user_guide.rst +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pyproject.toml +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/bin/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/bin/pytensor_cache.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/breakpoint.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/compile/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/compile/builders.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/compile/compiledir.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/compile/compilelock.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/compile/debugmode.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/compile/function/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/compile/function/pfunc.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/compile/io.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/compile/mode.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/compile/monitormode.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/compile/nanguardmode.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/compile/ops.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/compile/sharedvalue.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/configdefaults.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/configparser.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/d3viz/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/d3viz/css/d3-context-menu.css +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/d3viz/css/d3viz.css +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/d3viz/d3viz.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/d3viz/formatting.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/d3viz/js/d3-context-menu.js +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/d3viz/js/d3.v3.min.js +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/d3viz/js/d3viz.js +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/d3viz/js/dagre-d3.min.js +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/d3viz/js/graphlib-dot.min.js +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/gradient.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/graph/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/graph/destroyhandler.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/graph/features.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/graph/fg.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/graph/null_type.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/graph/op.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/graph/rewriting/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/graph/rewriting/basic.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/graph/rewriting/db.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/graph/rewriting/kanren.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/graph/rewriting/unify.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/graph/rewriting/utils.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/graph/type.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/graph/utils.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/ifelse.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/basic.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/c/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/c/basic.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/c/c_code/lazylinker_c.c +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/c/c_code/pytensor_mod_helper.h +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/c/cutils.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/c/cvm.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/c/exceptions.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/c/interface.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/c/lazylinker_c.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/c/op.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/c/params_type.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/c/type.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/jax/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/jax/dispatch/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/jax/dispatch/basic.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/jax/dispatch/blockwise.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/jax/dispatch/elemwise.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/jax/dispatch/extra_ops.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/jax/dispatch/random.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/jax/dispatch/scalar.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/jax/dispatch/scan.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/jax/dispatch/shape.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/jax/dispatch/slinalg.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/jax/dispatch/sparse.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/jax/dispatch/subtensor.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/jax/dispatch/tensor_basic.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/jax/linker.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/numba/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/numba/dispatch/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/numba/dispatch/cython_support.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/numba/dispatch/elemwise.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/numba/dispatch/elemwise_codegen.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/numba/dispatch/extra_ops.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/numba/dispatch/nlinalg.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/numba/dispatch/random.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/numba/dispatch/scalar.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/numba/dispatch/scan.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/numba/dispatch/slinalg.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/numba/dispatch/sparse.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/numba/dispatch/tensor_basic.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/numba/linker.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/utils.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/link/vm.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/misc/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/misc/check_blas.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/misc/check_blas_many.sh +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/misc/check_duplicate_key.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/misc/elemwise_openmp_speedup.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/misc/elemwise_time_test.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/misc/frozendict.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/misc/may_share_memory.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/misc/ordered_set.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/misc/pkl_utils.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/misc/safe_asarray.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/printing.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/py.typed +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/raise_op.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/scalar/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/scalar/basic.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/scalar/c_code/Faddeeva.cc +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/scalar/c_code/Faddeeva.hh +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/scalar/c_code/gamma.c +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/scalar/loop.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/scalar/math.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/scalar/sharedvar.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/scan/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/scan/basic.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/scan/checkpoints.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/scan/op.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/scan/rewriting.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/scan/scan_perform.pyx +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/scan/scan_perform_ext.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/scan/utils.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/scan/views.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/sparse/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/sparse/basic.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/sparse/rewriting.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/sparse/sandbox/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/sparse/sandbox/sp.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/sparse/sandbox/sp2.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/sparse/sharedvar.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/sparse/type.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/sparse/utils.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/blas_c.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/blas_headers.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/blas_scipy.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/c_code/alt_blas_common.h +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/c_code/alt_blas_template.c +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/c_code/dimshuffle.c +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/conv/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/conv/abstract_conv.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/elemwise.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/elemwise_cgen.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/exceptions.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/fft.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/fourier.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/functional.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/inplace.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/io.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/linalg.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/nlinalg.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/random/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/random/basic.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/random/op.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/random/rewriting/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/random/rewriting/basic.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/random/rewriting/jax.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/random/type.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/random/utils.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/random/var.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/rewriting/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/rewriting/blas_c.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/rewriting/blas_scipy.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/rewriting/elemwise.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/rewriting/extra_ops.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/rewriting/jax.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/rewriting/special.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/rewriting/uncanonicalize.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/sharedvar.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/slinalg.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/sort.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/special.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/type.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/type_other.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/utils.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/var.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/variable.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/tensor/xlogx.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/typed_list/__init__.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/typed_list/basic.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/typed_list/rewriting.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/typed_list/type.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/updates.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/utils.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor/version.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor.egg-info/SOURCES.txt +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor.egg-info/dependency_links.txt +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor.egg-info/entry_points.txt +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor.egg-info/requires.txt +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/pytensor.egg-info/top_level.txt +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/scripts/downstream_pr.sh +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/scripts/upstream_pr.sh +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/setup.cfg +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/setup.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/tests/link/c/c_code/test_cenum.h +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/tests/link/c/c_code/test_quadratic_function.c +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/tests/tensor/conv/c_code/corr3d_gemm.c +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/tests/tensor/conv/c_code/corr_gemm.c +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/tests/test_breakpoint.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/tests/test_config.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/tests/test_gradient.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/tests/test_ifelse.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/tests/test_printing.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/tests/test_raise_op.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/tests/test_rop.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/tests/test_updates.py +0 -0
- {pytensor-2.18.1 → pytensor-2.18.2}/versioneer.py +0 -0
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2023-
|
|
11
|
+
"date": "2023-12-10T11:56:35+0000",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "2.18.
|
|
14
|
+
"full-revisionid": "68b41a480bc9fed69db7331f60543e94241adbd5",
|
|
15
|
+
"version": "2.18.2"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -1474,7 +1474,7 @@ class FunctionMaker:
|
|
|
1474
1474
|
if getattr(mode, "profile", None):
|
|
1475
1475
|
raise TypeError("profile passed via 'mode'. This isn't supported anymore")
|
|
1476
1476
|
self.profile = profile
|
|
1477
|
-
if profile:
|
|
1477
|
+
if profile and config.cxx:
|
|
1478
1478
|
# This is very important:
|
|
1479
1479
|
# 1) We preload the cache here to not have its timing
|
|
1480
1480
|
# included with the rewrites.
|
|
@@ -1482,7 +1482,12 @@ class FunctionMaker:
|
|
|
1482
1482
|
# too much execution time during testing as we compile
|
|
1483
1483
|
# much more functions then the number of compile c
|
|
1484
1484
|
# module.
|
|
1485
|
+
start_get_cache = time.perf_counter()
|
|
1485
1486
|
pytensor.link.c.basic.get_module_cache().refresh()
|
|
1487
|
+
get_cache_time = time.perf_counter() - start_get_cache
|
|
1488
|
+
self.profile.linker_time += get_cache_time
|
|
1489
|
+
self.profile.preload_cache_time += get_cache_time
|
|
1490
|
+
|
|
1486
1491
|
# Handle the case where inputs and/or outputs is a single
|
|
1487
1492
|
# Variable (not in a list)
|
|
1488
1493
|
unpack_single = False
|
|
@@ -1722,7 +1727,8 @@ def orig_function(
|
|
|
1722
1727
|
|
|
1723
1728
|
"""
|
|
1724
1729
|
|
|
1725
|
-
|
|
1730
|
+
if profile:
|
|
1731
|
+
t1 = time.perf_counter()
|
|
1726
1732
|
mode = pytensor.compile.mode.get_mode(mode)
|
|
1727
1733
|
|
|
1728
1734
|
inputs = list(map(convert_function_input, inputs))
|
|
@@ -1755,8 +1761,8 @@ def orig_function(
|
|
|
1755
1761
|
with config.change_flags(compute_test_value="off"):
|
|
1756
1762
|
fn = m.create(defaults)
|
|
1757
1763
|
finally:
|
|
1758
|
-
|
|
1759
|
-
|
|
1764
|
+
if profile and fn:
|
|
1765
|
+
t2 = time.perf_counter()
|
|
1760
1766
|
profile.compile_time += t2 - t1
|
|
1761
1767
|
# TODO: append
|
|
1762
1768
|
profile.nb_nodes = len(fn.maker.fgraph.apply_nodes)
|
|
@@ -269,6 +269,9 @@ class ProfileStats:
|
|
|
269
269
|
linker_time: float = 0.0
|
|
270
270
|
# time spent linking graph (FunctionMaker.create)
|
|
271
271
|
|
|
272
|
+
preload_cache_time: float = 0.0
|
|
273
|
+
# time spent preloading the cache, so it does not affect rewrites profiling
|
|
274
|
+
|
|
272
275
|
import_time: float = 0.0
|
|
273
276
|
# time spent in importing compiled python module.
|
|
274
277
|
|
|
@@ -811,6 +814,7 @@ class ProfileStats:
|
|
|
811
814
|
),
|
|
812
815
|
file=file,
|
|
813
816
|
)
|
|
817
|
+
print(f" C-cache preloading {self.preload_cache_time:e}s", file=file)
|
|
814
818
|
print(f" Import time {self.import_time:e}s", file=file)
|
|
815
819
|
print(
|
|
816
820
|
f" Node make_thunk time {self.linker_node_make_thunks:e}s", file=file
|
|
@@ -1777,6 +1777,7 @@ def equal_computations(
|
|
|
1777
1777
|
ys: list[Union[np.ndarray, Variable]],
|
|
1778
1778
|
in_xs: Optional[list[Variable]] = None,
|
|
1779
1779
|
in_ys: Optional[list[Variable]] = None,
|
|
1780
|
+
strict_dtype=True,
|
|
1780
1781
|
) -> bool:
|
|
1781
1782
|
"""Checks if PyTensor graphs represent the same computations.
|
|
1782
1783
|
|
|
@@ -1908,7 +1909,10 @@ def equal_computations(
|
|
|
1908
1909
|
if dx != dy:
|
|
1909
1910
|
if isinstance(dx, Constant) and isinstance(dy, Constant):
|
|
1910
1911
|
if not dx.equals(dy):
|
|
1911
|
-
|
|
1912
|
+
if strict_dtype:
|
|
1913
|
+
return False
|
|
1914
|
+
elif not np.array_equal(dx.data, dy.data):
|
|
1915
|
+
return False
|
|
1912
1916
|
else:
|
|
1913
1917
|
return False
|
|
1914
1918
|
|
|
@@ -3,7 +3,13 @@ from collections.abc import Iterable, Mapping, Sequence
|
|
|
3
3
|
from functools import partial, singledispatch
|
|
4
4
|
from typing import Optional, Union, cast, overload
|
|
5
5
|
|
|
6
|
-
from pytensor.graph.basic import
|
|
6
|
+
from pytensor.graph.basic import (
|
|
7
|
+
Apply,
|
|
8
|
+
Constant,
|
|
9
|
+
Variable,
|
|
10
|
+
io_toposort,
|
|
11
|
+
truncated_graph_inputs,
|
|
12
|
+
)
|
|
7
13
|
from pytensor.graph.fg import FunctionGraph
|
|
8
14
|
from pytensor.graph.op import Op
|
|
9
15
|
|
|
@@ -295,19 +301,14 @@ def vectorize_graph(
|
|
|
295
301
|
inputs = truncated_graph_inputs(seq_outputs, ancestors_to_include=replace.keys())
|
|
296
302
|
new_inputs = [replace.get(inp, inp) for inp in inputs]
|
|
297
303
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
304
|
+
vect_vars = dict(zip(inputs, new_inputs))
|
|
305
|
+
for node in io_toposort(inputs, seq_outputs):
|
|
306
|
+
vect_inputs = [vect_vars.get(inp, inp) for inp in node.inputs]
|
|
307
|
+
vect_node = vectorize_node(node, *vect_inputs)
|
|
308
|
+
for output, vect_output in zip(node.outputs, vect_node.outputs):
|
|
309
|
+
vect_vars[output] = vect_output
|
|
301
310
|
|
|
302
|
-
|
|
303
|
-
batched_inputs = [transform(inp) for inp in node.inputs]
|
|
304
|
-
batched_node = vectorize_node(node, *batched_inputs)
|
|
305
|
-
batched_var = batched_node.outputs[var.owner.outputs.index(var)]
|
|
306
|
-
|
|
307
|
-
return cast(Variable, batched_var)
|
|
308
|
-
|
|
309
|
-
# TODO: MergeOptimization or node caching?
|
|
310
|
-
seq_vect_outputs = [transform(out) for out in seq_outputs]
|
|
311
|
+
seq_vect_outputs = [vect_vars[out] for out in seq_outputs]
|
|
311
312
|
|
|
312
313
|
if isinstance(outputs, Sequence):
|
|
313
314
|
return seq_vect_outputs
|
|
@@ -2718,6 +2718,7 @@ def default_blas_ldflags():
|
|
|
2718
2718
|
found = True
|
|
2719
2719
|
break
|
|
2720
2720
|
if not found:
|
|
2721
|
+
_logger.debug("Required file '%s' not found", req)
|
|
2721
2722
|
raise RuntimeError(f"Required file {req} not found")
|
|
2722
2723
|
return libs
|
|
2723
2724
|
|
|
@@ -2779,9 +2780,15 @@ def default_blas_ldflags():
|
|
|
2779
2780
|
res = try_blas_flag(flags)
|
|
2780
2781
|
if res:
|
|
2781
2782
|
if any("mkl" in flag for flag in flags):
|
|
2782
|
-
|
|
2783
|
+
try:
|
|
2784
|
+
check_mkl_openmp()
|
|
2785
|
+
except Exception as e:
|
|
2786
|
+
_logger.debug(e)
|
|
2787
|
+
_logger.debug("The following blas flags will be used: '%s'", res)
|
|
2783
2788
|
return res
|
|
2784
2789
|
else:
|
|
2790
|
+
_logger.debug(f"Supplied flags {res} failed to compile")
|
|
2791
|
+
_logger.debug("Supplied flags '%s' failed to compile", res)
|
|
2785
2792
|
raise RuntimeError(f"Supplied flags {flags} failed to compile")
|
|
2786
2793
|
|
|
2787
2794
|
# If no compiler is available we default to empty ldflags
|
|
@@ -2802,6 +2809,11 @@ def default_blas_ldflags():
|
|
|
2802
2809
|
# directory. We will include both in our searched library dirs
|
|
2803
2810
|
searched_library_dirs.append(os.path.join(sys.prefix, "Library", "bin"))
|
|
2804
2811
|
searched_library_dirs.append(os.path.join(sys.prefix, "Library", "lib"))
|
|
2812
|
+
search_dirs = "\n".join(searched_library_dirs)
|
|
2813
|
+
_logger.debug(
|
|
2814
|
+
"Will search for BLAS libraries in the following directories:\n%s",
|
|
2815
|
+
search_dirs,
|
|
2816
|
+
)
|
|
2805
2817
|
all_libs = [
|
|
2806
2818
|
l
|
|
2807
2819
|
for path in [
|
|
@@ -2817,6 +2829,7 @@ def default_blas_ldflags():
|
|
|
2817
2829
|
maybe_add_to_os_environ_pathlist("PATH", rpath)
|
|
2818
2830
|
try:
|
|
2819
2831
|
# 1. Try to use MKL with INTEL OpenMP threading
|
|
2832
|
+
_logger.debug("Checking MKL flags with intel threading")
|
|
2820
2833
|
return check_libs(
|
|
2821
2834
|
all_libs,
|
|
2822
2835
|
required_libs=[
|
|
@@ -2829,19 +2842,21 @@ def default_blas_ldflags():
|
|
|
2829
2842
|
extra_compile_flags=[f"-Wl,-rpath,{rpath}"] if rpath is not None else [],
|
|
2830
2843
|
cxx_library_dirs=cxx_library_dirs,
|
|
2831
2844
|
)
|
|
2832
|
-
except Exception:
|
|
2833
|
-
|
|
2845
|
+
except Exception as e:
|
|
2846
|
+
_logger.debug(e)
|
|
2834
2847
|
try:
|
|
2835
2848
|
# 2. Try to use MKL with GNU OpenMP threading
|
|
2849
|
+
_logger.debug("Checking MKL flags with GNU OpenMP threading")
|
|
2836
2850
|
return check_libs(
|
|
2837
2851
|
all_libs,
|
|
2838
2852
|
required_libs=["mkl_core", "mkl_rt", "mkl_gnu_thread", "gomp", "pthread"],
|
|
2839
2853
|
extra_compile_flags=[f"-Wl,-rpath,{rpath}"] if rpath is not None else [],
|
|
2840
2854
|
cxx_library_dirs=cxx_library_dirs,
|
|
2841
2855
|
)
|
|
2842
|
-
except Exception:
|
|
2843
|
-
|
|
2856
|
+
except Exception as e:
|
|
2857
|
+
_logger.debug(e)
|
|
2844
2858
|
try:
|
|
2859
|
+
_logger.debug("Checking Lapack + blas")
|
|
2845
2860
|
# 3. Try to use LAPACK + BLAS
|
|
2846
2861
|
return check_libs(
|
|
2847
2862
|
all_libs,
|
|
@@ -2849,20 +2864,22 @@ def default_blas_ldflags():
|
|
|
2849
2864
|
extra_compile_flags=[f"-Wl,-rpath,{rpath}"] if rpath is not None else [],
|
|
2850
2865
|
cxx_library_dirs=cxx_library_dirs,
|
|
2851
2866
|
)
|
|
2852
|
-
except Exception:
|
|
2853
|
-
|
|
2867
|
+
except Exception as e:
|
|
2868
|
+
_logger.debug(e)
|
|
2854
2869
|
try:
|
|
2855
2870
|
# 4. Try to use BLAS alone
|
|
2871
|
+
_logger.debug("Checking blas alone")
|
|
2856
2872
|
return check_libs(
|
|
2857
2873
|
all_libs,
|
|
2858
2874
|
required_libs=["blas", "cblas"],
|
|
2859
2875
|
extra_compile_flags=[f"-Wl,-rpath,{rpath}"] if rpath is not None else [],
|
|
2860
2876
|
cxx_library_dirs=cxx_library_dirs,
|
|
2861
2877
|
)
|
|
2862
|
-
except Exception:
|
|
2863
|
-
|
|
2878
|
+
except Exception as e:
|
|
2879
|
+
_logger.debug(e)
|
|
2864
2880
|
try:
|
|
2865
2881
|
# 5. Try to use openblas
|
|
2882
|
+
_logger.debug("Checking openblas")
|
|
2866
2883
|
return check_libs(
|
|
2867
2884
|
all_libs,
|
|
2868
2885
|
required_libs=["openblas", "gfortran", "gomp", "m"],
|
|
@@ -2871,8 +2888,9 @@ def default_blas_ldflags():
|
|
|
2871
2888
|
else ["-fopenmp"],
|
|
2872
2889
|
cxx_library_dirs=cxx_library_dirs,
|
|
2873
2890
|
)
|
|
2874
|
-
except Exception:
|
|
2875
|
-
|
|
2891
|
+
except Exception as e:
|
|
2892
|
+
_logger.debug(e)
|
|
2893
|
+
_logger.debug("Failed to identify blas ldflags. Will leave them empty.")
|
|
2876
2894
|
return ""
|
|
2877
2895
|
|
|
2878
2896
|
|
|
@@ -99,9 +99,7 @@ def jax_funcify_BatchedDot(op, **kwargs):
|
|
|
99
99
|
def batched_dot(a, b):
|
|
100
100
|
if a.shape[0] != b.shape[0]:
|
|
101
101
|
raise TypeError("Shapes must match in the 0-th dimension")
|
|
102
|
-
|
|
103
|
-
return jnp.einsum("n...j,nj...->n...", a, b)
|
|
104
|
-
return jnp.einsum("nij,njk->nik", a, b)
|
|
102
|
+
return jnp.matmul(a, b)
|
|
105
103
|
|
|
106
104
|
return batched_dot
|
|
107
105
|
|
|
@@ -895,6 +895,8 @@ def numba_funcify_BatchedDot(op, node, **kwargs):
|
|
|
895
895
|
|
|
896
896
|
@numba_njit
|
|
897
897
|
def batched_dot(x, y):
|
|
898
|
+
# Numba does not support 3D matmul
|
|
899
|
+
# https://github.com/numba/numba/issues/3804
|
|
898
900
|
shape = x.shape[:-1] + y.shape[2:]
|
|
899
901
|
z0 = np.empty(shape, dtype=dtype)
|
|
900
902
|
for i in range(z0.shape[0]):
|
|
@@ -22,10 +22,12 @@ import pytensor.scalar.sharedvar
|
|
|
22
22
|
from pytensor import compile, config, printing
|
|
23
23
|
from pytensor import scalar as aes
|
|
24
24
|
from pytensor.gradient import DisconnectedType, grad_undefined
|
|
25
|
+
from pytensor.graph import RewriteDatabaseQuery
|
|
25
26
|
from pytensor.graph.basic import Apply, Constant, Variable
|
|
26
27
|
from pytensor.graph.fg import FunctionGraph
|
|
27
28
|
from pytensor.graph.op import Op
|
|
28
|
-
from pytensor.graph.
|
|
29
|
+
from pytensor.graph.replace import _vectorize_node
|
|
30
|
+
from pytensor.graph.rewriting.db import EquilibriumDB
|
|
29
31
|
from pytensor.graph.type import HasShape, Type
|
|
30
32
|
from pytensor.link.c.op import COp
|
|
31
33
|
from pytensor.link.c.params_type import ParamsType
|
|
@@ -40,6 +42,7 @@ from pytensor.tensor import (
|
|
|
40
42
|
as_tensor_variable,
|
|
41
43
|
get_vector_length,
|
|
42
44
|
)
|
|
45
|
+
from pytensor.tensor.blockwise import Blockwise
|
|
43
46
|
from pytensor.tensor.elemwise import DimShuffle, Elemwise, scalar_elemwise
|
|
44
47
|
from pytensor.tensor.exceptions import NotScalarConstantError
|
|
45
48
|
from pytensor.tensor.shape import (
|
|
@@ -1356,6 +1359,45 @@ def identity_like(x, dtype: Optional[Union[str, np.generic, np.dtype]] = None):
|
|
|
1356
1359
|
return eye(_x.shape[0], _x.shape[1], k=0, dtype=dtype)
|
|
1357
1360
|
|
|
1358
1361
|
|
|
1362
|
+
class CachedEquilibrimDB(EquilibriumDB):
|
|
1363
|
+
"""A subclass of EquilibriumDB that allows caching of a default query for faster reuse."""
|
|
1364
|
+
|
|
1365
|
+
def __init__(self, default_query):
|
|
1366
|
+
super().__init__()
|
|
1367
|
+
self._default_query = default_query
|
|
1368
|
+
self._cached_default_query = None
|
|
1369
|
+
|
|
1370
|
+
def register(self, *args, **kwargs):
|
|
1371
|
+
# If new rewrites are registered, the default cached query is void
|
|
1372
|
+
self.cached_default_query = None
|
|
1373
|
+
super().register(*args, **kwargs)
|
|
1374
|
+
|
|
1375
|
+
@property
|
|
1376
|
+
def default_query(self):
|
|
1377
|
+
if self._cached_default_query is None:
|
|
1378
|
+
self._cached_default_query = self.query(self._default_query)
|
|
1379
|
+
return self._cached_default_query
|
|
1380
|
+
|
|
1381
|
+
|
|
1382
|
+
infer_shape_db = CachedEquilibrimDB(
|
|
1383
|
+
default_query=RewriteDatabaseQuery(include=("infer_shape",))
|
|
1384
|
+
)
|
|
1385
|
+
|
|
1386
|
+
|
|
1387
|
+
def register_infer_shape(rewrite, *tags, **kwargs):
|
|
1388
|
+
if isinstance(rewrite, str):
|
|
1389
|
+
|
|
1390
|
+
def register(inner_lopt):
|
|
1391
|
+
return register_infer_shape(inner_lopt, rewrite, *tags, **kwargs)
|
|
1392
|
+
|
|
1393
|
+
return register
|
|
1394
|
+
else:
|
|
1395
|
+
name = kwargs.pop("name", None) or rewrite.__name__
|
|
1396
|
+
|
|
1397
|
+
infer_shape_db.register(name, rewrite, *tags, "infer_shape", **kwargs)
|
|
1398
|
+
return rewrite
|
|
1399
|
+
|
|
1400
|
+
|
|
1359
1401
|
def infer_static_shape(
|
|
1360
1402
|
shape: Union[Variable, Sequence[Union[Variable, int]]]
|
|
1361
1403
|
) -> tuple[Sequence["TensorLike"], Sequence[Optional[int]]]:
|
|
@@ -1390,14 +1432,16 @@ def infer_static_shape(
|
|
|
1390
1432
|
|
|
1391
1433
|
raise TypeError(f"Shapes must be scalar integers; got {s_as_str}")
|
|
1392
1434
|
|
|
1393
|
-
sh = [check_type(as_tensor_variable(s, ndim=0)) for s in shape]
|
|
1435
|
+
sh = folded_shape = [check_type(as_tensor_variable(s, ndim=0)) for s in shape]
|
|
1436
|
+
|
|
1437
|
+
if not all(isinstance(s, Constant) for s in folded_shape):
|
|
1438
|
+
shape_fg = FunctionGraph(outputs=sh, features=[ShapeFeature()], clone=True)
|
|
1439
|
+
with config.change_flags(optdb__max_use_ratio=10, cxx=""):
|
|
1440
|
+
infer_shape_db.default_query.rewrite(shape_fg)
|
|
1441
|
+
if not all(isinstance(s, Constant) for s in shape_fg.outputs):
|
|
1442
|
+
topo_constant_folding.rewrite(shape_fg)
|
|
1443
|
+
folded_shape = shape_fg.outputs
|
|
1394
1444
|
|
|
1395
|
-
shape_fg = FunctionGraph(
|
|
1396
|
-
outputs=sh,
|
|
1397
|
-
features=[ShapeFeature()],
|
|
1398
|
-
clone=True,
|
|
1399
|
-
)
|
|
1400
|
-
folded_shape = rewrite_graph(shape_fg, custom_rewrite=topo_constant_folding).outputs
|
|
1401
1445
|
static_shape = tuple(
|
|
1402
1446
|
s.data.item() if isinstance(s, Constant) else None for s in folded_shape
|
|
1403
1447
|
)
|
|
@@ -1615,16 +1659,22 @@ class Alloc(COp):
|
|
|
1615
1659
|
if not clients:
|
|
1616
1660
|
return False
|
|
1617
1661
|
|
|
1618
|
-
for client in clients:
|
|
1619
|
-
if client
|
|
1662
|
+
for client, idx in clients:
|
|
1663
|
+
if client == "output":
|
|
1620
1664
|
# If the output is a constant, it will have to be deepcopied
|
|
1621
1665
|
# each time the function is called. So we do not fold.
|
|
1622
1666
|
return False
|
|
1667
|
+
# Allow alloc to be lifted out of Elemwise before constant folding it
|
|
1668
|
+
elif isinstance(client.op, Elemwise):
|
|
1669
|
+
return None
|
|
1670
|
+
# Same for Blockwise, unless it has no batch_dims
|
|
1671
|
+
elif isinstance(client.op, Blockwise) and client.op.batch_ndim(client):
|
|
1672
|
+
return None
|
|
1623
1673
|
elif (
|
|
1624
1674
|
# The following ops work inplace of their input id 0.
|
|
1625
|
-
|
|
1675
|
+
idx == 0
|
|
1626
1676
|
and isinstance(
|
|
1627
|
-
client
|
|
1677
|
+
client.op,
|
|
1628
1678
|
(
|
|
1629
1679
|
# Ops that will work inplace on the Alloc. So if they
|
|
1630
1680
|
# get constant_folded, they would copy the
|
|
@@ -3455,10 +3505,17 @@ class ExtractDiag(Op):
|
|
|
3455
3505
|
|
|
3456
3506
|
if x.ndim < 2:
|
|
3457
3507
|
raise ValueError("ExtractDiag needs an input with 2 or more dimensions", x)
|
|
3508
|
+
|
|
3509
|
+
out_shape = [
|
|
3510
|
+
st_dim
|
|
3511
|
+
for i, st_dim in enumerate(x.type.shape)
|
|
3512
|
+
if i not in (self.axis1, self.axis2)
|
|
3513
|
+
] + [None]
|
|
3514
|
+
|
|
3458
3515
|
return Apply(
|
|
3459
3516
|
self,
|
|
3460
3517
|
[x],
|
|
3461
|
-
[x.type.clone(dtype=x.dtype, shape=(
|
|
3518
|
+
[x.type.clone(dtype=x.dtype, shape=tuple(out_shape))()],
|
|
3462
3519
|
)
|
|
3463
3520
|
|
|
3464
3521
|
def perform(self, node, inputs, outputs):
|
|
@@ -3559,6 +3616,17 @@ def diagonal(a, offset=0, axis1=0, axis2=1):
|
|
|
3559
3616
|
return ExtractDiag(offset, axis1, axis2)(a)
|
|
3560
3617
|
|
|
3561
3618
|
|
|
3619
|
+
@_vectorize_node.register(ExtractDiag)
|
|
3620
|
+
def vectorize_extract_diag(op: ExtractDiag, node, batched_x):
|
|
3621
|
+
batched_ndims = batched_x.type.ndim - node.inputs[0].type.ndim
|
|
3622
|
+
return diagonal(
|
|
3623
|
+
batched_x,
|
|
3624
|
+
offset=op.offset,
|
|
3625
|
+
axis1=op.axis1 + batched_ndims,
|
|
3626
|
+
axis2=op.axis2 + batched_ndims,
|
|
3627
|
+
).owner
|
|
3628
|
+
|
|
3629
|
+
|
|
3562
3630
|
def trace(a, offset=0, axis1=0, axis2=1):
|
|
3563
3631
|
"""
|
|
3564
3632
|
Returns the sum along diagonals of the array.
|