Skip to content

Conversation

@christiangnrd
Copy link
Member

Also fixes a bug oversight in the tests for MPSGraphRandomOpDescriptor.

I left the specific imports (eg. using .MPS: something) in their respective files.

I moved the BFloat16s import to setup.jl since it would eventually get moved there with #446 regardless. I left the SpecialFunctions in the math intrinsics test file because it's the only set of tests that require it, but I can move it to setup.jl if people think that would be best.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 18, 2025

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/mpsgraphs/random.jl b/test/mpsgraphs/random.jl
index e9f12afd..db3f5781 100644
--- a/test/mpsgraphs/random.jl
+++ b/test/mpsgraphs/random.jl
@@ -16,7 +16,7 @@ using .MPSGraphs: MPSGraphRandomOpDescriptor, MPSGraphRandomDistributionNormal,
                       (MPSGraphRandomDistributionUniform, Float16),
                       (MPSGraphRandomDistributionUniform, BFloat16),
                       ]
-        @test MPSGraphRandomOpDescriptor(dist, T) isa MPSGraphRandomOpDescriptor
+            @test MPSGraphRandomOpDescriptor(dist, T) isa MPSGraphRandomOpDescriptor
     end
 end
 
diff --git a/test/mtl/metal.jl b/test/mtl/metal.jl
index 4a18f174..325f8303 100644
--- a/test/mtl/metal.jl
+++ b/test/mtl/metal.jl
@@ -491,6 +491,6 @@ end
 
 # TODO: continue adding tests
 
-end # @autoreleasepool begin
+    end # @autoreleasepool begin
 
 end # @testset "MTL" begin
diff --git a/test/profiling.jl b/test/profiling.jl
index a48575cd..b049f823 100644
--- a/test/profiling.jl
+++ b/test/profiling.jl
@@ -30,8 +30,8 @@ cd(tmpdir) do
     @test isdir("julia_1.trace")
 end
 
-end # cd(tmpdir) do
-end # mktempdir() do tmpdir
-end # if run_tests
+            end # cd(tmpdir) do
+        end # mktempdir() do tmpdir
+    end # if run_tests
 
 end

@christiangnrd
Copy link
Member Author

Just pushed a few cleanup/consistency commits for tests. I'm done adding commits (other than fixing CI failures) for this PR

@codecov
Copy link

codecov bot commented Apr 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.90%. Comparing base (7706211) to head (f2c49b8).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #584      +/-   ##
==========================================
+ Coverage   80.71%   80.90%   +0.18%     
==========================================
  Files          61       61              
  Lines        2676     2676              
==========================================
+ Hits         2160     2165       +5     
+ Misses        516      511       -5     

☔ View full report in Codecov by Sentry.
📢 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.

