Skip to content

Add an allocator to TensorOperationsAlgorithm#212

Merged
mtfishman merged 4 commits into
mainfrom
mf/to-allocator
Jul 21, 2026
Merged

Add an allocator to TensorOperationsAlgorithm#212
mtfishman merged 4 commits into
mainfrom
mf/to-allocator

Conversation

@mtfishman

Copy link
Copy Markdown
Member

Summary

Adds an allocator field to TensorOperationsAlgorithm alongside backend, so a caller can choose the allocator for a contraction (e.g. TensorOperations.ManualAllocator(), or a Bumper buffer), not just the backend. It defaults to DefaultAllocator(), so the default path is unchanged.

Adds an `allocator` field to `TensorOperationsAlgorithm` alongside `backend`, so a caller can choose the allocator for a contraction (e.g. `TensorOperations.ManualAllocator()`, or a Bumper buffer), not just the backend. It defaults to `DefaultAllocator()`, so the default path is unchanged.
Only construct `DefaultBackend()`/`DefaultAllocator()` when the corresponding field is `nothing`.
@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.51%. Comparing base (508e24e) to head (3010a53).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #212      +/-   ##
==========================================
+ Coverage   81.48%   81.51%   +0.02%     
==========================================
  Files          26       26              
  Lines         983      990       +7     
==========================================
+ Hits          801      807       +6     
- Misses        182      183       +1     
Flag Coverage Δ
docs 22.17% <0.00%> (-0.15%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Checks that a `TensorOperationsAlgorithm` with an explicit allocator, the `ContractAlgorithm(backend, allocator)` seam, and the `nothing` defaults all match the default contraction, out-of-place and in-place, across real and complex element types.
@mtfishman
mtfishman enabled auto-merge (squash) July 21, 2026 20:15
@mtfishman
mtfishman merged commit be15b6c into main Jul 21, 2026
21 checks passed
@mtfishman
mtfishman deleted the mf/to-allocator branch July 21, 2026 20:20
Sign up for free to 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.

1 participant