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

Enable add_functions! test under shader validation #522

Merged
merged 1 commit into from
Jan 21, 2025
Merged

Conversation

christiangnrd
Copy link
Contributor

Noticed it's no longer broken on 15.3.

Copy link
Contributor

Your PR requires formatting changes to meet the project's style guidelines.
Please consider running Runic (git runic main) to apply these changes.

Click here to view the suggested changes.
diff --git a/test/mtl/metal.jl b/test/mtl/metal.jl
index 76a21070..bbb1e6ee 100644
--- a/test/mtl/metal.jl
+++ b/test/mtl/metal.jl
@@ -406,12 +406,12 @@ desc.url = NSFileURL("/tmp/foo")
 pipeline_desc = MTLComputePipelineDescriptor()
 pipeline_desc.computeFunction = fun
 
-add_functions!(bin, pipeline_desc)
-mktempdir() do dir
-    path = joinpath(dir, "kernel.bin")
-    write(path, bin)
-    @test isfile(path)
-    @test filesize(path) > 0
+            add_functions!(bin, pipeline_desc)
+            mktempdir() do dir
+                path = joinpath(dir, "kernel.bin")
+                write(path, bin)
+                @test isfile(path)
+                @test filesize(path) > 0
 end
 
 end

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: 8f12fe5 Previous: c722779 Ratio
private array/construct 24756.916666666664 ns 23958.300000000003 ns 1.03
private array/broadcast 463041.5 ns 463604.5 ns 1.00
private array/random/randn/Float32 796458 ns 923916.5 ns 0.86
private array/random/randn!/Float32 635583 ns 596458 ns 1.07
private array/random/rand!/Int64 559292 ns 551125 ns 1.01
private array/random/rand!/Float32 588875 ns 544583 ns 1.08
private array/random/rand/Int64 768708.5 ns 956125 ns 0.80
private array/random/rand/Float32 596208.5 ns 833417 ns 0.72
private array/copyto!/gpu_to_gpu 652542 ns 546584 ns 1.19
private array/copyto!/cpu_to_gpu 827875 ns 701958 ns 1.18
private array/copyto!/gpu_to_cpu 678292 ns 629250 ns 1.08
private array/accumulate/1d 1339500 ns 1434042 ns 0.93
private array/accumulate/2d 1368354.5 ns 1517250 ns 0.90
private array/iteration/findall/int 2079959 ns 2312312.5 ns 0.90
private array/iteration/findall/bool 1833875.5 ns 2046791 ns 0.90
private array/iteration/findfirst/int 1692042 ns 1828000 ns 0.93
private array/iteration/findfirst/bool 1663459 ns 1768604 ns 0.94
private array/iteration/scalar 3890209 ns 2485896 ns 1.56
private array/iteration/logical 3196041.5 ns 3556667 ns 0.90
private array/iteration/findmin/1d 1766625.5 ns 1922042 ns 0.92
private array/iteration/findmin/2d 1349333 ns 1429583 ns 0.94
private array/reductions/reduce/1d 1031625 ns 957875 ns 1.08
private array/reductions/reduce/2d 663542 ns 706792 ns 0.94
private array/reductions/mapreduce/1d 1032250 ns 937625 ns 1.10
private array/reductions/mapreduce/2d 676250 ns 715250 ns 0.95
private array/permutedims/4d 2554729 ns 2689687.5 ns 0.95
private array/permutedims/2d 1025438 ns 1106104.5 ns 0.93
private array/permutedims/3d 1594417 ns 1828708.5 ns 0.87
private array/copy 551166.5 ns 787542 ns 0.70
latency/precompile 5773423291 ns 5845726333 ns 0.99
latency/ttfp 3036927708.5 ns 3079599792 ns 0.99
latency/import 1140678125 ns 1161760499.5 ns 0.98
integration/metaldevrt 698125 ns 759958 ns 0.92
integration/byval/slices=1 1553042 ns 1662458 ns 0.93
integration/byval/slices=3 8745167 ns 21205687.5 ns 0.41
integration/byval/reference 1569000 ns 1646250 ns 0.95
integration/byval/slices=2 2629792 ns 2834791.5 ns 0.93
kernel/indexing 468437.5 ns 464709 ns 1.01
kernel/indexing_checked 470125 ns 468438 ns 1.00
kernel/launch 8042 ns 7875 ns 1.02
metal/synchronization/stream 14333 ns 15000 ns 0.96
metal/synchronization/context 14833 ns 15375 ns 0.96
shared array/construct 24675 ns 23512.5 ns 1.05
shared array/broadcast 463584 ns 466459 ns 0.99
shared array/random/randn/Float32 863416.5 ns 918250 ns 0.94
shared array/random/randn!/Float32 635333 ns 595292 ns 1.07
shared array/random/rand!/Int64 558792 ns 555833 ns 1.01
shared array/random/rand!/Float32 596083 ns 549500 ns 1.08
shared array/random/rand/Int64 781729.5 ns 911145.5 ns 0.86
shared array/random/rand/Float32 616333.5 ns 813291 ns 0.76
shared array/copyto!/gpu_to_gpu 82333 ns 80959 ns 1.02
shared array/copyto!/cpu_to_gpu 83916 ns 78750 ns 1.07
shared array/copyto!/gpu_to_cpu 83542 ns 78542 ns 1.06
shared array/accumulate/1d 1355750 ns 1460417 ns 0.93
shared array/accumulate/2d 1388458 ns 1522270.5 ns 0.91
shared array/iteration/findall/int 1827104.5 ns 2071729 ns 0.88
shared array/iteration/findall/bool 1600624.5 ns 1791937.5 ns 0.89
shared array/iteration/findfirst/int 1400250 ns 1522208 ns 0.92
shared array/iteration/findfirst/bool 1374708 ns 1447562.5 ns 0.95
shared array/iteration/scalar 152959 ns 159916 ns 0.96
shared array/iteration/logical 2989291 ns 3319625 ns 0.90
shared array/iteration/findmin/1d 1457521 ns 1593792 ns 0.91
shared array/iteration/findmin/2d 1360604.5 ns 1447458 ns 0.94
shared array/reductions/reduce/1d 737645.5 ns 715521 ns 1.03
shared array/reductions/reduce/2d 660854 ns 713083.5 ns 0.93
shared array/reductions/mapreduce/1d 736000 ns 713291 ns 1.03
shared array/reductions/mapreduce/2d 675958.5 ns 708083 ns 0.95
shared array/permutedims/4d 2568792 ns 2698708 ns 0.95
shared array/permutedims/2d 1020167 ns 1122458.5 ns 0.91
shared array/permutedims/3d 1593417 ns 1837291.5 ns 0.87
shared array/copy 252583 ns 212958.5 ns 1.19

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

@maleadt maleadt merged commit ebf223f into main Jan 21, 2025
7 checks passed
@maleadt maleadt deleted the validtest branch January 21, 2025 07:31
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.

2 participants