Base automatically changed from matmul to main April 18, 2025 14:58
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: f2c49b8 Previous: 7706211 Ratio
private array/construct 25145.833333333336 ns 23625 ns 1.06
private array/broadcast 460333 ns 463750 ns 0.99
private array/random/randn/Float32 835729.5 ns 818187.5 ns 1.02
private array/random/randn!/Float32 626875 ns 636208 ns 0.99
private array/random/rand!/Int64 570166 ns 559000 ns 1.02
private array/random/rand!/Float32 600708 ns 594292 ns 1.01
private array/random/rand/Int64 789917 ns 757375.5 ns 1.04
private array/random/rand/Float32 606500 ns 615666 ns 0.99
private array/copyto!/gpu_to_gpu 658458 ns 648542 ns 1.02
private array/copyto!/cpu_to_gpu 658771 ns 670417 ns 0.98
private array/copyto!/gpu_to_cpu 824375 ns 809500 ns 1.02
private array/accumulate/1d 1338062.5 ns 1325125 ns 1.01
private array/accumulate/2d 1386437.5 ns 1384542 ns 1.00
private array/iteration/findall/int 2073333 ns 2084771 ns 0.99
private array/iteration/findall/bool 2041417 ns 1831875 ns 1.11
private array/iteration/findfirst/int 1758229.5 ns 1688666.5 ns 1.04
private array/iteration/findfirst/bool 1661729 ns 1646958 ns 1.01
private array/iteration/scalar 3781000 ns 3432250 ns 1.10
private array/iteration/logical 3184750 ns 3191833 ns 1.00
private array/iteration/findmin/1d 1761709 ns 1734000 ns 1.02
private array/iteration/findmin/2d 1353979 ns 1345167 ns 1.01
private array/reductions/reduce/1d 1044708 ns 1024292 ns 1.02
private array/reductions/reduce/2d 664584 ns 652770.5 ns 1.02
private array/reductions/mapreduce/1d 1039375 ns 1011292 ns 1.03
private array/reductions/mapreduce/2d 666375 ns 656563 ns 1.01
private array/permutedims/4d 2517375 ns 2513541.5 ns 1.00
private array/permutedims/2d 1023625 ns 1012625 ns 1.01
private array/permutedims/3d 1578292 ns 1589709 ns 0.99
private array/copy 595958 ns 633354.5 ns 0.94
latency/precompile 9756599625 ns 9749067333 ns 1.00
latency/ttfp 3786320791.5 ns 3755012187.5 ns 1.01
latency/import 1261810000.5 ns 1264204812.5 ns 1.00
integration/metaldevrt 735375 ns 728416 ns 1.01
integration/byval/slices=1 1548729.5 ns 1650459 ns 0.94
integration/byval/slices=3 10675875 ns 11271625 ns 0.95
integration/byval/reference 1545416 ns 1575188 ns 0.98
integration/byval/slices=2 2563500 ns 2712750 ns 0.94
kernel/indexing 467667 ns 448895.5 ns 1.04
kernel/indexing_checked 477750 ns 454416 ns 1.05
kernel/launch 8166 ns 10000 ns 0.82
metal/synchronization/stream 14709 ns 14625 ns 1.01
metal/synchronization/context 15125 ns 14792 ns 1.02
shared array/construct 25944.333333333332 ns 23638.833333333332 ns 1.10
shared array/broadcast 462916 ns 455916 ns 1.02
shared array/random/randn/Float32 817208 ns 789000 ns 1.04
shared array/random/randn!/Float32 634833 ns 633709 ns 1.00
shared array/random/rand!/Int64 572750 ns 563792 ns 1.02
shared array/random/rand!/Float32 597042 ns 596292 ns 1.00
shared array/random/rand/Int64 759750.5 ns 756291 ns 1.00
shared array/random/rand/Float32 611708 ns 587125 ns 1.04
shared array/copyto!/gpu_to_gpu 83833 ns 83416 ns 1.00
shared array/copyto!/cpu_to_gpu 83334 ns 82500 ns 1.01
shared array/copyto!/gpu_to_cpu 83292 ns 83250 ns 1.00
shared array/accumulate/1d 1340771 ns 1343375 ns 1.00
shared array/accumulate/2d 1392959 ns 1388834 ns 1.00
shared array/iteration/findall/int 1840667 ns 1848584 ns 1.00
shared array/iteration/findall/bool 1589834 ns 1571458 ns 1.01
shared array/iteration/findfirst/int 1394146 ns 1419875 ns 0.98
shared array/iteration/findfirst/bool 1367646 ns 1371145.5 ns 1.00
shared array/iteration/scalar 157458 ns 155666.5 ns 1.01
shared array/iteration/logical 2976271 ns 2967000 ns 1.00
shared array/iteration/findmin/1d 1469083.5 ns 1464354 ns 1.00
shared array/iteration/findmin/2d 1370187.5 ns 1377000 ns 1.00
shared array/reductions/reduce/1d 741834 ns 712437.5 ns 1.04
shared array/reductions/reduce/2d 660500 ns 663292 ns 1.00
shared array/reductions/mapreduce/1d 739167 ns 730375 ns 1.01
shared array/reductions/mapreduce/2d 668416.5 ns 661667 ns 1.01
shared array/permutedims/4d 2508479 ns 2524875 ns 0.99
shared array/permutedims/2d 1015416 ns 1018646 ns 1.00
shared array/permutedims/3d 1575583 ns 1578583 ns 1.00
shared array/copy 245791 ns 245792 ns 1.00

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

@christiangnrd christiangnrd merged commit 987264c into main Apr 21, 2025
7 checks passed
@christiangnrd christiangnrd deleted the erf branch April 21, 2025 02:59
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.

3 participants