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

[DON'T MERGE] Test specific ChainRules #672

Closed
wants to merge 1 commit into from

Conversation

avik-pal
Copy link
Member

@avik-pal avik-pal commented Jun 1, 2024

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: 282dd6c Previous: 60c595e Ratio
Dense(2 => 2)/cpu/reverse/ReverseDiff (compiled)/(2, 128) 3684.375 ns 3646.75 ns 1.01
Dense(2 => 2)/cpu/reverse/Zygote/(2, 128) 7208.333333333333 ns 7285 ns 0.99
Dense(2 => 2)/cpu/reverse/Tracker/(2, 128) 21009 ns 21210 ns 0.99
Dense(2 => 2)/cpu/reverse/ReverseDiff/(2, 128) 9629.8 ns 9781.666666666666 ns 0.98
Dense(2 => 2)/cpu/reverse/Flux/(2, 128) 8954.8 ns 9087.2 ns 0.99
Dense(2 => 2)/cpu/reverse/SimpleChains/(2, 128) 4515.875 ns 4453.888888888889 ns 1.01
Dense(2 => 2)/cpu/reverse/Enzyme/(2, 128) 1175.7686567164178 ns 1176.2706766917292 ns 1.00
Dense(2 => 2)/cpu/forward/NamedTuple/(2, 128) 1115.7070063694268 ns 1112.28025477707 ns 1.00
Dense(2 => 2)/cpu/forward/ComponentArray/(2, 128) 1168.054054054054 ns 1189.374074074074 ns 0.98
Dense(2 => 2)/cpu/forward/Flux/(2, 128) 1788.6754385964912 ns 1814.3181818181818 ns 0.99
Dense(2 => 2)/cpu/forward/SimpleChains/(2, 128) 180.0826330532213 ns 179.93324061196105 ns 1.00
Dense(20 => 20)/cpu/reverse/ReverseDiff (compiled)/(20, 128) 17253 ns 17212 ns 1.00
Dense(20 => 20)/cpu/reverse/Zygote/(20, 128) 17232 ns 17463 ns 0.99
Dense(20 => 20)/cpu/reverse/Tracker/(20, 128) 36930 ns 36689 ns 1.01
Dense(20 => 20)/cpu/reverse/ReverseDiff/(20, 128) 28373 ns 28147.5 ns 1.01
Dense(20 => 20)/cpu/reverse/Flux/(20, 128) 19666 ns 20058 ns 0.98
Dense(20 => 20)/cpu/reverse/SimpleChains/(20, 128) 16892 ns 16921 ns 1.00
Dense(20 => 20)/cpu/reverse/Enzyme/(20, 128) 4315.285714285715 ns 4310.5 ns 1.00
Dense(20 => 20)/cpu/forward/NamedTuple/(20, 128) 3876 ns 3867.25 ns 1.00
Dense(20 => 20)/cpu/forward/ComponentArray/(20, 128) 3968.625 ns 3951.125 ns 1.00
Dense(20 => 20)/cpu/forward/Flux/(20, 128) 4923.428571428572 ns 4787.571428571428 ns 1.03
Dense(20 => 20)/cpu/forward/SimpleChains/(20, 128) 1656.1 ns 1659.1 ns 1.00
Conv((3, 3), 3 => 3)/cpu/reverse/ReverseDiff (compiled)/(64, 64, 3, 128) 49301840 ns 38839150 ns 1.27
Conv((3, 3), 3 => 3)/cpu/reverse/Zygote/(64, 64, 3, 128) 57803387.5 ns 57478179 ns 1.01
Conv((3, 3), 3 => 3)/cpu/reverse/Tracker/(64, 64, 3, 128) 75540501.5 ns 68637336 ns 1.10
Conv((3, 3), 3 => 3)/cpu/reverse/ReverseDiff/(64, 64, 3, 128) 91695589.5 ns 80248739.5 ns 1.14
Conv((3, 3), 3 => 3)/cpu/reverse/Flux/(64, 64, 3, 128) 78149654 ns 66510498 ns 1.17
Conv((3, 3), 3 => 3)/cpu/reverse/SimpleChains/(64, 64, 3, 128) 11571772 ns 11601127 ns 1.00
Conv((3, 3), 3 => 3)/cpu/reverse/Enzyme/(64, 64, 3, 128) 17835410.5 ns 8302158.5 ns 2.15
Conv((3, 3), 3 => 3)/cpu/forward/NamedTuple/(64, 64, 3, 128) 7004259 ns 6958814.5 ns 1.01
Conv((3, 3), 3 => 3)/cpu/forward/ComponentArray/(64, 64, 3, 128) 6961404 ns 6935871 ns 1.00
Conv((3, 3), 3 => 3)/cpu/forward/Flux/(64, 64, 3, 128) 11545790 ns 9886349 ns 1.17
Conv((3, 3), 3 => 3)/cpu/forward/SimpleChains/(64, 64, 3, 128) 6381462.5 ns 6377484 ns 1.00
vgg16/cpu/reverse/Zygote/(32, 32, 3, 16) 718339361 ns 711495815.5 ns 1.01
vgg16/cpu/reverse/Zygote/(32, 32, 3, 64) 2891306316 ns 2802293498 ns 1.03
vgg16/cpu/reverse/Zygote/(32, 32, 3, 2) 147330932 ns 158450926 ns 0.93
vgg16/cpu/reverse/Tracker/(32, 32, 3, 16) 809914006 ns 745197995 ns 1.09
vgg16/cpu/reverse/Tracker/(32, 32, 3, 64) 2701982050 ns 2536517155 ns 1.07
vgg16/cpu/reverse/Tracker/(32, 32, 3, 2) 213764246 ns 186814591 ns 1.14
vgg16/cpu/reverse/Flux/(32, 32, 3, 16) 752483953 ns 698620045 ns 1.08
vgg16/cpu/reverse/Flux/(32, 32, 3, 64) 2842462581 ns 2703329300 ns 1.05
vgg16/cpu/reverse/Flux/(32, 32, 3, 2) 140493000 ns 122294200.5 ns 1.15
vgg16/cpu/forward/NamedTuple/(32, 32, 3, 16) 174370006 ns 172044480 ns 1.01
vgg16/cpu/forward/NamedTuple/(32, 32, 3, 64) 641359969 ns 643441503 ns 1.00
vgg16/cpu/forward/NamedTuple/(32, 32, 3, 2) 45259705 ns 45114156 ns 1.00
vgg16/cpu/forward/ComponentArray/(32, 32, 3, 16) 163695478 ns 163454975.5 ns 1.00
vgg16/cpu/forward/ComponentArray/(32, 32, 3, 64) 637758325 ns 628139701 ns 1.02
vgg16/cpu/forward/ComponentArray/(32, 32, 3, 2) 29893355 ns 29335904 ns 1.02
vgg16/cpu/forward/Flux/(32, 32, 3, 16) 214381016 ns 207955667.5 ns 1.03
vgg16/cpu/forward/Flux/(32, 32, 3, 64) 840837629 ns 722173872 ns 1.16
vgg16/cpu/forward/Flux/(32, 32, 3, 2) 37183512 ns 37423155 ns 0.99
Conv((3, 3), 64 => 64)/cpu/reverse/ReverseDiff (compiled)/(64, 64, 64, 128) 1184131172.5 ns 1242027523.5 ns 0.95
Conv((3, 3), 64 => 64)/cpu/reverse/Zygote/(64, 64, 64, 128) 1866323943.5 ns 1847309072 ns 1.01
Conv((3, 3), 64 => 64)/cpu/reverse/Tracker/(64, 64, 64, 128) 2018582733.5 ns 1988297584 ns 1.02
Conv((3, 3), 64 => 64)/cpu/reverse/ReverseDiff/(64, 64, 64, 128) 2380753822.5 ns 2337208631 ns 1.02
Conv((3, 3), 64 => 64)/cpu/reverse/Flux/(64, 64, 64, 128) 1897280908.5 ns 1825164998 ns 1.04
Conv((3, 3), 64 => 64)/cpu/reverse/Enzyme/(64, 64, 64, 128) 558099169 ns 347875405.5 ns 1.60
Conv((3, 3), 64 => 64)/cpu/forward/NamedTuple/(64, 64, 64, 128) 318544046 ns 318366365 ns 1.00
Conv((3, 3), 64 => 64)/cpu/forward/ComponentArray/(64, 64, 64, 128) 319622494 ns 319738018 ns 1.00
Conv((3, 3), 64 => 64)/cpu/forward/Flux/(64, 64, 64, 128) 371969879.5 ns 452781616 ns 0.82
Conv((3, 3), 1 => 1)/cpu/reverse/ReverseDiff (compiled)/(64, 64, 1, 128) 11720952.5 ns 11803413 ns 0.99
Conv((3, 3), 1 => 1)/cpu/reverse/Zygote/(64, 64, 1, 128) 17890168 ns 17882962 ns 1.00
Conv((3, 3), 1 => 1)/cpu/reverse/Tracker/(64, 64, 1, 128) 19137419 ns 19018033 ns 1.01
Conv((3, 3), 1 => 1)/cpu/reverse/ReverseDiff/(64, 64, 1, 128) 23940367.5 ns 23755630 ns 1.01
Conv((3, 3), 1 => 1)/cpu/reverse/Flux/(64, 64, 1, 128) 17929635 ns 17832966.5 ns 1.01
Conv((3, 3), 1 => 1)/cpu/reverse/SimpleChains/(64, 64, 1, 128) 1148018 ns 1148767 ns 1.00
Conv((3, 3), 1 => 1)/cpu/reverse/Enzyme/(64, 64, 1, 128) 5868519 ns 2512938 ns 2.34
Conv((3, 3), 1 => 1)/cpu/forward/NamedTuple/(64, 64, 1, 128) 2043269.5 ns 2035570 ns 1.00
Conv((3, 3), 1 => 1)/cpu/forward/ComponentArray/(64, 64, 1, 128) 2027395 ns 2023578.5 ns 1.00
Conv((3, 3), 1 => 1)/cpu/forward/Flux/(64, 64, 1, 128) 2065082 ns 2055760 ns 1.00
Conv((3, 3), 1 => 1)/cpu/forward/SimpleChains/(64, 64, 1, 128) 198550 ns 195727.5 ns 1.01
Dense(200 => 200)/cpu/reverse/ReverseDiff (compiled)/(200, 128) 297434 ns 288322 ns 1.03
Dense(200 => 200)/cpu/reverse/Zygote/(200, 128) 268188 ns 262603 ns 1.02
Dense(200 => 200)/cpu/reverse/Tracker/(200, 128) 369432.5 ns 354936.5 ns 1.04
Dense(200 => 200)/cpu/reverse/ReverseDiff/(200, 128) 414146 ns 400938 ns 1.03
Dense(200 => 200)/cpu/reverse/Flux/(200, 128) 276926 ns 270257 ns 1.02
Dense(200 => 200)/cpu/reverse/SimpleChains/(200, 128) 409323 ns 397421 ns 1.03
Dense(200 => 200)/cpu/reverse/Enzyme/(200, 128) 83666 ns 83306 ns 1.00
Dense(200 => 200)/cpu/forward/NamedTuple/(200, 128) 82193 ns 80271 ns 1.02
Dense(200 => 200)/cpu/forward/ComponentArray/(200, 128) 83705.5 ns 80581 ns 1.04
Dense(200 => 200)/cpu/forward/Flux/(200, 128) 87193 ns 85480 ns 1.02
Dense(200 => 200)/cpu/forward/SimpleChains/(200, 128) 104555 ns 104617 ns 1.00
Conv((3, 3), 16 => 16)/cpu/reverse/ReverseDiff (compiled)/(64, 64, 16, 128) 196747242 ns 187932820.5 ns 1.05
Conv((3, 3), 16 => 16)/cpu/reverse/Zygote/(64, 64, 16, 128) 325004429 ns 321827872.5 ns 1.01
Conv((3, 3), 16 => 16)/cpu/reverse/Tracker/(64, 64, 16, 128) 419205696 ns 393773632.5 ns 1.06
Conv((3, 3), 16 => 16)/cpu/reverse/ReverseDiff/(64, 64, 16, 128) 436424072 ns 454117809 ns 0.96
Conv((3, 3), 16 => 16)/cpu/reverse/Flux/(64, 64, 16, 128) 376361494 ns 366877761 ns 1.03
Conv((3, 3), 16 => 16)/cpu/reverse/SimpleChains/(64, 64, 16, 128) 326727409.5 ns 309426428 ns 1.06
Conv((3, 3), 16 => 16)/cpu/reverse/Enzyme/(64, 64, 16, 128) 101802283.5 ns 51303991 ns 1.98
Conv((3, 3), 16 => 16)/cpu/forward/NamedTuple/(64, 64, 16, 128) 43860284.5 ns 43675671.5 ns 1.00
Conv((3, 3), 16 => 16)/cpu/forward/ComponentArray/(64, 64, 16, 128) 43626441 ns 43447693 ns 1.00
Conv((3, 3), 16 => 16)/cpu/forward/Flux/(64, 64, 16, 128) 57130107.5 ns 49289683 ns 1.16
Conv((3, 3), 16 => 16)/cpu/forward/SimpleChains/(64, 64, 16, 128) 28006036 ns 28489085 ns 0.98
Dense(2000 => 2000)/cpu/reverse/ReverseDiff (compiled)/(2000, 128) 19042986.5 ns 18511523 ns 1.03
Dense(2000 => 2000)/cpu/reverse/Zygote/(2000, 128) 19519695 ns 19373919.5 ns 1.01
Dense(2000 => 2000)/cpu/reverse/Tracker/(2000, 128) 23314166 ns 22860858 ns 1.02
Dense(2000 => 2000)/cpu/reverse/ReverseDiff/(2000, 128) 24120723 ns 23821494.5 ns 1.01
Dense(2000 => 2000)/cpu/reverse/Flux/(2000, 128) 19580465.5 ns 19452776.5 ns 1.01
Dense(2000 => 2000)/cpu/reverse/Enzyme/(2000, 128) 6518703 ns 6471809.5 ns 1.01
Dense(2000 => 2000)/cpu/forward/NamedTuple/(2000, 128) 6525305 ns 6467840.5 ns 1.01
Dense(2000 => 2000)/cpu/forward/ComponentArray/(2000, 128) 6500924.5 ns 6458192 ns 1.01
Dense(2000 => 2000)/cpu/forward/Flux/(2000, 128) 6490531 ns 6475071.5 ns 1.00

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

@avik-pal avik-pal closed this Jun 5, 2024
@avik-pal avik-pal deleted the ap/merge_pullback_remove branch June 5, 2024 04:03
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