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

Try removing the type assert with this #734

Merged
merged 1 commit into from
Jun 26, 2024
Merged

Try removing the type assert with this #734

merged 1 commit into from
Jun 26, 2024

Conversation

avik-pal
Copy link
Member

No description provided.

Copy link

codecov bot commented Jun 26, 2024

Codecov Report

Attention: Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.

Project coverage is 96.93%. Comparing base (10c785e) to head (276ff3e).

Files Patch % Lines
src/helpers/recursive_ops.jl 92.85% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #734      +/-   ##
==========================================
+ Coverage   96.77%   96.93%   +0.15%     
==========================================
  Files          53       53              
  Lines        2701     2704       +3     
==========================================
+ Hits         2614     2621       +7     
+ Misses         87       83       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

Benchmark Results

Benchmark suite Current: 276ff3e Previous: 10c785e Ratio
Dense(2 => 2)/cpu/reverse/ReverseDiff (compiled)/(2, 128) 3686.875 ns 4216.75 ns 0.87
Dense(2 => 2)/cpu/reverse/Zygote/(2, 128) 7148.333333333333 ns 9235.666666666666 ns 0.77
Dense(2 => 2)/cpu/reverse/Tracker/(2, 128) 21230 ns 26319 ns 0.81
Dense(2 => 2)/cpu/reverse/ReverseDiff/(2, 128) 9874.4 ns 12419.2 ns 0.80
Dense(2 => 2)/cpu/reverse/Flux/(2, 128) 8981.75 ns 10960.625 ns 0.82
Dense(2 => 2)/cpu/reverse/SimpleChains/(2, 128) 4524.75 ns 5868.4375 ns 0.77
Dense(2 => 2)/cpu/reverse/Enzyme/(2, 128) 1166.2279411764705 ns 1243.934306569343 ns 0.94
Dense(2 => 2)/cpu/forward/NamedTuple/(2, 128) 1111.0246913580247 ns 1235.3974358974358 ns 0.90
Dense(2 => 2)/cpu/forward/ComponentArray/(2, 128) 1183.2748091603053 ns 1283.8088235294117 ns 0.92
Dense(2 => 2)/cpu/forward/Flux/(2, 128) 1804.9038461538462 ns 1999.75 ns 0.90
Dense(2 => 2)/cpu/forward/SimpleChains/(2, 128) 180.0140056022409 ns 180.89720998531573 ns 1.00
Dense(20 => 20)/cpu/reverse/ReverseDiff (compiled)/(20, 128) 17472 ns 19717 ns 0.89
Dense(20 => 20)/cpu/reverse/Zygote/(20, 128) 16842 ns 20348 ns 0.83
Dense(20 => 20)/cpu/reverse/Tracker/(20, 128) 38151 ns 44243 ns 0.86
Dense(20 => 20)/cpu/reverse/ReverseDiff/(20, 128) 29475 ns 34124 ns 0.86
Dense(20 => 20)/cpu/reverse/Flux/(20, 128) 20027 ns 22522 ns 0.89
Dense(20 => 20)/cpu/reverse/SimpleChains/(20, 128) 17313 ns 19286 ns 0.90
Dense(20 => 20)/cpu/reverse/Enzyme/(20, 128) 4326.571428571428 ns 4559.857142857143 ns 0.95
Dense(20 => 20)/cpu/forward/NamedTuple/(20, 128) 3847.125 ns 4181.625 ns 0.92
Dense(20 => 20)/cpu/forward/ComponentArray/(20, 128) 3946.125 ns 4230.5 ns 0.93
Dense(20 => 20)/cpu/forward/Flux/(20, 128) 4819 ns 5563.833333333333 ns 0.87
Dense(20 => 20)/cpu/forward/SimpleChains/(20, 128) 1662.1 ns 1650.1 ns 1.01
Conv((3, 3), 3 => 3)/cpu/reverse/ReverseDiff (compiled)/(64, 64, 3, 128) 47766596 ns 41063516 ns 1.16
Conv((3, 3), 3 => 3)/cpu/reverse/Zygote/(64, 64, 3, 128) 58166333 ns 60159882 ns 0.97
Conv((3, 3), 3 => 3)/cpu/reverse/Tracker/(64, 64, 3, 128) 108807926 ns 72623925 ns 1.50
Conv((3, 3), 3 => 3)/cpu/reverse/ReverseDiff/(64, 64, 3, 128) 108054857.5 ns 85294934 ns 1.27
Conv((3, 3), 3 => 3)/cpu/reverse/Flux/(64, 64, 3, 128) 117155496.5 ns 74466589.5 ns 1.57
Conv((3, 3), 3 => 3)/cpu/reverse/SimpleChains/(64, 64, 3, 128) 11588593 ns 11761494.5 ns 0.99
Conv((3, 3), 3 => 3)/cpu/reverse/Enzyme/(64, 64, 3, 128) 17691877 ns 18805410 ns 0.94
Conv((3, 3), 3 => 3)/cpu/forward/NamedTuple/(64, 64, 3, 128) 6980290.5 ns 7462386 ns 0.94
Conv((3, 3), 3 => 3)/cpu/forward/ComponentArray/(64, 64, 3, 128) 6951817 ns 7439116 ns 0.93
Conv((3, 3), 3 => 3)/cpu/forward/Flux/(64, 64, 3, 128) 21339640 ns 11050970 ns 1.93
Conv((3, 3), 3 => 3)/cpu/forward/SimpleChains/(64, 64, 3, 128) 6391405 ns 6464680.5 ns 0.99
vgg16/cpu/reverse/Zygote/(32, 32, 3, 16) 775488916 ns 1234275161 ns 0.63
vgg16/cpu/reverse/Zygote/(32, 32, 3, 64) 2612061266 ns 2928492289 ns 0.89
vgg16/cpu/reverse/Zygote/(32, 32, 3, 2) 135419118 ns 214941853 ns 0.63
vgg16/cpu/reverse/Tracker/(32, 32, 3, 16) 907080881 ns 1103559326 ns 0.82
vgg16/cpu/reverse/Tracker/(32, 32, 3, 64) 3189923071 ns 3874878332 ns 0.82
vgg16/cpu/reverse/Tracker/(32, 32, 3, 2) 238899818 ns 363069115 ns 0.66
vgg16/cpu/reverse/Flux/(32, 32, 3, 16) 846775205 ns 855131320 ns 0.99
vgg16/cpu/reverse/Flux/(32, 32, 3, 64) 3011464506 ns 3759814726 ns 0.80
vgg16/cpu/reverse/Flux/(32, 32, 3, 2) 132856716.5 ns 224366634 ns 0.59
vgg16/cpu/forward/NamedTuple/(32, 32, 3, 16) 173724675 ns 185724786 ns 0.94
vgg16/cpu/forward/NamedTuple/(32, 32, 3, 64) 650524329 ns 688363019 ns 0.95
vgg16/cpu/forward/NamedTuple/(32, 32, 3, 2) 45397550.5 ns 44786457 ns 1.01
vgg16/cpu/forward/ComponentArray/(32, 32, 3, 16) 164935540.5 ns 192569891 ns 0.86
vgg16/cpu/forward/ComponentArray/(32, 32, 3, 64) 644434408 ns 695054017.5 ns 0.93
vgg16/cpu/forward/ComponentArray/(32, 32, 3, 2) 30594715 ns 40890130 ns 0.75
vgg16/cpu/forward/Flux/(32, 32, 3, 16) 229233309 ns 224497510.5 ns 1.02
vgg16/cpu/forward/Flux/(32, 32, 3, 64) 845932397 ns 805972111.5 ns 1.05
vgg16/cpu/forward/Flux/(32, 32, 3, 2) 37828941 ns 46261355 ns 0.82
Conv((3, 3), 64 => 64)/cpu/reverse/ReverseDiff (compiled)/(64, 64, 64, 128) 1198830451.5 ns 1932663847 ns 0.62
Conv((3, 3), 64 => 64)/cpu/reverse/Zygote/(64, 64, 64, 128) 1873354578 ns 2085808049.5 ns 0.90
Conv((3, 3), 64 => 64)/cpu/reverse/Tracker/(64, 64, 64, 128) 2453997038 ns 3248796678 ns 0.76
Conv((3, 3), 64 => 64)/cpu/reverse/ReverseDiff/(64, 64, 64, 128) 2571114481 ns 3163351656 ns 0.81
Conv((3, 3), 64 => 64)/cpu/reverse/Flux/(64, 64, 64, 128) 2006943762.5 ns 2022206910 ns 0.99
Conv((3, 3), 64 => 64)/cpu/reverse/Enzyme/(64, 64, 64, 128) 554489362 ns 623016011 ns 0.89
Conv((3, 3), 64 => 64)/cpu/forward/NamedTuple/(64, 64, 64, 128) 317759850 ns 353519677 ns 0.90
Conv((3, 3), 64 => 64)/cpu/forward/ComponentArray/(64, 64, 64, 128) 316838474 ns 357321294 ns 0.89
Conv((3, 3), 64 => 64)/cpu/forward/Flux/(64, 64, 64, 128) 448302534 ns 424873104.5 ns 1.06
Conv((3, 3), 1 => 1)/cpu/reverse/ReverseDiff (compiled)/(64, 64, 1, 128) 11752680 ns 12884589.5 ns 0.91
Conv((3, 3), 1 => 1)/cpu/reverse/Zygote/(64, 64, 1, 128) 18115654 ns 19081133 ns 0.95
Conv((3, 3), 1 => 1)/cpu/reverse/Tracker/(64, 64, 1, 128) 19306382 ns 21519296.5 ns 0.90
Conv((3, 3), 1 => 1)/cpu/reverse/ReverseDiff/(64, 64, 1, 128) 23953304 ns 25958164 ns 0.92
Conv((3, 3), 1 => 1)/cpu/reverse/Flux/(64, 64, 1, 128) 18110983 ns 19057064.5 ns 0.95
Conv((3, 3), 1 => 1)/cpu/reverse/SimpleChains/(64, 64, 1, 128) 1170230.5 ns 1250724 ns 0.94
Conv((3, 3), 1 => 1)/cpu/reverse/Enzyme/(64, 64, 1, 128) 5849416 ns 6133925 ns 0.95
Conv((3, 3), 1 => 1)/cpu/forward/NamedTuple/(64, 64, 1, 128) 2046334 ns 2232072 ns 0.92
Conv((3, 3), 1 => 1)/cpu/forward/ComponentArray/(64, 64, 1, 128) 2032020 ns 2239214.5 ns 0.91
Conv((3, 3), 1 => 1)/cpu/forward/Flux/(64, 64, 1, 128) 2078136.5 ns 2289071 ns 0.91
Conv((3, 3), 1 => 1)/cpu/forward/SimpleChains/(64, 64, 1, 128) 197358 ns 197450 ns 1.00
Dense(200 => 200)/cpu/reverse/ReverseDiff (compiled)/(200, 128) 295402 ns 308903.5 ns 0.96
Dense(200 => 200)/cpu/reverse/Zygote/(200, 128) 269193 ns 281908 ns 0.95
Dense(200 => 200)/cpu/reverse/Tracker/(200, 128) 372146 ns 399048 ns 0.93
Dense(200 => 200)/cpu/reverse/ReverseDiff/(200, 128) 410839 ns 441187 ns 0.93
Dense(200 => 200)/cpu/reverse/Flux/(200, 128) 277459 ns 293464.5 ns 0.95
Dense(200 => 200)/cpu/reverse/SimpleChains/(200, 128) 415688 ns 427801 ns 0.97
Dense(200 => 200)/cpu/reverse/Enzyme/(200, 128) 83266 ns 85540 ns 0.97
Dense(200 => 200)/cpu/forward/NamedTuple/(200, 128) 83055.5 ns 87188.5 ns 0.95
Dense(200 => 200)/cpu/forward/ComponentArray/(200, 128) 85039 ns 90199 ns 0.94
Dense(200 => 200)/cpu/forward/Flux/(200, 128) 87374 ns 92724 ns 0.94
Dense(200 => 200)/cpu/forward/SimpleChains/(200, 128) 104445 ns 104737 ns 1.00
Conv((3, 3), 16 => 16)/cpu/reverse/ReverseDiff (compiled)/(64, 64, 16, 128) 196072408 ns 202054585 ns 0.97
Conv((3, 3), 16 => 16)/cpu/reverse/Zygote/(64, 64, 16, 128) 327290480 ns 342075597 ns 0.96
Conv((3, 3), 16 => 16)/cpu/reverse/Tracker/(64, 64, 16, 128) 471619017 ns 408355380 ns 1.15
Conv((3, 3), 16 => 16)/cpu/reverse/ReverseDiff/(64, 64, 16, 128) 480340621 ns 479560097 ns 1.00
Conv((3, 3), 16 => 16)/cpu/reverse/Flux/(64, 64, 16, 128) 433831050.5 ns 389580302 ns 1.11
Conv((3, 3), 16 => 16)/cpu/reverse/SimpleChains/(64, 64, 16, 128) 323522778.5 ns 416810032 ns 0.78
Conv((3, 3), 16 => 16)/cpu/reverse/Enzyme/(64, 64, 16, 128) 103295176.5 ns 106489672 ns 0.97
Conv((3, 3), 16 => 16)/cpu/forward/NamedTuple/(64, 64, 16, 128) 43909993 ns 45864264 ns 0.96
Conv((3, 3), 16 => 16)/cpu/forward/ComponentArray/(64, 64, 16, 128) 43717785 ns 46163761 ns 0.95
Conv((3, 3), 16 => 16)/cpu/forward/Flux/(64, 64, 16, 128) 66113390 ns 57198084.5 ns 1.16
Conv((3, 3), 16 => 16)/cpu/forward/SimpleChains/(64, 64, 16, 128) 28830762 ns 29057867 ns 0.99
Dense(2000 => 2000)/cpu/reverse/ReverseDiff (compiled)/(2000, 128) 19058780.5 ns 19974225.5 ns 0.95
Dense(2000 => 2000)/cpu/reverse/Zygote/(2000, 128) 19542312 ns 20215615 ns 0.97
Dense(2000 => 2000)/cpu/reverse/Tracker/(2000, 128) 23454470 ns 26730400 ns 0.88
Dense(2000 => 2000)/cpu/reverse/ReverseDiff/(2000, 128) 24134132 ns 25144549 ns 0.96
Dense(2000 => 2000)/cpu/reverse/Flux/(2000, 128) 19622648 ns 20231692.5 ns 0.97
Dense(2000 => 2000)/cpu/reverse/Enzyme/(2000, 128) 6521865 ns 6563663 ns 0.99
Dense(2000 => 2000)/cpu/forward/NamedTuple/(2000, 128) 6541835 ns 6603088.5 ns 0.99
Dense(2000 => 2000)/cpu/forward/ComponentArray/(2000, 128) 6522792 ns 6625248.5 ns 0.98
Dense(2000 => 2000)/cpu/forward/Flux/(2000, 128) 6479685.5 ns 6526769 ns 0.99

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

@avik-pal avik-pal merged commit 236284c into main Jun 26, 2024
52 of 53 checks passed
@avik-pal avik-pal deleted the ap/unrolled_utils branch June 26, 2024 20:23
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