pyhs3.compiled.default_nll_mode¶
- pyhs3.compiled.default_nll_mode(*, fuse=False)[source]¶
PyTensor mode
pyhs3.Model.compile_nll()uses by default.The op-wise C linker with the rewrites of PyTensor’s C mode (
"CVM"), excluding the in-place rewrites and, unlessfuse=True, the elemwise-fusion rewrites."FAST_RUN"is not used: with PyTensor’sconfig.linkerset to"auto"(the default) or"numba"it resolves to the Numba mode, whose rewrite set targets the Numba linker; only with"cvm"does it resolve to"CVM".Fusion merges elementwise operations into
Compositeops, each a distinct kernel that the C compiler builds separately; on large workspaces there are thousands of them, and compiling them dominates the cold compile time. Without fusion, elementwise operations are generic, so one compiled module serves many nodes. Fused kernels evaluate faster, though: on large workspaces fusion makes the first compile several times slower and each evaluation faster.fuse=Falsetherefore favours the time to a first result,fuse=Truelong fitting campaigns (with the compiled function cached on disk).The in-place rewrites add compile time without speeding up evaluation of a likelihood.