From 15d95f16081379ddd186266c0ae4012b1eeddaf7 Mon Sep 17 00:00:00 2001 From: Dario Panici Date: Thu, 26 Sep 2024 08:42:11 -0400 Subject: [PATCH] correct changelog --- CHANGELOG.md | 2 +- desc/batching.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 757906ea50..51d9eee577 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ to compute the toroidal flux when possible, as opposed to a 2D surface integral - Add ``jac_chunk_size`` to ``ObjectiveFunction`` and ``_Objective`` to control the above chunk size for the ``fwd`` mode Jacobian calculation - if ``None``, the chunk size is equal to ``dim_x``, so no chunking is done - if an ``int``, this is the chunk size to be used. - - if ``"auto"`` for the ``ObjectiveFunction``, will use a heuristic for the minimum ``jac_chunk_size`` needed to fit the jacobian calculation on the available device memory, according to the formula: ``min_jac_chunk_size = (desc_config.get("avail_mem") / estimated_memory_usage - 0.22) / 0.85 * self.dim_x`` with ``estimated_memory_usage = 2.4e-7 * self.dim_f * self.dim_x + 1`` + - if ``"auto"`` for the ``ObjectiveFunction``, will use a heuristic for the maximum ``jac_chunk_size`` needed to fit the jacobian calculation on the available device memory, according to the formula: ``max_jac_chunk_size = (desc_config.get("avail_mem") / estimated_memory_usage - 0.22) / 0.85 * self.dim_x`` with ``estimated_memory_usage = 2.4e-7 * self.dim_f * self.dim_x + 1`` - the ``ObjectiveFunction`` ``jac_chunk_size`` is used if ``deriv_mode="batched"``, and the ``_Objective`` ``jac_chunk_size`` will be used if ``deriv_mode="blocked"`` Bug Fixes diff --git a/desc/batching.py b/desc/batching.py index 57d6ba9d14..7b2a18f7b6 100644 --- a/desc/batching.py +++ b/desc/batching.py @@ -216,7 +216,7 @@ def batched_vectorize(pyfunc, *, excluded=frozenset(), signature=None, chunk_siz Parameters ---------- - pyfunc: function to vectorize. + pyfunc: callable,function to vectorize. excluded: optional set of integers representing positional arguments for which the function will not be vectorized. These will be passed directly to ``pyfunc`` unmodified.