Skip to content

Simplify lifetime management using ObjectiveC.jl's ARC#851

Merged
maleadt merged 16 commits into
mainfrom
tb/arc
Jun 21, 2026
Merged

Simplify lifetime management using ObjectiveC.jl's ARC#851
maleadt merged 16 commits into
mainfrom
tb/arc

Conversation

@maleadt

@maleadt maleadt commented Jun 21, 2026

Copy link
Copy Markdown
Member

@codecov

codecov Bot commented Jun 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.31646% with 39 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.37%. Comparing base (224d0e2) to head (aac9042).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/mpsgraphs/operations.jl 61.11% 7 Missing ⚠️
lib/mpsgraphs/tensor.jl 22.22% 7 Missing ⚠️
src/initialization.jl 44.44% 5 Missing ⚠️
lib/mps/ndarray.jl 66.66% 4 Missing ⚠️
lib/mtl/texture.jl 0.00% 3 Missing ⚠️
lib/mps/images.jl 0.00% 2 Missing ⚠️
lib/mps/matrixrandom.jl 71.42% 2 Missing ⚠️
lib/mpsgraphs/execution.jl 0.00% 2 Missing ⚠️
lib/mtl/command_queue.jl 33.33% 2 Missing ⚠️
lib/mps/command_buf.jl 50.00% 1 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #851      +/-   ##
==========================================
+ Coverage   84.00%   85.37%   +1.37%     
==========================================
  Files          69       69              
  Lines        4400     4136     -264     
==========================================
- Hits         3696     3531     -165     
+ Misses        704      605      -99     

☔ 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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Metal Benchmarks

