Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt to minver in ObjectiveC.jl #513

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

christiangnrd
Copy link
Contributor

Mostly to show JuliaInterop/ObjectiveC.jl#47 in action.

To try it out, make just to dev the ObjectiveC branch, then:

julia> using Metal; dev = device(); ndarr = MPS.MPSNDArray(dev, 3); propertynames(ndarr)
13-element Vector{Symbol}:
 :numberOfDimensions
 :dataTypeSize
 :dataType
 :device
 :label
 :parent
 :descriptor
 :userBuffer
 :resourceSize
 :retainCount
 :description
 :debugDescription
 :hash

If you change "15" to "16", you get:

julia> using Metal; dev = device(); ndarr = MPS.MPSNDArray(dev, 3); propertynames(ndarr)
10-element Vector{Symbol}:
 :numberOfDimensions
 :dataTypeSize
 :dataType
 :device
 :label
 :parent
 :retainCount
 :description
 :debugDescription
 :hash

@christiangnrd christiangnrd marked this pull request as draft December 28, 2024 05:29
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Metal Benchmarks

Benchmark suite Current: fe3a68a Previous: 6a760a6 Ratio
private array/construct 27916.714285714286 ns 27270.785714285714 ns 1.02
private array/broadcast 463166 ns 460209 ns 1.01
private array/random/randn/Float32 757333 ns 804875 ns 0.94
private array/random/randn!/Float32 662583 ns 646333 ns 1.03
private array/random/rand!/Int64 563895.5 ns 548916 ns 1.03
private array/random/rand!/Float32 592083.5 ns 587375 ns 1.01
private array/random/rand/Int64 738958.5 ns 716083.5 ns 1.03
private array/random/rand/Float32 617000 ns 615791.5 ns 1.00
private array/copyto!/gpu_to_gpu 711542 ns 677125 ns 1.05
private array/copyto!/cpu_to_gpu 649875 ns 640688 ns 1.01
private array/copyto!/gpu_to_cpu 790792 ns 817625 ns 0.97
private array/accumulate/1d 1322500 ns 1329687.5 ns 0.99
private array/accumulate/2d 1384270.5 ns 1382229 ns 1.00
private array/iteration/findall/int 2068333.5 ns 2073708 ns 1.00
private array/iteration/findall/bool 1822937.5 ns 1799041 ns 1.01
private array/iteration/findfirst/int 1727875 ns 1688292 ns 1.02
private array/iteration/findfirst/bool 1666375 ns 1650020.5 ns 1.01
private array/iteration/scalar 3845792 ns 3252542 ns 1.18
private array/iteration/logical 3187000 ns 3147375 ns 1.01
private array/iteration/findmin/1d 1752000 ns 1736042 ns 1.01
private array/iteration/findmin/2d 1353167 ns 1348917 ns 1.00
private array/reductions/reduce/1d 1045417 ns 1029542 ns 1.02
private array/reductions/reduce/2d 662104.5 ns 650292 ns 1.02
private array/reductions/mapreduce/1d 1045583.5 ns 1025917 ns 1.02
private array/reductions/mapreduce/2d 658083 ns 657229.5 ns 1.00
private array/permutedims/4d 2522375 ns 2553708 ns 0.99
private array/permutedims/2d 1015667 ns 1027750 ns 0.99
private array/permutedims/3d 1591062.5 ns 1585916 ns 1.00
private array/copy 601000 ns 580417 ns 1.04
latency/precompile 5864734437.5 ns 5847134584 ns 1.00
latency/ttfp 6623113124.5 ns 6545482667 ns 1.01
latency/import 1171809750 ns 1169724375 ns 1.00
integration/metaldevrt 704250 ns 713125 ns 0.99
integration/byval/slices=1 1575250 ns 1580770.5 ns 1.00
integration/byval/slices=3 11669708 ns 9774042 ns 1.19
integration/byval/reference 1559667 ns 1598000 ns 0.98
integration/byval/slices=2 2649104.5 ns 2571895.5 ns 1.03
kernel/indexing 453875 ns 457542 ns 0.99
kernel/indexing_checked 452417 ns 458645.5 ns 0.99
kernel/launch 8084 ns 8125 ns 0.99
metal/synchronization/stream 14750 ns 14209 ns 1.04
metal/synchronization/context 14875 ns 15000 ns 0.99
shared array/construct 27649.25 ns 25166.714285714286 ns 1.10
shared array/broadcast 461708 ns 469917 ns 0.98
shared array/random/randn/Float32 818250 ns 825666 ns 0.99
shared array/random/randn!/Float32 681458 ns 616625 ns 1.11
shared array/random/rand!/Int64 580792 ns 547708 ns 1.06
shared array/random/rand!/Float32 602708 ns 591458 ns 1.02
shared array/random/rand/Int64 787875 ns 734166.5 ns 1.07
shared array/random/rand/Float32 619792 ns 610312 ns 1.02
shared array/copyto!/gpu_to_gpu 87291 ns 88000 ns 0.99
shared array/copyto!/cpu_to_gpu 88250 ns 86291 ns 1.02
shared array/copyto!/gpu_to_cpu 83625 ns 77959 ns 1.07
shared array/accumulate/1d 1345375 ns 1336542 ns 1.01
shared array/accumulate/2d 1386041 ns 1384250 ns 1.00
shared array/iteration/findall/int 1768583 ns 1765020.5 ns 1.00
shared array/iteration/findall/bool 1572979 ns 1558812 ns 1.01
shared array/iteration/findfirst/int 1415334 ns 1396125.5 ns 1.01
shared array/iteration/findfirst/bool 1362250 ns 1360145.5 ns 1.00
shared array/iteration/scalar 158708 ns 153334 ns 1.04
shared array/iteration/logical 2969687.5 ns 2940000 ns 1.01
shared array/iteration/findmin/1d 1463437 ns 1442291 ns 1.01
shared array/iteration/findmin/2d 1372854 ns 1358562.5 ns 1.01
shared array/reductions/reduce/1d 744792 ns 723750 ns 1.03
shared array/reductions/reduce/2d 662895.5 ns 654792 ns 1.01
shared array/reductions/mapreduce/1d 741875 ns 728687 ns 1.02
shared array/reductions/mapreduce/2d 665542 ns 660125 ns 1.01
shared array/permutedims/4d 2537125 ns 2522521 ns 1.01
shared array/permutedims/2d 1032083 ns 1019375 ns 1.01
shared array/permutedims/3d 1589625 ns 1579917 ns 1.01
shared array/copy 242916 ns 233417 ns 1.04

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

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