# execution¶

class zfit.util.execution.RunManager(n_cpu='auto')[source]

Bases: object

Handle the resources and runtime specific options. The run method is equivalent to sess.run

aquire_cpu(max_cpu: int = -1) → List[str][source]
property chunksize
property n_cpu
set_cpus_explicit(intra: int, inter: int) → None[source]

Set the number of threads (cpus) used for inter-op and intra-op parallelism

Parameters
• intra – Number of threads used to perform an operation. For larger operations, e.g. large Tensors, this is usually beneficial to have >= 2.

• inter – Parallelization on the level of ops. This is beneficial, if many operations can be computed independently in parallel.

set_n_cpu(n_cpu: Union[str, int] = 'auto', strict: bool = False) → None[source]

Set the number of cpus to be used by zfit. For more control, use set_cpus_explicit.

Parameters
• n_cpu – Number of cpus, will be the number for inter-op parallelism

• strict – If strict, sets intra parallelism to 1