Details
Benchmark suite Current: aac9042 Previous: 88f4d1b Ratio
array/accumulate/Float32/1d 831750 ns 835583.5 ns 1.00
array/accumulate/Float32/dims=1 981917 ns 987166.5 ns 0.99
array/accumulate/Float32/dims=1L 8675146 ns 8678125 ns 1.00
array/accumulate/Float32/dims=2 1252895.5 ns 1265208.5 ns 0.99
array/accumulate/Float32/dims=2L 4203396.5 ns 4201625 ns 1.00
array/accumulate/Int64/1d 927500 ns 928292 ns 1.00
array/accumulate/Int64/dims=1 1109854.5 ns 1110750 ns 1.00
array/accumulate/Int64/dims=1L 9820542 ns 9880833 ns 0.99
array/accumulate/Int64/dims=2 1454479 ns 1481042 ns 0.98
array/accumulate/Int64/dims=2L 7056354.5 ns 7062208 ns 1.00
array/broadcast 336270.5 ns 335229 ns 1.00
array/construct 3291 ns 3375 ns 0.98
array/permutedims/2d 628083 ns 725771 ns 0.87
array/permutedims/3d 1095708 ns 1218667 ns 0.90
array/permutedims/4d 1137375 ns 1203916 ns 0.94
array/private/copy 424208 ns 421625 ns 1.01
array/private/copyto!/cpu_to_gpu 361979 ns 365708.5 ns 0.99
array/private/copyto!/gpu_to_cpu 355083 ns 353000 ns 1.01
array/private/copyto!/gpu_to_gpu 309395.5 ns 329104.5 ns 0.94
array/private/iteration/findall/bool 1187916 ns 1190583 ns 1.00
array/private/iteration/findall/int 1318750 ns 1321459 ns 1.00
array/private/iteration/findfirst/bool 1329479.5 ns 1322083.5 ns 1.01
array/private/iteration/findfirst/int 1394833 ns 1386750 ns 1.01
array/private/iteration/findmin/1d 1529000 ns 1522708 ns 1.00
array/private/iteration/findmin/2d 1223875 ns 1231458 ns 0.99
array/private/iteration/logical 1989250 ns 1990750 ns 1.00
array/private/iteration/scalar 1756875 ns 1826771 ns 0.96
array/random/rand/Float32 604020.5 ns 603375 ns 1.00
array/random/rand/Int64 655709 ns 653625 ns 1.00
array/random/rand!/Float32 496959 ns 497750 ns 1.00
array/random/rand!/Int64 473625 ns 474834 ns 1.00
array/random/randn/Float32 558916.5 ns 556666 ns 1.00
array/random/randn!/Float32 452500 ns 452208 ns 1.00
array/reductions/mapreduce/Float32/1d 615584 ns 618292 ns 1.00
array/reductions/mapreduce/Float32/dims=1 447625 ns 451375 ns 0.99
array/reductions/mapreduce/Float32/dims=1L 710875 ns 711000 ns 1.00
array/reductions/mapreduce/Float32/dims=2 450375 ns 457000 ns 0.99
array/reductions/mapreduce/Float32/dims=2L 836333 ns 856917 ns 0.98
array/reductions/mapreduce/Int64/1d 798833.5 ns 804917 ns 0.99
array/reductions/mapreduce/Int64/dims=1 765833.5 ns 762083 ns 1.00
array/reductions/mapreduce/Int64/dims=1L 1277000 ns 1310625 ns 0.97
array/reductions/mapreduce/Int64/dims=2 799208 ns 774416 ns 1.03
array/reductions/mapreduce/Int64/dims=2L 2170104.5 ns 2169916 ns 1.00
array/reductions/reduce/Float32/1d 603687.5 ns 603187 ns 1.00
array/reductions/reduce/Float32/dims=1 443584 ns 446458 ns 0.99
array/reductions/reduce/Float32/dims=1L 710417 ns 707145.5 ns 1.00
array/reductions/reduce/Float32/dims=2 444083 ns 451208 ns 0.98
array/reductions/reduce/Float32/dims=2L 834292 ns 849459 ns 0.98
array/reductions/reduce/Int64/1d 788709 ns 794083 ns 0.99
array/reductions/reduce/Int64/dims=1 761937.5 ns 757083 ns 1.01
array/reductions/reduce/Int64/dims=1L 1236417 ns 1282625 ns 0.96
array/reductions/reduce/Int64/dims=2 788708 ns 821354.5 ns 0.96
array/reductions/reduce/Int64/dims=2L 2150458 ns 2150000 ns 1.00
array/shared/copy 170458 ns 173375 ns 0.98
array/shared/copyto!/cpu_to_gpu 39208 ns 40958 ns 0.96
array/shared/copyto!/gpu_to_cpu 39959 ns 40625 ns 0.98
array/shared/copyto!/gpu_to_gpu 40958 ns 42875 ns 0.96
array/shared/iteration/findall/bool 1197416 ns 1200625 ns 1.00
array/shared/iteration/findall/int 1326959 ns 1329084 ns 1.00
array/shared/iteration/findfirst/bool 967042 ns 1056875 ns 0.92
array/shared/iteration/findfirst/int 986959 ns 1055625 ns 0.93
array/shared/iteration/findmin/1d 1284916.5 ns 1282042 ns 1.00
array/shared/iteration/findmin/2d 1221042 ns 1233667 ns 0.99
array/shared/iteration/logical 1792000 ns 1798958 ns 1.00
array/shared/iteration/scalar 2615.777777777778 ns 4666.571428571428 ns 0.56
integration/byval/reference 1153042 ns 1150625 ns 1.00
integration/byval/slices=1 1151917 ns 1151041 ns 1.00
integration/byval/slices=2 2081917 ns 2080208 ns 1.00
integration/byval/slices=3 17299833 ns 18237250 ns 0.95
integration/metaldevrt 441104.5 ns 440458 ns 1.00
kernel/indexing 334208 ns 329292 ns 1.01
kernel/indexing_checked 492917 ns 489250 ns 1.01
kernel/launch 1941.7 ns 1970.8 ns 0.99
kernel/rand 492854.5 ns 495083 ns 1.00
latency/import 1877909167 ns 1675065313 ns 1.12
latency/precompile 37012596166.5 ns 36652152708.5 ns 1.01
latency/ttfp 2098318708 ns 2008984187.5 ns 1.04
metal/synchronization/context 457.90909090909093 ns 652.6153846153846 ns 0.70
metal/synchronization/stream 193.8942731277533 ns 396.03960396039605 ns 0.49

This comment was automatically generated by workflow using github-action-benchmark.

maleadt and others added 2 commits June 21, 2026 14:46
An open batch holds a live command encoder; releasing it from a finalizer
without endEncoding aborts Metal at process teardown. End open batches in an
atexit hook, without committing or waiting on the GPU.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@maleadt maleadt merged commit 6b62b2d into main Jun 21, 2026
19 checks passed
@maleadt maleadt deleted the tb/arc branch June 21, 2026 17:00
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