- 
                Notifications
    You must be signed in to change notification settings 
- Fork 46
Move BFloat16 code out of extension #536
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
                
     Merged
            
            
          Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    | Your PR no longer requires formatting changes. Thank you for your contribution! | 
There was a problem hiding this 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: 91dca03 | Previous: 924a130 | Ratio | 
|---|---|---|---|
| private array/construct | 23527.833333333332ns | 25257ns | 0.93 | 
| private array/broadcast | 458875ns | 463958ns | 0.99 | 
| private array/random/randn/Float32 | 795041ns | 760208ns | 1.05 | 
| private array/random/randn!/Float32 | 610500ns | 624687.5ns | 0.98 | 
| private array/random/rand!/Int64 | 551333ns | 563395.5ns | 0.98 | 
| private array/random/rand!/Float32 | 571167ns | 587854ns | 0.97 | 
| private array/random/rand/Int64 | 737833ns | 755083ns | 0.98 | 
| private array/random/rand/Float32 | 586750ns | 611333ns | 0.96 | 
| private array/copyto!/gpu_to_gpu | 647146ns | 650916.5ns | 0.99 | 
| private array/copyto!/cpu_to_gpu | 764624.5ns | 820417ns | 0.93 | 
| private array/copyto!/gpu_to_cpu | 620375ns | 686687.5ns | 0.90 | 
| private array/accumulate/1d | 1341334ns | 1362854.5ns | 0.98 | 
| private array/accumulate/2d | 1381667ns | 1404375ns | 0.98 | 
| private array/iteration/findall/int | 2081000ns | 2111541.5ns | 0.99 | 
| private array/iteration/findall/bool | 1830750ns | 1849958ns | 0.99 | 
| private array/iteration/findfirst/int | 1684896.5ns | 1715916ns | 0.98 | 
| private array/iteration/findfirst/bool | 1657249.5ns | 1673542ns | 0.99 | 
| private array/iteration/scalar | 3900291.5ns | 3935958ns | 0.99 | 
| private array/iteration/logical | 3161333.5ns | 3227791ns | 0.98 | 
| private array/iteration/findmin/1d | 1755916ns | 1778916.5ns | 0.99 | 
| private array/iteration/findmin/2d | 1347625ns | 1352041ns | 1.00 | 
| private array/reductions/reduce/1d | 1034083ns | 1043458ns | 0.99 | 
| private array/reductions/reduce/2d | 664479.5ns | 669709ns | 0.99 | 
| private array/reductions/mapreduce/1d | 1038270.5ns | 1052375ns | 0.99 | 
| private array/reductions/mapreduce/2d | 660792ns | 675854.5ns | 0.98 | 
| private array/permutedims/4d | 2491125ns | 2557249.5ns | 0.97 | 
| private array/permutedims/2d | 1002084ns | 1026042ns | 0.98 | 
| private array/permutedims/3d | 1582042ns | 1594916ns | 0.99 | 
| private array/copy | 583917ns | 569146ns | 1.03 | 
| latency/precompile | 8814246708ns | 8851374292ns | 1.00 | 
| latency/ttfp | 3612261417ns | 3620472000ns | 1.00 | 
| latency/import | 1237185791ns | 1235528208ns | 1.00 | 
| integration/metaldevrt | 709250ns | 717959ns | 0.99 | 
| integration/byval/slices=1 | 1581250ns | 1539333ns | 1.03 | 
| integration/byval/slices=3 | 8888209ns | 9117125ns | 0.97 | 
| integration/byval/reference | 1583000ns | 1560292ns | 1.01 | 
| integration/byval/slices=2 | 2645542ns | 2731458.5ns | 0.97 | 
| kernel/indexing | 453708ns | 457750ns | 0.99 | 
| kernel/indexing_checked | 448667ns | 455833ns | 0.98 | 
| kernel/launch | 8125ns | 8166ns | 0.99 | 
| metal/synchronization/stream | 14667ns | 14708ns | 1.00 | 
| metal/synchronization/context | 14542ns | 14791ns | 0.98 | 
| shared array/construct | 23527.75ns | 25149.333333333332ns | 0.94 | 
| shared array/broadcast | 456520.5ns | 464959ns | 0.98 | 
| shared array/random/randn/Float32 | 834208ns | 835792ns | 1.00 | 
| shared array/random/randn!/Float32 | 616792ns | 635500ns | 0.97 | 
| shared array/random/rand!/Int64 | 550208ns | 560542ns | 0.98 | 
| shared array/random/rand!/Float32 | 586833ns | 598750ns | 0.98 | 
| shared array/random/rand/Int64 | 786708.5ns | 765583ns | 1.03 | 
| shared array/random/rand/Float32 | 593604.5ns | 604979ns | 0.98 | 
| shared array/copyto!/gpu_to_gpu | 79291ns | 79167ns | 1.00 | 
| shared array/copyto!/cpu_to_gpu | 87167ns | 82250ns | 1.06 | 
| shared array/copyto!/gpu_to_cpu | 82500ns | 83000ns | 0.99 | 
| shared array/accumulate/1d | 1346750ns | 1366937.5ns | 0.99 | 
| shared array/accumulate/2d | 1385333ns | 1400458ns | 0.99 | 
| shared array/iteration/findall/int | 1795209ns | 1854249.5ns | 0.97 | 
| shared array/iteration/findall/bool | 1596417ns | 1619625ns | 0.99 | 
| shared array/iteration/findfirst/int | 1400916ns | 1384771ns | 1.01 | 
| shared array/iteration/findfirst/bool | 1365542ns | 1375770.5ns | 0.99 | 
| shared array/iteration/scalar | 155000ns | 155000ns | 1 | 
| shared array/iteration/logical | 2970604.5ns | 3012021ns | 0.99 | 
| shared array/iteration/findmin/1d | 1449292ns | 1470417ns | 0.99 | 
| shared array/iteration/findmin/2d | 1351458ns | 1355875ns | 1.00 | 
| shared array/reductions/reduce/1d | 723333ns | 729437.5ns | 0.99 | 
| shared array/reductions/reduce/2d | 660000ns | 674104.5ns | 0.98 | 
| shared array/reductions/mapreduce/1d | 733125ns | 743833ns | 0.99 | 
| shared array/reductions/mapreduce/2d | 669125ns | 658375ns | 1.02 | 
| shared array/permutedims/4d | 2540729ns | 2575708ns | 0.99 | 
| shared array/permutedims/2d | 1013854.5ns | 1011875ns | 1.00 | 
| shared array/permutedims/3d | 1572250ns | 1573854ns | 1.00 | 
| shared array/copy | 246417ns | 246417ns | 1 | 
This comment was automatically generated by workflow using github-action-benchmark.
              
                    tgymnich
  
              
              approved these changes
              
                  
                    Feb 5, 2025 
                  
              
              
            
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
This is the first half of #446.
Separated out partly to see the benchmarks. Update: No performance difference!
Impact to import/precompile time should be minimal and the decreased code complexity is probably worth the tradeoff.