Skip to content

Conversation

@LarsKue
Copy link
Contributor

@LarsKue LarsKue commented Apr 8, 2025

Calling searchsorted from torch backend sometimes outputs a warning that non-contiguous input tensors reduce performance. We would like to avoid this, so this PR forces input tensors to searchsorted to be contiguous in torch.

@LarsKue LarsKue added the fix Pull request that fixes a bug label Apr 8, 2025
@LarsKue LarsKue added this to the BayesFlow 2.0 milestone Apr 8, 2025
@LarsKue LarsKue requested a review from stefanradev93 April 8, 2025 19:22
@LarsKue LarsKue self-assigned this Apr 8, 2025
@LarsKue LarsKue merged commit effbb00 into dev Apr 8, 2025
14 checks passed
@LarsKue LarsKue deleted the force-contiguous-searchsorted branch April 8, 2025 19:24
@github-project-automation github-project-automation bot moved this from Future to Done in bayesflow development Apr 8, 2025
@codecov
Copy link

codecov bot commented Apr 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
bayesflow/__init__.py 100.00% <ø> (ø)
bayesflow/utils/tensor_utils.py 54.74% <100.00%> (ø)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Pull request that fixes a bug

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants