pytensor 2.23.0__tar.gz → 2.24.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.23.0 → pytensor-2.24.0}/PKG-INFO +4 -4
- {pytensor-2.23.0 → pytensor-2.24.0}/pyproject.toml +4 -5
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/__init__.py +1 -1
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/_version.py +3 -3
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/compile/compiledir.py +5 -8
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/compile/debugmode.py +6 -7
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/compile/function/__init__.py +3 -11
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/compile/function/types.py +22 -19
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/compile/mode.py +15 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/compile/ops.py +1 -1
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/compile/profiling.py +30 -47
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/gradient.py +6 -8
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/graph/basic.py +4 -5
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/graph/destroyhandler.py +12 -16
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/graph/features.py +1 -2
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/graph/fg.py +21 -8
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/graph/null_type.py +1 -1
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/graph/rewriting/basic.py +27 -45
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/graph/rewriting/db.py +2 -2
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/graph/rewriting/unify.py +2 -2
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/graph/utils.py +1 -1
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/ifelse.py +3 -2
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/basic.py +22 -19
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/c/basic.py +15 -17
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/c/cmodule.py +1 -1
- pytensor-2.24.0/pytensor/link/c/exceptions.py +12 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/c/op.py +13 -21
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/c/params_type.py +2 -2
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/c/type.py +1 -1
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/jax/dispatch/__init__.py +1 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/jax/dispatch/nlinalg.py +27 -8
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/jax/dispatch/slinalg.py +24 -1
- pytensor-2.24.0/pytensor/link/jax/dispatch/sort.py +24 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/jax/dispatch/subtensor.py +2 -18
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/jax/dispatch/tensor_basic.py +0 -9
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/numba/dispatch/__init__.py +1 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/numba/dispatch/basic.py +10 -232
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/numba/dispatch/elemwise.py +9 -27
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/numba/dispatch/scan.py +8 -8
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/numba/dispatch/slinalg.py +14 -2
- pytensor-2.24.0/pytensor/link/numba/dispatch/subtensor.py +201 -0
- pytensor-2.24.0/pytensor/link/pytorch/dispatch/__init__.py +7 -0
- pytensor-2.24.0/pytensor/link/pytorch/dispatch/basic.py +91 -0
- pytensor-2.24.0/pytensor/link/pytorch/dispatch/elemwise.py +86 -0
- pytensor-2.24.0/pytensor/link/pytorch/dispatch/scalar.py +40 -0
- pytensor-2.24.0/pytensor/link/pytorch/linker.py +36 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/vm.py +1 -4
- pytensor-2.24.0/pytensor/misc/check_duplicate_key.py +78 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/misc/frozendict.py +0 -9
- pytensor-2.24.0/pytensor/misc/ordered_set.py +44 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/misc/pkl_utils.py +2 -2
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/raise_op.py +2 -2
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/scalar/basic.py +4 -6
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/scalar/math.py +5 -5
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/scan/basic.py +1 -3
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/scan/op.py +5 -6
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/scan/utils.py +3 -3
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/sparse/basic.py +1 -1
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/basic.py +37 -18
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/blockwise.py +1 -2
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/elemwise.py +10 -6
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/math.py +98 -228
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/nlinalg.py +9 -1
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/random/op.py +2 -1
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/random/rewriting/basic.py +76 -78
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/random/type.py +1 -1
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/random/utils.py +3 -1
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/rewriting/elemwise.py +2 -2
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/rewriting/linalg.py +165 -3
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/rewriting/math.py +1 -1
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/rewriting/shape.py +1 -1
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/rewriting/subtensor.py +14 -16
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/rewriting/uncanonicalize.py +2 -21
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/shape.py +27 -4
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/sort.py +47 -124
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/subtensor.py +135 -49
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/type.py +3 -3
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/type_other.py +2 -2
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/variable.py +3 -3
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/typed_list/basic.py +1 -2
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/typed_list/type.py +1 -1
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/updates.py +4 -32
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/utils.py +0 -36
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor.egg-info/PKG-INFO +4 -4
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor.egg-info/SOURCES.txt +7 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor.egg-info/requires.txt +3 -3
- {pytensor-2.23.0 → pytensor-2.24.0}/scripts/mypy-failing.txt +0 -1
- {pytensor-2.23.0 → pytensor-2.24.0}/tests/test_gradient.py +2 -4
- pytensor-2.23.0/pytensor/link/c/exceptions.py +0 -29
- pytensor-2.23.0/pytensor/misc/check_duplicate_key.py +0 -91
- pytensor-2.23.0/pytensor/misc/ordered_set.py +0 -197
- {pytensor-2.23.0 → pytensor-2.24.0}/LICENSE.txt +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/MANIFEST.in +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/README.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/.templates/PLACEHOLDER +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/.templates/layout.html +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/LICENSE.txt +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/README.md +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/acknowledgement.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/bcast.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/bcast.svg +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/conf.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/core_development_guide.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/css.inc +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/dev_start_guide.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/environment.yml +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/extending/apply.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/extending/apply.svg +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/extending/apply2.svg +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/extending/creating_a_c_op.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/extending/creating_a_numba_jax_op.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/extending/creating_an_op.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/extending/ctype.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/extending/extending_faq.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/extending/extending_pytensor_solution_1.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/extending/graph_rewriting.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/extending/graphstructures.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/extending/index.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/extending/inplace.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/extending/op.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/extending/other_ops.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/extending/pics/symbolic_graph_opt.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/extending/pics/symbolic_graph_unopt.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/extending/pipeline.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/extending/scan.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/extending/tips.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/extending/type.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/extending/unittest.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/extending/using_params.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/faq.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/generate_dtype_tensor_table.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/glossary.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/images/Elman_srnn.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/images/PyTensor_RGB.svg +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/images/blocksparse.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/images/lstm.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/images/lstm_memorycell.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/images/talk2010.gif +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/images/talk2010.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/index.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/install.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/internal/how_to_release.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/internal/index.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/internal/metadocumentation.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/introduction.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/compile/debugmode.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/compile/function.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/compile/index.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/compile/io.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/compile/mode.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/compile/nanguardmode.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/compile/opfromgraph.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/compile/ops.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/compile/profilemode.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/compile/shared.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/config.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/d3viz/examples/d3viz/css/d3-context-menu.css +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/d3viz/examples/d3viz/css/d3viz.css +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/d3viz/examples/d3viz/js/d3-context-menu.js +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/d3viz/examples/d3viz/js/d3.v3.min.js +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/d3viz/examples/d3viz/js/d3viz.js +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/d3viz/examples/d3viz/js/dagre-d3.min.js +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/d3viz/examples/d3viz/js/graphlib-dot.min.js +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/d3viz/examples/mlp.html +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/d3viz/examples/mlp.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/d3viz/examples/mlp2.html +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/d3viz/examples/mlp2.pdf +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/d3viz/examples/mlp2.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/d3viz/examples/ofg.html +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/d3viz/examples/ofg2.html +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/d3viz/index.ipynb +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/d3viz/index.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/d3viz/index_files/index_10_0.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/d3viz/index_files/index_11_0.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/d3viz/index_files/index_24_0.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/d3viz/index_files/index_25_0.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/gradient.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/graph/features.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/graph/fgraph.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/graph/graph.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/graph/index.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/graph/op.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/graph/type.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/graph/utils.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/index.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/misc/pkl_utils.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/printing.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/sandbox/index.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/sandbox/linalg.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/scalar/index.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/scan.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/sparse/index.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/sparse/sandbox.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/tensor/basic.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/tensor/basic_opt.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/tensor/bcast.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/tensor/bcast.svg +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/tensor/conv.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/tensor/elemwise.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/tensor/extra_ops.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/tensor/fft.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/tensor/index.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/tensor/io.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/tensor/math_opt.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/tensor/nlinalg.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/tensor/plot_fft.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/tensor/random/basic.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/tensor/random/index.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/tensor/random/utils.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/tensor/slinalg.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/tensor/utils.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/library/typed_list.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/links.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/optimizations.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/pylintrc +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/sandbox/ccodegen.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/sandbox/compilation.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/sandbox/debugging_with_stepmode.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/sandbox/elemwise_compiler.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/sandbox/function.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/sandbox/functional.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/sandbox/how_to_make_ops.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/sandbox/index.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/sandbox/index2.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/sandbox/interactive_debugger.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/sandbox/logistic_regression_example.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/sandbox/performance.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/sandbox/randomnumbers.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/sandbox/rethinkccodegen.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/sandbox/sandbox.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/sandbox/software.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/sandbox/sparse.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/sandbox/tensoroptools.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/troubleshooting.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/adding.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/adding_solution_1.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/aliasing.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/apply.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/apply.svg +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/bcast.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/broadcasting.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/conditions.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/debug_faq.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/dlogistic.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/examples.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/faq_tutorial.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/gradients.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/index.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/loading_and_saving.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/logistic.gp +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/logistic.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/loop.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/loop_solution_1.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/modes.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/modes_solution_1.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/multi_cores.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/nan_tutorial.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/pics/d3viz.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/pics/logreg_pydotprint_predict.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/pics/logreg_pydotprint_prediction.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/pics/logreg_pydotprint_train.png +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/printing_drawing.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/profiling.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/profiling_example.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/profiling_example_out.prof +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/shape_info.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/sparse.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/tutorial/symbolic_graphs.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/doc/user_guide.rst +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/bin/__init__.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/bin/pytensor_cache.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/breakpoint.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/compile/__init__.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/compile/builders.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/compile/compilelock.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/compile/function/pfunc.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/compile/io.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/compile/monitormode.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/compile/nanguardmode.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/compile/sharedvalue.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/configdefaults.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/configparser.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/d3viz/__init__.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/d3viz/css/d3-context-menu.css +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/d3viz/css/d3viz.css +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/d3viz/d3viz.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/d3viz/formatting.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/d3viz/js/d3-context-menu.js +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/d3viz/js/d3.v3.min.js +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/d3viz/js/d3viz.js +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/d3viz/js/dagre-d3.min.js +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/d3viz/js/graphlib-dot.min.js +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/graph/__init__.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/graph/op.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/graph/replace.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/graph/rewriting/__init__.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/graph/rewriting/kanren.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/graph/rewriting/utils.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/graph/type.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/__init__.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/c/__init__.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/c/c_code/lazylinker_c.c +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/c/c_code/pytensor_mod_helper.h +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/c/cutils.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/c/cvm.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/c/interface.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/c/lazylinker_c.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/jax/__init__.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/jax/dispatch/basic.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/jax/dispatch/blockwise.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/jax/dispatch/elemwise.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/jax/dispatch/extra_ops.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/jax/dispatch/random.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/jax/dispatch/scalar.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/jax/dispatch/scan.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/jax/dispatch/shape.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/jax/dispatch/sparse.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/jax/linker.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/numba/__init__.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/numba/dispatch/cython_support.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/numba/dispatch/extra_ops.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/numba/dispatch/nlinalg.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/numba/dispatch/random.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/numba/dispatch/scalar.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/numba/dispatch/sparse.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/numba/dispatch/tensor_basic.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/numba/dispatch/vectorize_codegen.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/numba/linker.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/link/utils.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/misc/__init__.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/misc/check_blas.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/misc/check_blas_many.sh +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/misc/elemwise_openmp_speedup.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/misc/elemwise_time_test.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/misc/may_share_memory.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/misc/safe_asarray.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/printing.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/py.typed +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/scalar/__init__.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/scalar/c_code/Faddeeva.cc +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/scalar/c_code/Faddeeva.hh +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/scalar/c_code/gamma.c +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/scalar/loop.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/scalar/sharedvar.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/scan/__init__.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/scan/checkpoints.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/scan/rewriting.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/scan/scan_perform.pyx +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/scan/scan_perform_ext.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/scan/views.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/sparse/__init__.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/sparse/rewriting.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/sparse/sandbox/__init__.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/sparse/sandbox/sp.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/sparse/sandbox/sp2.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/sparse/sharedvar.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/sparse/type.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/sparse/utils.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/__init__.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/blas.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/blas_c.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/blas_headers.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/blas_scipy.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/c_code/alt_blas_common.h +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/c_code/alt_blas_template.c +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/c_code/dimshuffle.c +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/conv/__init__.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/conv/abstract_conv.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/elemwise_cgen.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/exceptions.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/extra_ops.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/fft.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/fourier.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/functional.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/inplace.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/io.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/linalg.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/random/__init__.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/random/basic.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/random/rewriting/__init__.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/random/rewriting/jax.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/random/rewriting/numba.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/random/var.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/rewriting/__init__.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/rewriting/basic.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/rewriting/blas.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/rewriting/blas_c.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/rewriting/blas_scipy.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/rewriting/blockwise.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/rewriting/extra_ops.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/rewriting/jax.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/rewriting/special.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/sharedvar.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/slinalg.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/special.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/utils.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/var.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/tensor/xlogx.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/typed_list/__init__.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/typed_list/rewriting.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor/version.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor.egg-info/dependency_links.txt +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor.egg-info/entry_points.txt +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/pytensor.egg-info/top_level.txt +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/setup.cfg +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/setup.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/tests/link/c/c_code/test_cenum.h +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/tests/link/c/c_code/test_quadratic_function.c +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/tests/tensor/conv/c_code/corr3d_gemm.c +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/tests/tensor/conv/c_code/corr_gemm.c +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/tests/test_breakpoint.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/tests/test_config.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/tests/test_ifelse.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/tests/test_printing.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/tests/test_raise_op.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/tests/test_rop.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/tests/test_updates.py +0 -0
- {pytensor-2.23.0 → pytensor-2.24.0}/versioneer.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pytensor
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.24.0
|
|
4
4
|
Summary: Optimizing compiler for evaluating mathematical expressions on CPUs and GPUs.
|
|
5
5
|
Author-email: pymc-devs <pymc.devs@gmail.com>
|
|
6
6
|
License: .. _license:
|
|
@@ -72,15 +72,14 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
72
72
|
Requires-Python: <3.13,>=3.10
|
|
73
73
|
Description-Content-Type: text/x-rst
|
|
74
74
|
License-File: LICENSE.txt
|
|
75
|
-
Requires-Dist: setuptools>=
|
|
76
|
-
Requires-Dist: scipy
|
|
75
|
+
Requires-Dist: setuptools>=59.0.0
|
|
76
|
+
Requires-Dist: scipy<1.14,>=0.14
|
|
77
77
|
Requires-Dist: numpy<2,>=1.17.0
|
|
78
78
|
Requires-Dist: filelock
|
|
79
79
|
Requires-Dist: etuples
|
|
80
80
|
Requires-Dist: logical-unification
|
|
81
81
|
Requires-Dist: miniKanren
|
|
82
82
|
Requires-Dist: cons
|
|
83
|
-
Requires-Dist: typing_extensions
|
|
84
83
|
Provides-Extra: complete
|
|
85
84
|
Requires-Dist: pytensor[jax]; extra == "complete"
|
|
86
85
|
Requires-Dist: pytensor[numba]; extra == "complete"
|
|
@@ -106,6 +105,7 @@ Requires-Dist: jax; extra == "jax"
|
|
|
106
105
|
Requires-Dist: jaxlib; extra == "jax"
|
|
107
106
|
Provides-Extra: numba
|
|
108
107
|
Requires-Dist: numba>=0.57; extra == "numba"
|
|
108
|
+
Requires-Dist: llvmlite; extra == "numba"
|
|
109
109
|
|
|
110
110
|
.. image:: https://cdn.rawgit.com/pymc-devs/pytensor/main/doc/images/PyTensor_RGB.svg
|
|
111
111
|
:height: 100px
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[build-system]
|
|
2
2
|
requires = [
|
|
3
|
-
"setuptools>=
|
|
3
|
+
"setuptools>=59.0.0",
|
|
4
4
|
"cython",
|
|
5
5
|
"numpy>=1.17.0",
|
|
6
6
|
"versioneer[toml]>=0.28",
|
|
@@ -46,15 +46,14 @@ keywords = [
|
|
|
46
46
|
"differentiation",
|
|
47
47
|
]
|
|
48
48
|
dependencies = [
|
|
49
|
-
"setuptools>=
|
|
50
|
-
"scipy>=0.14",
|
|
49
|
+
"setuptools>=59.0.0",
|
|
50
|
+
"scipy>=0.14,<1.14",
|
|
51
51
|
"numpy>=1.17.0,<2",
|
|
52
52
|
"filelock",
|
|
53
53
|
"etuples",
|
|
54
54
|
"logical-unification",
|
|
55
55
|
"miniKanren",
|
|
56
56
|
"cons",
|
|
57
|
-
"typing_extensions",
|
|
58
57
|
]
|
|
59
58
|
|
|
60
59
|
[project.urls]
|
|
@@ -79,7 +78,7 @@ tests = [
|
|
|
79
78
|
]
|
|
80
79
|
rtd = ["sphinx>=5.1.0,<6", "pygments", "pydot", "pydot2", "pydot-ng"]
|
|
81
80
|
jax = ["jax", "jaxlib"]
|
|
82
|
-
numba = ["numba>=0.57"]
|
|
81
|
+
numba = ["numba>=0.57", "llvmlite"]
|
|
83
82
|
|
|
84
83
|
[tool.setuptools.packages.find]
|
|
85
84
|
include = ["pytensor*"]
|
|
@@ -108,7 +108,7 @@ def as_symbolic(x: Any, name: str | None = None, **kwargs) -> Variable:
|
|
|
108
108
|
|
|
109
109
|
|
|
110
110
|
@singledispatch
|
|
111
|
-
def _as_symbolic(x, **kwargs) -> Variable:
|
|
111
|
+
def _as_symbolic(x: Any, **kwargs) -> Variable:
|
|
112
112
|
from pytensor.tensor import as_tensor_variable
|
|
113
113
|
|
|
114
114
|
return as_tensor_variable(x, **kwargs)
|
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2024-
|
|
11
|
+
"date": "2024-07-03T14:50:56+0200",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "2.
|
|
14
|
+
"full-revisionid": "df769f6c75d8598de4be08f8053831e39263d96b",
|
|
15
|
+
"version": "2.24.0"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -7,6 +7,7 @@ import logging
|
|
|
7
7
|
import os
|
|
8
8
|
import pickle
|
|
9
9
|
import shutil
|
|
10
|
+
from collections import Counter
|
|
10
11
|
|
|
11
12
|
import numpy as np
|
|
12
13
|
|
|
@@ -111,11 +112,11 @@ def print_compiledir_content():
|
|
|
111
112
|
compiledir = config.compiledir
|
|
112
113
|
table = []
|
|
113
114
|
table_multiple_ops = []
|
|
114
|
-
table_op_class =
|
|
115
|
+
table_op_class = Counter()
|
|
115
116
|
zeros_op = 0
|
|
116
117
|
big_key_files = []
|
|
117
118
|
total_key_sizes = 0
|
|
118
|
-
nb_keys =
|
|
119
|
+
nb_keys = Counter()
|
|
119
120
|
for dir in os.listdir(compiledir):
|
|
120
121
|
filename = os.path.join(compiledir, dir, "key.pkl")
|
|
121
122
|
if not os.path.exists(filename):
|
|
@@ -125,9 +126,7 @@ def print_compiledir_content():
|
|
|
125
126
|
keydata = pickle.load(file)
|
|
126
127
|
ops = list({x for x in flatten(keydata.keys) if isinstance(x, Op)})
|
|
127
128
|
# Whatever the case, we count compilations for OP classes.
|
|
128
|
-
|
|
129
|
-
table_op_class.setdefault(op_class, 0)
|
|
130
|
-
table_op_class[op_class] += 1
|
|
129
|
+
table_op_class.update({op.__class__ for op in ops})
|
|
131
130
|
if len(ops) == 0:
|
|
132
131
|
zeros_op += 1
|
|
133
132
|
else:
|
|
@@ -159,7 +158,6 @@ def print_compiledir_content():
|
|
|
159
158
|
if size > max_key_file_size:
|
|
160
159
|
big_key_files.append((dir, size, ops))
|
|
161
160
|
|
|
162
|
-
nb_keys.setdefault(len(keydata.keys), 0)
|
|
163
161
|
nb_keys[len(keydata.keys)] += 1
|
|
164
162
|
except OSError:
|
|
165
163
|
pass
|
|
@@ -198,8 +196,7 @@ def print_compiledir_content():
|
|
|
198
196
|
),
|
|
199
197
|
underline="+",
|
|
200
198
|
)
|
|
201
|
-
|
|
202
|
-
for op_class, nb in table_op_class:
|
|
199
|
+
for op_class, nb in reversed(table_op_class.most_common()):
|
|
203
200
|
print(op_class, nb)
|
|
204
201
|
|
|
205
202
|
if big_key_files:
|
|
@@ -687,7 +687,7 @@ def _lessbroken_deepcopy(a):
|
|
|
687
687
|
else:
|
|
688
688
|
rval = copy.deepcopy(a)
|
|
689
689
|
|
|
690
|
-
assert type(rval)
|
|
690
|
+
assert type(rval) is type(a), (type(rval), type(a))
|
|
691
691
|
|
|
692
692
|
if isinstance(rval, np.ndarray):
|
|
693
693
|
assert rval.dtype == a.dtype
|
|
@@ -906,11 +906,10 @@ def _get_preallocated_maps(
|
|
|
906
906
|
name = f"strided{tuple(steps)}"
|
|
907
907
|
for r in considered_outputs:
|
|
908
908
|
if r in init_strided:
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
strides.append(slice(None, None, steps[i]))
|
|
909
|
+
shapes = [slice(None, size, None) for size in r_vals[r].shape]
|
|
910
|
+
strides = [
|
|
911
|
+
slice(None, None, steps[i]) for i in range(r_vals[r].ndim)
|
|
912
|
+
]
|
|
914
913
|
|
|
915
914
|
r_buf = init_strided[r]
|
|
916
915
|
|
|
@@ -1154,7 +1153,7 @@ class _FunctionGraphEvent:
|
|
|
1154
1153
|
return str(self.__dict__)
|
|
1155
1154
|
|
|
1156
1155
|
def __eq__(self, other):
|
|
1157
|
-
rval = type(self)
|
|
1156
|
+
rval = type(self) is type(other)
|
|
1158
1157
|
if rval:
|
|
1159
1158
|
# nodes are not compared because this comparison is
|
|
1160
1159
|
# supposed to be true for corresponding events that happen
|
|
@@ -247,18 +247,10 @@ def function(
|
|
|
247
247
|
|
|
248
248
|
"""
|
|
249
249
|
if isinstance(outputs, dict):
|
|
250
|
-
|
|
250
|
+
assert all(isinstance(k, str) for k in outputs)
|
|
251
251
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
output_items_sorted = sorted(output_items)
|
|
256
|
-
|
|
257
|
-
output_keys = []
|
|
258
|
-
outputs = []
|
|
259
|
-
for pair in output_items_sorted:
|
|
260
|
-
output_keys.append(pair[0])
|
|
261
|
-
outputs.append(pair[1])
|
|
252
|
+
output_keys = sorted(outputs)
|
|
253
|
+
outputs = [outputs[key] for key in output_keys]
|
|
262
254
|
|
|
263
255
|
else:
|
|
264
256
|
output_keys = None
|
|
@@ -14,6 +14,7 @@ import pytensor
|
|
|
14
14
|
import pytensor.compile.profiling
|
|
15
15
|
from pytensor.compile.io import In, SymbolicInput, SymbolicOutput
|
|
16
16
|
from pytensor.compile.ops import deep_copy_op, view_op
|
|
17
|
+
from pytensor.compile.profiling import ProfileStats
|
|
17
18
|
from pytensor.configdefaults import config
|
|
18
19
|
from pytensor.graph.basic import (
|
|
19
20
|
Constant,
|
|
@@ -212,18 +213,14 @@ def std_fgraph(
|
|
|
212
213
|
|
|
213
214
|
found_updates.extend(map(SymbolicOutput, updates))
|
|
214
215
|
elif fgraph is None:
|
|
215
|
-
input_vars = []
|
|
216
|
-
|
|
217
216
|
# If one of the inputs is non-atomic (i.e. has a non-`None` `Variable.owner`),
|
|
218
217
|
# then we need to create/clone the graph starting at these inputs.
|
|
219
218
|
# The result will be atomic versions of the given inputs connected to
|
|
220
219
|
# the same outputs.
|
|
221
220
|
# Otherwise, when all the inputs are already atomic, there's no need to
|
|
222
221
|
# clone the graph.
|
|
223
|
-
|
|
224
|
-
for
|
|
225
|
-
input_vars.append(spec.variable)
|
|
226
|
-
clone |= spec.variable.owner is not None
|
|
222
|
+
input_vars = [spec.variable for spec in input_specs]
|
|
223
|
+
clone = force_clone or any(var.owner is not None for var in input_vars)
|
|
227
224
|
|
|
228
225
|
fgraph = FunctionGraph(
|
|
229
226
|
input_vars,
|
|
@@ -557,11 +554,11 @@ class Function:
|
|
|
557
554
|
|
|
558
555
|
def copy(
|
|
559
556
|
self,
|
|
560
|
-
share_memory=False,
|
|
561
|
-
swap=None,
|
|
562
|
-
delete_updates=False,
|
|
563
|
-
name=None,
|
|
564
|
-
profile=None,
|
|
557
|
+
share_memory: bool = False,
|
|
558
|
+
swap: dict | None = None,
|
|
559
|
+
delete_updates: bool = False,
|
|
560
|
+
name: str | None = None,
|
|
561
|
+
profile: bool | str | ProfileStats | None = None,
|
|
565
562
|
):
|
|
566
563
|
"""
|
|
567
564
|
Copy this function. Copied function will have separated maker and
|
|
@@ -588,7 +585,7 @@ class Function:
|
|
|
588
585
|
If provided, will be the name of the new
|
|
589
586
|
Function. Otherwise, it will be old + " copy"
|
|
590
587
|
|
|
591
|
-
profile :
|
|
588
|
+
profile : bool | str | ProfileStats | None
|
|
592
589
|
as pytensor.function profile parameter
|
|
593
590
|
|
|
594
591
|
Returns
|
|
@@ -727,14 +724,8 @@ class Function:
|
|
|
727
724
|
# reinitialize new maker and create new function
|
|
728
725
|
if profile is None:
|
|
729
726
|
profile = config.profile or config.print_global_stats
|
|
730
|
-
# profile -> True or False
|
|
731
727
|
if profile is True:
|
|
732
|
-
|
|
733
|
-
message = name
|
|
734
|
-
else:
|
|
735
|
-
message = str(profile.message) + " copy"
|
|
736
|
-
profile = pytensor.compile.profiling.ProfileStats(message=message)
|
|
737
|
-
# profile -> object
|
|
728
|
+
profile = pytensor.compile.profiling.ProfileStats(message=name)
|
|
738
729
|
elif isinstance(profile, str):
|
|
739
730
|
profile = pytensor.compile.profiling.ProfileStats(message=profile)
|
|
740
731
|
|
|
@@ -1106,6 +1097,18 @@ class Function:
|
|
|
1106
1097
|
# NOTE: sync was needed on old gpu backend
|
|
1107
1098
|
pass
|
|
1108
1099
|
|
|
1100
|
+
def dprint(self, **kwargs):
|
|
1101
|
+
"""Debug print itself
|
|
1102
|
+
|
|
1103
|
+
Parameters
|
|
1104
|
+
----------
|
|
1105
|
+
kwargs:
|
|
1106
|
+
Optional keyword arguments to pass to debugprint function.
|
|
1107
|
+
"""
|
|
1108
|
+
from pytensor.printing import debugprint
|
|
1109
|
+
|
|
1110
|
+
return debugprint(self, **kwargs)
|
|
1111
|
+
|
|
1109
1112
|
|
|
1110
1113
|
# pickling/deepcopy support for Function
|
|
1111
1114
|
def _pickle_Function(f):
|
|
@@ -28,6 +28,7 @@ from pytensor.link.basic import Linker, PerformLinker
|
|
|
28
28
|
from pytensor.link.c.basic import CLinker, OpWiseCLinker
|
|
29
29
|
from pytensor.link.jax.linker import JAXLinker
|
|
30
30
|
from pytensor.link.numba.linker import NumbaLinker
|
|
31
|
+
from pytensor.link.pytorch.linker import PytorchLinker
|
|
31
32
|
from pytensor.link.vm import VMLinker
|
|
32
33
|
|
|
33
34
|
|
|
@@ -47,6 +48,7 @@ predefined_linkers = {
|
|
|
47
48
|
"vm_nogc": VMLinker(allow_gc=False, use_cloop=False),
|
|
48
49
|
"cvm_nogc": VMLinker(allow_gc=False, use_cloop=True),
|
|
49
50
|
"jax": JAXLinker(),
|
|
51
|
+
"pytorch": PytorchLinker(),
|
|
50
52
|
"numba": NumbaLinker(),
|
|
51
53
|
}
|
|
52
54
|
|
|
@@ -460,6 +462,18 @@ JAX = Mode(
|
|
|
460
462
|
],
|
|
461
463
|
),
|
|
462
464
|
)
|
|
465
|
+
PYTORCH = Mode(
|
|
466
|
+
PytorchLinker(),
|
|
467
|
+
RewriteDatabaseQuery(
|
|
468
|
+
include=["fast_run"],
|
|
469
|
+
exclude=[
|
|
470
|
+
"cxx_only",
|
|
471
|
+
"BlasOpt",
|
|
472
|
+
"fusion",
|
|
473
|
+
"inplace",
|
|
474
|
+
],
|
|
475
|
+
),
|
|
476
|
+
)
|
|
463
477
|
NUMBA = Mode(
|
|
464
478
|
NumbaLinker(),
|
|
465
479
|
RewriteDatabaseQuery(
|
|
@@ -474,6 +488,7 @@ predefined_modes = {
|
|
|
474
488
|
"FAST_RUN": FAST_RUN,
|
|
475
489
|
"JAX": JAX,
|
|
476
490
|
"NUMBA": NUMBA,
|
|
491
|
+
"PYTORCH": PYTORCH,
|
|
477
492
|
}
|
|
478
493
|
|
|
479
494
|
instantiated_default_mode = None
|
|
@@ -246,7 +246,7 @@ class FromFunctionOp(Op):
|
|
|
246
246
|
self.infer_shape = self._infer_shape
|
|
247
247
|
|
|
248
248
|
def __eq__(self, other):
|
|
249
|
-
return type(self)
|
|
249
|
+
return type(self) is type(other) and self.__fn == other.__fn
|
|
250
250
|
|
|
251
251
|
def __hash__(self):
|
|
252
252
|
return hash(type(self)) ^ hash(self.__fn)
|
|
@@ -14,9 +14,9 @@ import logging
|
|
|
14
14
|
import operator
|
|
15
15
|
import sys
|
|
16
16
|
import time
|
|
17
|
-
from collections import defaultdict
|
|
17
|
+
from collections import Counter, defaultdict
|
|
18
18
|
from contextlib import contextmanager
|
|
19
|
-
from typing import TYPE_CHECKING, Any
|
|
19
|
+
from typing import TYPE_CHECKING, Any
|
|
20
20
|
|
|
21
21
|
import numpy as np
|
|
22
22
|
|
|
@@ -204,8 +204,8 @@ class ProfileStats:
|
|
|
204
204
|
self.fct_call_time = 0.0
|
|
205
205
|
self.fct_callcount = 0
|
|
206
206
|
self.vm_call_time = 0.0
|
|
207
|
-
self.apply_time =
|
|
208
|
-
self.apply_callcount =
|
|
207
|
+
self.apply_time = defaultdict(float)
|
|
208
|
+
self.apply_callcount = Counter()
|
|
209
209
|
# self.apply_cimpl = None
|
|
210
210
|
# self.message = None
|
|
211
211
|
|
|
@@ -234,9 +234,9 @@ class ProfileStats:
|
|
|
234
234
|
# Total time spent in Function.vm.__call__
|
|
235
235
|
#
|
|
236
236
|
|
|
237
|
-
apply_time: dict[
|
|
237
|
+
apply_time: dict[tuple["FunctionGraph", Apply], float]
|
|
238
238
|
|
|
239
|
-
apply_callcount: dict[
|
|
239
|
+
apply_callcount: dict[tuple["FunctionGraph", Apply], int]
|
|
240
240
|
|
|
241
241
|
apply_cimpl: dict[Apply, bool] | None = None
|
|
242
242
|
# dict from node -> bool (1 if c, 0 if py)
|
|
@@ -292,10 +292,9 @@ class ProfileStats:
|
|
|
292
292
|
# param is called flag_time_thunks because most other attributes with time
|
|
293
293
|
# in the name are times *of* something, rather than configuration flags.
|
|
294
294
|
def __init__(self, atexit_print=True, flag_time_thunks=None, **kwargs):
|
|
295
|
-
self.apply_callcount =
|
|
295
|
+
self.apply_callcount = Counter()
|
|
296
296
|
self.output_size = {}
|
|
297
|
-
|
|
298
|
-
self.apply_time = {}
|
|
297
|
+
self.apply_time = defaultdict(float)
|
|
299
298
|
self.apply_cimpl = {}
|
|
300
299
|
self.variable_shape = {}
|
|
301
300
|
self.variable_strides = {}
|
|
@@ -320,12 +319,10 @@ class ProfileStats:
|
|
|
320
319
|
|
|
321
320
|
"""
|
|
322
321
|
# timing is stored by node, we compute timing by class on demand
|
|
323
|
-
rval =
|
|
324
|
-
for (
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
rval[typ] += t
|
|
328
|
-
return rval
|
|
322
|
+
rval = defaultdict(float)
|
|
323
|
+
for (_fgraph, node), t in self.apply_time.items():
|
|
324
|
+
rval[type(node.op)] += t
|
|
325
|
+
return dict(rval)
|
|
329
326
|
|
|
330
327
|
def class_callcount(self):
|
|
331
328
|
"""
|
|
@@ -333,24 +330,18 @@ class ProfileStats:
|
|
|
333
330
|
|
|
334
331
|
"""
|
|
335
332
|
# timing is stored by node, we compute timing by class on demand
|
|
336
|
-
rval =
|
|
337
|
-
for (
|
|
338
|
-
|
|
339
|
-
rval.setdefault(typ, 0)
|
|
340
|
-
rval[typ] += count
|
|
333
|
+
rval = Counter()
|
|
334
|
+
for (_fgraph, node), count in self.apply_callcount.items():
|
|
335
|
+
rval[type(node.op)] += count
|
|
341
336
|
return rval
|
|
342
337
|
|
|
343
|
-
def class_nodes(self):
|
|
338
|
+
def class_nodes(self) -> Counter:
|
|
344
339
|
"""
|
|
345
340
|
dict op -> total number of nodes
|
|
346
341
|
|
|
347
342
|
"""
|
|
348
343
|
# timing is stored by node, we compute timing by class on demand
|
|
349
|
-
rval =
|
|
350
|
-
for (fgraph, node), count in self.apply_callcount.items():
|
|
351
|
-
typ = type(node.op)
|
|
352
|
-
rval.setdefault(typ, 0)
|
|
353
|
-
rval[typ] += 1
|
|
344
|
+
rval = Counter(type(node.op) for _fgraph, node in self.apply_callcount)
|
|
354
345
|
return rval
|
|
355
346
|
|
|
356
347
|
def class_impl(self):
|
|
@@ -360,12 +351,9 @@ class ProfileStats:
|
|
|
360
351
|
"""
|
|
361
352
|
# timing is stored by node, we compute timing by class on demand
|
|
362
353
|
rval = {}
|
|
363
|
-
for
|
|
354
|
+
for _fgraph, node in self.apply_callcount:
|
|
364
355
|
typ = type(node.op)
|
|
365
|
-
if self.apply_cimpl[node]
|
|
366
|
-
impl = "C "
|
|
367
|
-
else:
|
|
368
|
-
impl = "Py"
|
|
356
|
+
impl = "C " if self.apply_cimpl[node] else "Py"
|
|
369
357
|
rval.setdefault(typ, impl)
|
|
370
358
|
if rval[typ] != impl and len(rval[typ]) == 2:
|
|
371
359
|
rval[typ] += impl
|
|
@@ -377,11 +365,10 @@ class ProfileStats:
|
|
|
377
365
|
|
|
378
366
|
"""
|
|
379
367
|
# timing is stored by node, we compute timing by Op on demand
|
|
380
|
-
rval =
|
|
368
|
+
rval = defaultdict(float)
|
|
381
369
|
for (fgraph, node), t in self.apply_time.items():
|
|
382
|
-
rval.setdefault(node.op, 0)
|
|
383
370
|
rval[node.op] += t
|
|
384
|
-
return rval
|
|
371
|
+
return dict(rval)
|
|
385
372
|
|
|
386
373
|
def fill_node_total_time(self, fgraph, node, total_times):
|
|
387
374
|
"""
|
|
@@ -414,9 +401,8 @@ class ProfileStats:
|
|
|
414
401
|
|
|
415
402
|
"""
|
|
416
403
|
# timing is stored by node, we compute timing by Op on demand
|
|
417
|
-
rval =
|
|
404
|
+
rval = Counter()
|
|
418
405
|
for (fgraph, node), count in self.apply_callcount.items():
|
|
419
|
-
rval.setdefault(node.op, 0)
|
|
420
406
|
rval[node.op] += count
|
|
421
407
|
return rval
|
|
422
408
|
|
|
@@ -426,10 +412,7 @@ class ProfileStats:
|
|
|
426
412
|
|
|
427
413
|
"""
|
|
428
414
|
# timing is stored by node, we compute timing by Op on demand
|
|
429
|
-
rval =
|
|
430
|
-
for (fgraph, node), count in self.apply_callcount.items():
|
|
431
|
-
rval.setdefault(node.op, 0)
|
|
432
|
-
rval[node.op] += 1
|
|
415
|
+
rval = Counter(node.op for _fgraph, node in self.apply_callcount)
|
|
433
416
|
return rval
|
|
434
417
|
|
|
435
418
|
def op_impl(self):
|
|
@@ -1204,8 +1187,7 @@ class ProfileStats:
|
|
|
1204
1187
|
compute_map[var][0] = 0
|
|
1205
1188
|
|
|
1206
1189
|
for k_remove, v_remove in viewedby_remove.items():
|
|
1207
|
-
|
|
1208
|
-
viewed_by[k_remove].append(i)
|
|
1190
|
+
viewed_by[k_remove].extend(v_remove)
|
|
1209
1191
|
|
|
1210
1192
|
for k_add, v_add in viewedby_add.items():
|
|
1211
1193
|
for i in v_add:
|
|
@@ -1215,15 +1197,16 @@ class ProfileStats:
|
|
|
1215
1197
|
del view_of[k]
|
|
1216
1198
|
|
|
1217
1199
|
# two data structure used to mimic Python gc
|
|
1218
|
-
|
|
1200
|
+
# * {var1: [vars that view var1]}
|
|
1219
1201
|
# The len of the list is the value of python ref
|
|
1220
1202
|
# count. But we use a list, not just the ref count value.
|
|
1221
|
-
# This is more safe to help detect potential bug
|
|
1222
|
-
for var in fgraph.variables
|
|
1223
|
-
|
|
1224
|
-
|
|
1203
|
+
# This is more safe to help detect potential bug in the algo
|
|
1204
|
+
viewed_by = {var: [] for var in fgraph.variables}
|
|
1205
|
+
|
|
1206
|
+
# * {var1: original var viewed by var1}
|
|
1225
1207
|
# The original mean that we don't keep track of all the intermediate
|
|
1226
1208
|
# relationship in the view.
|
|
1209
|
+
view_of = {}
|
|
1227
1210
|
|
|
1228
1211
|
min_memory_generator(executable_nodes, viewed_by, view_of)
|
|
1229
1212
|
|
|
@@ -1041,13 +1041,12 @@ def _populate_grad_dict(var_to_app_to_idx, grad_dict, wrt, cost_name=None):
|
|
|
1041
1041
|
# list of bools indicating if each input is connected to the cost
|
|
1042
1042
|
inputs_connected = [
|
|
1043
1043
|
(
|
|
1044
|
-
|
|
1045
|
-
in [
|
|
1044
|
+
any(
|
|
1046
1045
|
input_to_output and output_to_cost
|
|
1047
1046
|
for input_to_output, output_to_cost in zip(
|
|
1048
1047
|
input_to_outputs, outputs_connected
|
|
1049
1048
|
)
|
|
1050
|
-
|
|
1049
|
+
)
|
|
1051
1050
|
)
|
|
1052
1051
|
for input_to_outputs in connection_pattern
|
|
1053
1052
|
]
|
|
@@ -1067,25 +1066,24 @@ def _populate_grad_dict(var_to_app_to_idx, grad_dict, wrt, cost_name=None):
|
|
|
1067
1066
|
# List of bools indicating if each input only has NullType outputs
|
|
1068
1067
|
only_connected_to_nan = [
|
|
1069
1068
|
(
|
|
1070
|
-
|
|
1071
|
-
not in [
|
|
1069
|
+
not any(
|
|
1072
1070
|
in_to_out and out_to_cost and not out_nan
|
|
1073
1071
|
for in_to_out, out_to_cost, out_nan in zip(
|
|
1074
1072
|
in_to_outs, outputs_connected, ograd_is_nan
|
|
1075
1073
|
)
|
|
1076
|
-
|
|
1074
|
+
)
|
|
1077
1075
|
)
|
|
1078
1076
|
for in_to_outs in connection_pattern
|
|
1079
1077
|
]
|
|
1080
1078
|
|
|
1081
|
-
if
|
|
1079
|
+
if not any(inputs_connected):
|
|
1082
1080
|
# All outputs of this op are disconnected so we can skip
|
|
1083
1081
|
# Calling the op's grad method and report that the inputs
|
|
1084
1082
|
# are disconnected
|
|
1085
1083
|
# (The op's grad method could do this too, but this saves the
|
|
1086
1084
|
# implementer the trouble of worrying about this case)
|
|
1087
1085
|
input_grads = [disconnected_type() for ipt in inputs]
|
|
1088
|
-
elif
|
|
1086
|
+
elif all(only_connected_to_nan):
|
|
1089
1087
|
# All inputs are only connected to nan gradients, so we don't
|
|
1090
1088
|
# need to bother calling the grad method. We know the gradient
|
|
1091
1089
|
# with respect to all connected inputs is nan.
|
|
@@ -748,7 +748,7 @@ class NominalVariable(AtomicVariable[_TypeType]):
|
|
|
748
748
|
return True
|
|
749
749
|
|
|
750
750
|
return (
|
|
751
|
-
type(self)
|
|
751
|
+
type(self) is type(other)
|
|
752
752
|
and self.id == other.id
|
|
753
753
|
and self.type == other.type
|
|
754
754
|
)
|
|
@@ -1302,8 +1302,8 @@ def clone_node_and_cache(
|
|
|
1302
1302
|
|
|
1303
1303
|
|
|
1304
1304
|
def clone_get_equiv(
|
|
1305
|
-
inputs:
|
|
1306
|
-
outputs:
|
|
1305
|
+
inputs: Iterable[Variable],
|
|
1306
|
+
outputs: Reversible[Variable],
|
|
1307
1307
|
copy_inputs: bool = True,
|
|
1308
1308
|
copy_orphans: bool = True,
|
|
1309
1309
|
memo: dict[Union[Apply, Variable, "Op"], Union[Apply, Variable, "Op"]]
|
|
@@ -1474,9 +1474,8 @@ def general_toposort(
|
|
|
1474
1474
|
|
|
1475
1475
|
_clients: dict[T, list[T]] = {}
|
|
1476
1476
|
sources: deque[T] = deque()
|
|
1477
|
-
search_res_len
|
|
1477
|
+
search_res_len = len(search_res)
|
|
1478
1478
|
for snode, children in search_res:
|
|
1479
|
-
search_res_len += 1
|
|
1480
1479
|
if children:
|
|
1481
1480
|
for child in children:
|
|
1482
1481
|
_clients.setdefault(child, []).append(snode)
|