Skip to content

GEOPY-2910: Reduce chunking of sensitivities for TEM inversions - #152

Merged
domfournier merged 5 commits into
release/GA_4.8from
update_release
Jun 18, 2026
Merged

GEOPY-2910: Reduce chunking of sensitivities for TEM inversions#152
domfournier merged 5 commits into
release/GA_4.8from
update_release

Conversation

@domfournier

@domfournierdomfournier commented Jun 18, 2026

Copy link
Copy Markdown

GEOPY-2910 - Reduce chunking of sensitivities for TEM inversions

CopilotAI review requested due to automatic review settings June 18, 2026 01:28
@github-actionsgithub-actionsBot changed the title GEOPY-2910GEOPY-2910: Reduce chunking of sensitivities for TEM inversionsJun 18, 2026

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Dask-based TDEM sensitivity assembly to reduce sensitivity “chunking” by stacking field-derivative solves across each parallel block, aiming to lower overhead and improve inversion performance/memory behavior.

Changes:

  • Disables get_parallel_blocks(..., optimize=True) re-splitting to avoid extra block/chunk fragmentation.
  • Refactors get_field_deriv_block to build a single dense ATinv_df_duT_v array per block (instead of per-chunk lists) and solve in a stacked call.
  • Updates compute_rows to slice the new per-block derivative array using a running column offset (colm_count).
Comments suppressed due to low confidence (1)

simpeg/dask/electromagnetics/time_domain/simulation.py:482

  • When local_ind is empty, this branch continues without advancing colm_count. Since later iterations slice field_derivs[block_ind] using colm_count, subsequent chunks will be misaligned (wrong columns used for derivatives), producing incorrect sensitivity rows.
 if len(local_ind) < 1:
row_block = np.zeros(
(len(ind_array[1]), simulation.model.size), dtype=np.float32
)
rows.append(row_block)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadsimpeg/dask/electromagnetics/time_domain/simulation.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@domfournier
domfournier merged commit 6f2094c into release/GA_4.8Jun 18, 2026
11 of 12 checks passed
@domfournier
domfournier deleted the update_release branch June 18, 2026 01:42
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@domfournier